scylladb / sphinx-scylladb-theme

The documentation toolchain for Scylla projects.
https://sphinx-theme.scylladb.com
Apache License 2.0
12 stars 14 forks source link

chore: replace localstorage with cache #1257

Closed dgarcia360 closed 1 month ago

dgarcia360 commented 1 month ago

Closes #1230

Closes #1231

This update switches from using local storage to cookies for storing user preferences across different domains. Additionally, it ensures that system preferences for dark mode are respected.

By definition, cookies are shared between domains, whereas local storage is not.

How to test

Testing locally can be challenging since we don't have two projects using the updated theme. However, you can verify that preferences for the dark theme and the expanded bar are retained across domains using the same theme. You can also manually define the dark theme preference in Chrome using this guide.

To perform this test, ensure you're in incognito mode with a clean cache.

annastuchlik commented 1 month ago

Looks good. Let's release this fix and test it on other projects once the conflicts are resolved in this PR.