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

docs: fix dark mode flashing bug #1032

Merged
merged 3 commits into from
Feb 7, 2022
Merged

Conversation

theoephraim
Copy link
Contributor

Addresses #686

Currently multiple having multiple browser tabs open to the docs site creates some crazy flickering.

Also reloading the page creates inconsistent behaviour switching between dark/light mode.

This removes a bunch of extra code that was trying to mess with dark mode on page load that from what I can tell, seems unnecessary.

I believe the goal was to get the SSG of the site to include a "light" class on the body tag, but it appears from the current docs site page source that it wasn't actually working anyway...

Also

  • now showing the dark/light mode toggle in the bottom left corner of the page
  • removed what seemed to be unnecessary and broken copying of the pinia bundle into the docs site assets

@netlify
Copy link

netlify bot commented Feb 4, 2022

✔️ Deploy Preview for pinia-official ready!

🔨 Explore the source changes: 7ced7c4

🔍 Inspect the deploy log: https://app.netlify.com/sites/pinia-official/deploys/6201927ffeef9e00087a56f3

😎 Browse the preview: https://deploy-preview-1032--pinia-official.netlify.app

@theoephraim
Copy link
Contributor Author

@plitter - fixed!

@posva posva changed the title [docs] fix dark mode flashing bug docs: fix dark mode flashing bug Feb 7, 2022
Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

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

Thanks a lot! I added a few final touches to fix the initial theme

packages/docs/package.json Outdated Show resolved Hide resolved
@posva posva linked an issue Feb 7, 2022 that may be closed by this pull request
@posva posva merged commit ec9cdc4 into vuejs:v2 Feb 7, 2022
@ghost
Copy link

ghost commented Feb 21, 2022

I still see it

chrome_JXOy2ie1AG.mp4

@theoephraim
Copy link
Contributor Author

@web2033 - have you confirmed its not a cached version of the page?

@ghost
Copy link

ghost commented Feb 21, 2022

Yes.
For me, it flickers when in auto (light) mode.
In dark mode, it works without flickering.

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.

docs page flickering
3 participants