fix: Respect OS theme preference on first load#186
Conversation
|
Hi @imDarshanGK, please let me know if there are any changes needed from my side for the above. |
|
@Ruchika083 Could you please attach the related issue number to this PR for proper tracking? |
|
@imDarshanGK , |
imDarshanGK
left a comment
There was a problem hiding this comment.
@imDarshanGK Please fix the [] attribute regression in [index.html]. The diff changes data-theme to en, which breaks theme initialization. After correcting that, the prefers-color-scheme startup logic can be re-reviewed.
|
@imDarshanGK , I have made the changes, please let me know if there are any changes needed from my side for the above. |
imDarshanGK
left a comment
There was a problem hiding this comment.
The theme-preference fix looks correct and does address issue #178, but this PR is not merge-ready yet because the diff also removes unrelated backend digest files that are already on main. Please rebase this branch onto the latest main and keep only the frontend theme initialization change. After that I can approve and merge.
78aac52 to
20879b6
Compare
Summary
Updated the frontend theme initialization logic to respect the user's OS-level
prefers-color-schemesetting on first load.Changes Made
localStorageif availableprefers-color-schemewhen no saved theme existsFiles Changed
frontend/index.htmlcloses #178
Attached screenshots showing the app correctly respecting OS-level theme preference on first load.