-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Currently, the theme preference (light/dark mode) for static documentation is being saved in sessionStorage, causing the user-selected theme to reset when the browser/tab is closed. Instead, we should use localStorage to persist the theme preference across sessions, ensuring a consistent user experience.
Steps to Reproduce:
- Change the website theme from the default to another (e.g., from light to dark).
- Close the browser or tab.
- Reopen the browser or tab and revisit the website.
Expected Behavior:
The website should retain the user's theme preference (light or dark mode) upon reopening the browser.
Actual Behavior:
The theme resets to the default as the preference is stored in sessionStorage.
Proposed Solution:
- Update the code to store the theme preference in localStorage instead of sessionStorage.
- Ensure that the theme preference is retrieved from localStorage on page load.
Code Context:
Line 116 in 476ae92
return (sessionStorage.getItem(name) as Settings[T]) || DEFAULT_USER_SETTINGS[name]; |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
In progress