Add frontend "color mode" state to the ui cookie #4308
Labels
💻 aspect: code
Concerns the software code in the repository
🌟 goal: addition
Addition of new feature
🟨 priority: medium
Not blocking but should be addressed soon
🧱 stack: frontend
Related to the Nuxt frontend
Milestone
Important
The implementation plan originally specified storing a
systemValue
representing the actual media query value of "prefers-color-scheme" in the color mode state. This was deemed unnecessary and removed in this issue.The implementation plan also called for, eventually, adding detection in our infrastructure to bypass caching when a dark/light mode cookie was present for the user. By using the existing ui cookie, we bypass the need for any infrastructure changes here.
Update the frontend UI store to include a colorMode. This is a representation of whether the site should display in "light", "dark", or "system" (the default) color mode. We need functionality to:
force_dark_mode
feature flag from Add a feature flag to force dark mode #4303 is on..light-mode
or.dark-mode
added in Add a feature flag to force dark mode #4303 needs to be updated to read from the ui store.Here is a diff that should represent the necessary changes to the store and cookie. Please update tests as well to accompany these changes.
The text was updated successfully, but these errors were encountered: