-
Notifications
You must be signed in to change notification settings - Fork 57
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(www): themes toggle #34
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
hi @emiliosheinz now the system's prefers-color-scheme stopped working CleanShot.2024-03-15.at.10.46.27.mp4 |
@guilhermerodz thank you for noticing. Weird that in my second video, when I change my system theme, it successfully changes the website theme. I'll look into that shortly but any thoughts are welcome. |
@guilhermerodz, I have tested it locally, and based on my understanding, it is working as expected. The implementation I have employed ensures that the selection made on the website will always take precedence. In essence:
IMO having the preferred color scheme taking precedence over what is selected on the website will make the feature confusing for users since they might have a prefer color scheme set and when they try to change the theme on the header nothing will happen. Basically, in your example the preferred color scheme didn't work because Dark was selected. To have your preferred color scheme applied you need to select System. Video showcasing what I explained above: Screen.Recording.2024-03-15.at.16.10.28.movPlease, let me know your thoughts or concerns about this approach. |
The theme isn't updating when there's no prefers-color-scheme, or if there's prefers-color-scheme:dark CleanShot.2024-03-15.at.23.31.14.mp4I still haven't debugged deeply to understand what's happening |
@guilhermerodz Sorry for asking but are you sure you are testing the right branch? 😅 I'm asking because the behavior you described in your previous message and video is exactly what I'm fixing with this PR. When testing the theme toggle on https://input-otp.rodz.dev/ the behavior is exactly as in your video, but when trying the same thing on the branch with the fixes I applied it works as expected. Could you please double check and let me know the results? Sorry if I'm missing something really obvious here. Thanks! See the proof below: Screen.Recording.2024-03-16.at.10.31.35.mov |
@guilhermerodz Did you have the chance of circling back to this? I would love to hear your thoughts. |
Theme changes were only being applied when made from the system; however, when attempting to change it from the application header, the changes were not reflecting within the app.
Before:
Screen.Recording.2024-03-14.at.20.47.25.mov
After
Screen.Recording.2024-03-14.at.20.46.19.mov