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

[v2] Toggle theme component not reacting on change system theme #2295

Closed
popuguytheparrot opened this issue Feb 18, 2020 · 5 comments · Fixed by #2325
Closed

[v2] Toggle theme component not reacting on change system theme #2295

popuguytheparrot opened this issue Feb 18, 2020 · 5 comments · Fixed by #2325
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@popuguytheparrot
Copy link

🐛 Bug Report

(A clear and concise description of what the bug is)

Have you read the Contributing Guidelines on issues?

yes

To Reproduce

  1. start new project
  2. go to system settings
  3. change system theme
  4. Toggle not change on current theme

Expected behavior

Toggle will display the current theme

Actual Behavior

Site theme changed but Toggle icons not reacting on changes.

(Write what happened. Add screenshots, if applicable.)
image

alpha.43

@popuguytheparrot popuguytheparrot added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Feb 18, 2020
@popuguytheparrot
Copy link
Author

https://v2.docusaurus.io/ has same problem

@yangshun yangshun removed the status: needs triage This issue has not been triaged by maintainers label Feb 18, 2020
@yangshun
Copy link
Contributor

I'm not able to reproduce this. Once you toggle it manually, we write the value to localStorage and the system value no longer affects it. Please try on incognito mode and see if the same thing happens.

@popuguytheparrot
Copy link
Author

popuguytheparrot commented Feb 18, 2020

@yangshun i change system theme and a Toggle not reacting on this

I did it on Windows 10

@yangshun
Copy link
Contributor

i change system theme and a Toggle not reacting on this

Did you try incognito mode? Could you clear your localStorage and try again?

Is it just the toggle? Does the rest of the website respond to the change in the theme? A video recording would be helpful.

Sorry. I did it on Windows 10

Unfortunately I don't have Windows and can't really debug there. If you have time I recommend you try debugging it. It's not very complicated. The relevant code can be found in docusaurus/packages/docusaurus-theme-classic/src/index.js

@lex111
Copy link
Contributor

lex111 commented Feb 18, 2020

@popuguytheparrot good catch, I see this bug, it will be fixed in the next release!

@lex111 lex111 added this to the v2.0.0-alpha.44 milestone Feb 23, 2020
@yangshun yangshun changed the title V2. Toggle theme component not reacting on change system theme [v2] Toggle theme component not reacting on change system theme Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants