You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
martyanovandrey
changed the title
Bug: Save Theme Preference Using LocalStorage Instead of SessionStorage
Save Theme Preference Using LocalStorage Instead of SessionStorage
Dec 13, 2024
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:
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:
Code Context:
client/src/utils.ts
Line 116 in 476ae92
The text was updated successfully, but these errors were encountered: