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]: parameters.options are not respected when navigating to a story for the first time #27095

Open
sarkisandreyan opened this issue May 11, 2024 · 0 comments

Comments

@sarkisandreyan
Copy link

Describe the bug

When navigating to a story for the first time, the parameters.options defined for the story are not kicking in, with the options from the previous story (or those defined in preview.js) persisting. The options start taking effect on subsequent visits to the story.

To Reproduce

https://stackblitz.com/~/github.com/sarkisandreyan/storybook-options-issue?file=src/stories/button.stories.ts

Steps to reproduce:

  1. From Button > Primary, navigate to Button > Secondary (parameters.options.showToolbar === true).
  2. Observe the toolbar still being hidden.
  3. Navigate back to Button > Primary, then to Button > Secondary again.
  4. Observe the toolbar showing this time.
  5. Observe all subsequent navigations between Button > Primary and Button > Secondary correctly toggling the toolbar.

System

npmPackages:
  @storybook/addon-docs: ^8.0.10 => 8.0.10 
  @storybook/addon-essentials: ^8.0.10 => 8.0.10 
  @storybook/addon-interactions: ^8.0.10 => 8.0.10 
  @storybook/addon-links: ^8.0.10 => 8.0.10 
  @storybook/angular: ^8.0.10 => 8.0.10 
  @storybook/blocks: ^8.0.10 => 8.0.10 
  @storybook/test: ^8.0.10 => 8.0.10 
  storybook: ^8.0.10 => 8.0.10

Additional context

This seems to be a regression from Storybook v6.

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

1 participant