boostorg / website-v2

New Boost website
https://boost.io
Boost Software License 1.0
8 stars 13 forks source link

Site should stick with user's choice of light or dark mode #1462

Open cdw9 opened 3 days ago

cdw9 commented 3 days ago

I'm regularly seeing the site switch to dark mode, and sometimes an in-between version with a dark wrapper and light content. Seen in Chrome and Firefox

Steps to reproduce:

The new tab will open, and you'll stay on the libraries page. Without doing anything else, the page will switch to dark mode.

Now if you look at the tab you opened, it will be in light mode. If you open another link in a new tab, it will display light mode, but the first link you opened will display dark mode.

I haven't found a way to consistently reproduce the in-between version. The moon displays, but clicking it changes the wrapper to light mode.

Image

rbbeeston commented 3 days ago

This is probably also related to a similar issue where opening the search after changing the theme retains the old theme. Ultimately it's a state issue, and might be better managed on the backend rather than the front-end.

@GregKaleka, your thoughts?

GregKaleka commented 2 days ago

We could handle theming on the backend, though it would require moving the setting from localstorage to a cookie (I believe there's some sensitivity to that for anonymous users).

GregKaleka commented 2 days ago

Also FWIW, I can't reproduce this in Safari (haven't tried chrome or ff).