-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix layout preferences on Firefox #1011
Conversation
Hey, awesome! Is there a timeline for when this might get merged? Looking at the list of other PRs though it seems highly unlikely this will actually get merged in the next few months though :-/ |
Would love to see this merged! It's getting a bit tedious to toggle and retoggle dark mode every time I open DevDocs in Firefox (ie. fifty times a day :) ) |
There is no exact timeline, but I'm pretty sure we can get it merged & deployed in about 2-4 weeks, which is already a lot better than those few months. We've had a maintainers chat about a month ago in which we discussed the future of DevDocs (now that the original creator is no longer working on it) and we came up with a plan for the next deployment. Basically, we want to get all non-scraper PR's (except for #986) merged first, after which we can get the scraper PR's going. This comes down to this PR and all those with either the feature or the improvement label. I have already reviewed all PR's that aren't mine, and @j-f1 can probably review my PR's next week. After these PR's are reviewed we can (finally!) run our first deployment since the project got handed over to freeCodeCamp, with hopefully many more to come. |
Thanks so much for the update, @jmerle! I can tell it's been a long road - I'm excited for that update! |
Superseded by #1022. |
Currently layout preferences are loaded based on the cookies sent in the HTTP request to devdocs.io. This does not work on recent versions of Firefox, as has been reported in #992.
After this PR is merged, layout preferences are also loaded locally based on the user's stored cookies. By loading preferences client-side, we no longer need to rely on the optional
Cookie
header. This fixes #992.Locally loading layout preferences happens before the content is shown, so there is no flickering between light and dark themes on slow connections. Performance does not seem to be affected neither.
The code to load the layout preferences based on the cookies sent with the HTTP request has not been removed as there seem to be some dependencies between that code and the AppCache-related code.