-
Notifications
You must be signed in to change notification settings - Fork 15
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
FIX: Refactor & adjustments for better functionality #14
base: main
Are you sure you want to change the base?
Conversation
@@ -70,6 +70,7 @@ Have you selected two different themes for your dark/light schemes in user prefe | |||
lightTheme.media = "none"; | |||
|
|||
Session.currentProp("defaultColorSchemeIsDark", true); | |||
Session.currentProp("darkModeAvailable", true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's that for? Is it used (read) in this theme component? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I found that if your system is set to dark mode, and you click toggle light color scheme
the logo would not change. Adding these Session.currentProp
methods fixed this. Here is where it is used in core.
The only draw back is now, when changing your system from either dark to light, and this component is set to auto
, the page needs a refresh to load the correct logo. I feel the middle ground I've come to is fine for this component.
I also contemplated turning off
the auto select.
I pulled this locally @jordanvidrine and the original issue here seems to be due to these lines:
When this component sets Instead, I think the component can directly manipulate the When cookie is set to light, set light scheme stylesheet to |
When users who had their system set to dark mode used the
toggle light scheme
, the logo would remain as a dark-mode logo. This has now been fixed.I made the toggle appearing in the header the default in addition to appearing in the hamburger menu. I also changed the setting wording to "remove" the toggle from the header should an admin decide to do so.