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

[bug]: shadcn website light/dark toggle broken #6207

Open
2 tasks done
ejzeronimo opened this issue Dec 28, 2024 · 5 comments
Open
2 tasks done

[bug]: shadcn website light/dark toggle broken #6207

ejzeronimo opened this issue Dec 28, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@ejzeronimo
Copy link

Describe the bug

I had the docs open then started using the theme toggle on the website to see what certain blocks/components would look like in dark mode. After that I set it back to light mode and stepped away. Then this video happened, please be warned it flashes very fast, so I am wrapping the link that way there is no chance it will auto-play when viewing this issue.

https://github.com/user-attachments/assets/757feda6-8c21-44f6-9f6b-854ec58a698a

Not sure if this is an issue with the site or something weird with next-themes but I figured I would make a bug report here to let you know regardless.

Affected component/components

None, this is the shadcn site

How to reproduce

Go to components page.
Toggle themes ~10 times
Leave on light mode
???
(this was all I did)

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

Windows 10, Msft Edge

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@ejzeronimo ejzeronimo added the bug Something isn't working label Dec 28, 2024
@candymask0712
Copy link

Has anyone been able to successfully reproduce this bug? Even when I use the same Windows 10 and Edge browser, I cannot replicate the bug.

@candymask0712
Copy link

@ejzeronimo
Is this bug easily reproducible on ejzeronimo’s computer? I tried about ten times but couldn’t reproduce it, so I’m curious about how frequently it occurs.

@DemaPy
Copy link

DemaPy commented Jan 1, 2025

@candymask0712 cannot reproduce for myself in MacOs. Chrome.

@DALLLLAWEI
Copy link

Reproduce on Windows 11. Edge and Chrome
Open three or more tabs,Increase CPU utilization to 100%
Quick clicking on the theme switch, page will flash

When the CPU is idle or there is only one tab, it cannot be reproduced

When the page flashes, in the Performance tab of DevTools, you will see a loop call to the following two functions
1. 24775-d41bb013d71b5950.js:1:6116

屏幕截图 2025-01-02 222557

2. 86816-a2801b938146f2fe.js:6:1917

屏幕截图 2025-01-02 222543



@ejzeronimo
Copy link
Author

Thank you for finding a way to reproduce the bug!

I have been trying to reproduce it but have been busy preparing for CES.

My bet is this is an issue with next-themes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants