MediaWikiAGE / MAGE

MediaWiki Automated Graphical Editor. Mostly meant to be a replacement for AutoWikiBrowser (AWB).
MIT License
7 stars 7 forks source link

Consider more dynamic light/dark mode handling #61

Closed AttemptToCallNil closed 3 years ago

AttemptToCallNil commented 3 years ago

Currently using light or dark mode is determined once, when MAGE starts up. It's also hard-bound to the light/dark setting of the OS. I'm not sure this is even possible, but if it is, a more advanced approach might have some advantages. Defaulting to the OS mode with the ability to switch modes at runtime will let people specifically use a mode not configured for their OS (in case they have MAGE-specific mode preferences), but (arguably, more importantly) this could seriously simplify light/dark mode testing for developers. Right now I'd have to close MAGE and re-run pnpm run electron:serve whenever I want to test MAGE with a different mode.

Helcostr commented 3 years ago

Here is what I'm thinking

https://github.com/justjavac/is-dark-theme

Use this package to auto detect (hopefully it works cross platform), then save the variable. Any future changes to OS shouldn't matter, as the initial launch has happen and we are using a variable inside the application to control light/dark.

AttemptToCallNil commented 3 years ago

Hm, yeah, that might work