Switchable GUI material theme

Hi there, I’m looking into adding a dark theme for mender. I read the contributor notes and this is starting to look like I should check up front if you’d be receptive of such a change.

Having made some changes to support swapping material themes I’m now looking at the additional *.less and component design that doesn’t understand themes. I’m prepared to push all that less back into the mender-theme.js as an actual material-ui theme.

This would require component changes to use styled compatible with materialv4 and impact add-on code I presume isn’t already in the front end?

Another concern is material v4 ->v5 dropping jss. But to go into v5 now it would take bumping react to 17 which may be a big ask.

Mender looks like an awesome product, thanks for any feedback.

1 Like

Hi @Jackben
Thanks for your interest and for reaching out! As someone working on the frontend, this is something I myself would like to see very much! The update to react v17 went through without much changes, but to material v5 there is some work to do…
My only concern for the less parts is what’s not covered by mui (mainly big calendar, xterm, …?)… Also paging @michaelatmender if that would need some integration anywhere else
All in all: getting contributions especially in that area would be great and very welcome!

1 Like

That’s great to hear. My mistake I thought I’d based of master but I forgot I’d gone back to base changes from 3.1.0 to match my deployment here. Should I expect issues trying to use the gui@master internally on a 3.1.0 deployment?

I will open a PR today with my changes to at least have a look, they wont be ready to merge in your commit format yet, I’ll have to edit the history.

When running master against a 3.1.0 deployment there are likely going to be issues with the releases list and maybe with the devices list in the deployment details. OTOH later this month 3.2 will be released, depending on when you want to move there, that might ease things…
I’m very much looking forward to your PR! and we can take care of the commit format later on - the CI will let you know :grinning_face_with_smiling_eyes:

Didn’t mess with git fast enough yesterday but started a WIP PR here WIP mui theme dark & 3rd party by Jackbennett · Pull Request #2375 · mendersoftware/gui · GitHub