-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[admin] dark mode #5511
[admin] dark mode #5511
Conversation
3fcff2f
to
351fc84
Compare
351fc84
to
c1139b2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5511 +/- ##
==========================================
+ Coverage 88.59% 88.62% +0.02%
==========================================
Files 630 631 +1
Lines 15078 15108 +30
==========================================
+ Hits 13359 13389 +30
Misses 1719 1719 ☔ View full report in Codecov by Sentry. |
Otherwise the transparent element would have captured some of them.
This can happen if the list of available locales changes and an old value is stored in the session.
- Save the user preference alongside the system preference so that when the system switches the UI will follow along. - Use the session to store preferences so that we start the page with the correct theme(s). - Keep the current theme in the select tag up to date at page load and whenever the system changes. Add dark and dimmed theme variants dark: Full black background with no alteration on images. dimmed: Dark gray background with dimmed images, easier on the eyes but less accurate colors.
c1139b2
to
b94c635
Compare
Would it be an idea to increase the contrast? With everything being black it is still quite hard on the eyes. |
@victorth yes, ideally we should take the time to refine the values in every TW variable and even have a separate build for each theme. For now the intent was to give a couple of options to avoid a blinding flash of white when the whole system is in dark mode. I'd be happy to review and help merging refinements on the current themes or welcome additional ones if you want to give it a crack 🙌 |
Summary
This PR goes in pair with #4999
The information about which theme to use is stored separately for when the system is in dark mode or otherwise, and can be mixed in any way (e.g. using a dark theme with the system in light mode).
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: