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] Addon backgrounds - There is no "Reset background" option #27190

Open
yannbf opened this issue May 17, 2024 · 1 comment
Open

[BUG] Addon backgrounds - There is no "Reset background" option #27190

yannbf opened this issue May 17, 2024 · 1 comment

Comments

@yannbf
Copy link
Member

yannbf commented May 17, 2024

This is still an issue in storybook 8. There is still no "Reset background" option (as in reset the background to the default of the story).

  1. Go to the Image story:
    https://next--630511d655df72125520f051.chromatic.com/?path=/story/addons-backgrounds-parameters--image
  2. Select "Clear background", the querystring becomes ...&globals=backgrounds.value:transparent
  3. Go the Gradient story (1 step above in the tree)
    image
  4. The background of the Gradient story is still cleared instead of the default "gradient" background because the querystring still contains ...&globals=backgrounds.value:transparent

I agree that the title of this issue can be confusing. It's not about the "Clear background" option being wrong, it's about a "Reset background (to default)" option that's missing.

And combined with the weird behavior that the background is carried over to other stories if it is available, but resets to the default background when it's not available in a story. Which we cannot use as a workaround, because we cannot remove the "Clear background" option from the available backgrounds in a story.

Originally posted by @WesselKroos in #14030 (comment)

@shilman
Copy link
Member

shilman commented May 19, 2024

@tmeasday I think this goes away entirely with global overrides, tho perhaps it's a breaking change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants