-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Unable to switch theme back to "light" #6798
Comments
Happens for me too. The only difference is, that I work on a React based Storybook, that has the dark theme and i also use an HTML based Storybook. When switching between them, only localStorage.clear works and i loose all other customisations i made to my storybook. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook! |
Is there any update on this issue? I looked into theming a react storybook and followed the documentation / tutorial, using the dark theme at first. Storybook version: 5.3.0-beta.14 |
@patrick-radulian yes there's been an update here. @ndelangen has updated the recommended theming API here: I don't know if this will fix the issue directly, or whether it's part of a longer-term breaking change that won't be usable until 6.0. In the meantime, the workaround is to run on different ports. @ndelangen can yo comment? |
I removed the code that persists the theme, because the FOUC should no longer happen. |
@patricklafrance woulds you be able to review/test? |
Sorry for the late reply I've updated to storybook 5.3.0-beta.25 (could not updated to beta.30 because of a problem with peer-dependencies right now, as it seems) but the situation is still the same. The same thing is going on with other options apparently - I've tried playing with the panelPosition option, setting it to right and back to bottom - also this is only updated after clearing the localStorage. |
is there any simple option than creating new simple theme ? |
This is getting fixed in #9076 which will hopefully be merged/released soon. |
Yowza!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.28 containing PR #9076 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
Describe the bug
I'm unable to switch the theme back to "light" after using the dark theme. The only resolution is the
localstorage.clear()
hack.To Reproduce
Steps to reproduce the behavior:
import { themes } from '@storybook/theming';
options: { theme: themes.dark }
to show the dark themethemes.light
it does not refresh either.Expected behavior
When I do not set a theme it should reset the theme.
Screenshots
Here's a 📹video of this behavior.
System:
The text was updated successfully, but these errors were encountered: