New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Themes (aka Dark Mode) not respected on first page loads #12455
Comments
|
Thanks for the issue, we will take it into consideration! Our team of engineers is busy working on many types of features, please give us time to get back to you. Feature requests that require more discussion may be closed. Read more about our feature request process on forem.dev. To our amazing contributors: issues labeled To claim an issue to work on, please leave a comment. If you've claimed the issue and need help, please ping @forem/oss. The OSS Community Manager or the engineers on OSS rotation will follow up. For full info on how to contribute, please check out our contributors guide. |
|
I noticed this bug to this week. I use the Pink theme and it is happening with that one too. |
|
+1 ... except that it does not only happen when loggin in for me... it is almost systematic. I configured the dark theme, and here is what I'm doing
Demo below (of the Navigate ➡ CTRL+F5 ➡ F5 scenario... that's literally all I'm doing) I noticed that forem uses a service worker to avoid reload the entire website on refreshes, or something 🤔... maybe that's coming from this ? |
|
Hi there! We recently removed the majority of our Service Worker caching in #12834 With that change, I believe that this should no longer be an issue going forward. Any chance you could test this again and let us know if it's still a problem? |
|
@mstruve I've followed my reproduction steps above just now and the issue still remained for me |
|
Hey @kallmanation can you try to recreate this one more time? Please! 🙏 |
|
Noticed this bug today. My theme is set to Dark, and saw it with these steps:
|
|
Thanks for the update/confirmation @mariana0pachon . |
|
I noticed this bug again this morning. Just adding to confirm it is still a bug. |
|
I'd like to take this (: |
|
@cmgorton |
|
@oryanmoshe assigning you to it. Thanks for helping out here. If you find in a few days you can't work on it let me know and I will assign @pawelborkar to it. If you have any questions as you are working on it please feel free to ask here or in the PR once created! |
|
Hey @oryanmoshe wanted to check in and see how you are doing with this issue. Did you have any questions or need any help? |
|
Found the issue. PR coming right up... |
|
An approach to fixing this has been agreed over on #14476 - what we are looking at doing is using a custom event to ensure the themes update properly 🙂 |


Describe the bug
When first opening Dev.to (on both mobile & desktop) or when first visiting a new area (going to the dashboard from the homepage; starting a new post) the default theme is shown. This persists for a few page refreshes before my selected theme (night theme) is shown.
To Reproduce
Expected behavior
The theme selected in settings would show after logging in.
Screenshots
First screen after logging in:

Settings page (It was always set to Night Theme; pre-login):

Desktop (please complete the following information):
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: