Draft: Start to decouple dark mode from nav theme
What does this MR do and why?
Contrast theme
Test out separating dark mode from nav themes. Add theme
user preference
Also adds experimental 'System' theme option!
Todos:
-
rename ColorMode to ContrastTheme or ContrastMode -
use enum instead of plain strings for names -
split up this MR -
backwards-compatible FE changes first -
Add feature flag -
Change gl-dark
selector to use data attributes, allow automatic mode
later:
-
Rename Theme to NavTheme -
Rename ColorScheme to something with "SyntaxHighlighting" in the name
Screenshots or screen recordings
Screen_Recording_2022-10-14_at_12.59.31_pm
How to set up and validate locally
- run migration
- Toggle light/dark
- Check different nav themes work
Todos and difficulties
- The 'theme' is currently just a string of light/dark. We probably want some model like for nav themes
- The name 'theme' is already taken by nav themes. Can we rename these to navigation_themes? Is that too much hassle?
- Needs migration for users with dark mode theme currently to dark / dark themes
Edited by Simon Knox