Skip to content
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

Disable CloudFlare Rocket loader on dark mode script #1045

Merged
merged 1 commit into from Nov 6, 2022

Conversation

QuLogic
Copy link
Contributor

@QuLogic QuLogic commented Nov 1, 2022

If it's enabled, then the initialization of the dark mode does not occur early enough, and the page will flash from light-to-dark if that was the saved theme.

See the CloudFlare documentation for details:
https://support.cloudflare.com/hc/en-us/articles/200168056-Understanding-Rocket-Loader

Fixes #959

I've temporarily added this on https://matplotlib.org so you can see that this is working. It is not added on any other page, which you can use for comparison.

@12rambau
Copy link
Collaborator

12rambau commented Nov 1, 2022

Thanks for this PR. As we already discussed it's a very specific fix but completely harmless for the rest of the site so I'm +1 for merging. I think it also solved #943.

@12rambau
Copy link
Collaborator

12rambau commented Nov 1, 2022

the doc is not build because scipy documentation site is not accecible right now (scipy/docs.scipy.org#69) I'll relaunch the build this is solved

QuLogic added a commit to matplotlib/matplotlib.github.com that referenced this pull request Nov 3, 2022
If it's enabled, then the initialization of the dark mode does not occur
early enough, and the page will flash from light-to-dark if that was the
saved theme.

See the CloudFlare documentation for details:
https://support.cloudflare.com/hc/en-us/articles/200168056-Understanding-Rocket-Loader
Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - thanks for the extra context

@12rambau 12rambau merged commit 5aaf368 into pydata:main Nov 6, 2022
@QuLogic QuLogic deleted the fix-cf-rocket branch March 11, 2023 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Page is unstyled by default due to dark option
3 participants