fix(theme): persist dark mode in localStorage and sync html class - #2194
Conversation
|
Hi @utksh1, |
|
Hi @utksh1, kindly review the code |
utksh1
left a comment
There was a problem hiding this comment.
Reviewed the current diff. The system-theme query now matches the dark preference correctly, and localStorage access is guarded for environments where storage is unavailable while preserving manual overrides and reset behavior. The branch still needs a fresh rebase and required checks before merge.
6bff2b5 to
d8008aa
Compare
|
Fresh required CI is blocked at the shared frontend npm audit gate by high-severity undici advisory GHSA-4cwx-7wf7-3272. This PR does not change dependencies; approval remains in place while the repository-level audit issue is unresolved. |
|
Hi @utksh1, |
…udit vulnerability
c7005ae to
ea9399c
Compare
utksh1
left a comment
There was a problem hiding this comment.
Reviewed the rebased head, including the theme fix and the dependency lockfile conflict resolution. npm ci dry-run and all required CI contexts pass; approved for squash merge.
Description
Fixed the dark/light mode toggle state persistence and DOM synchronization in
ThemeContext.tsx. The theme preference now correctly persists across page reloads usinglocalStorageand dynamically adds/removes thedarkclass on the root<html>element for proper Tailwind CSS styling.Related Issues
Closes #2061
Type of Change
How Has This Been Tested?
http://localhost:5173).darkclass toggles dynamically on the<html>root element.localStorage.Checklist