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]: Storybook 7 - controls missing when navigating from controls: disabled story #21805

Closed
thomassimko opened this issue Mar 28, 2023 · 2 comments · Fixed by #21967
Closed

Comments

@thomassimko
Copy link

Describe the bug

When navigating from a story with controls: disabled to a story that has controls, the controls tab does not reappear. If the user does a hard refresh of the page, the controls reappear. This has been tested using CSF3 on Storybook 7.

export const Primary: Story = {
  args: {
    primary: true,
    label: 'Button',
  },
};

export const Secondary: Story = {
  args: {
    label: 'Button',
  },
  parameters: {
    controls: {
      disable: true,
    },
  },
};

Navigating from Primary to Secondary hides the controls (this is expected).
Navigating from Secondary to Primary does not re-show the controls panel (bug).

Screen.Recording.2023-03-28.at.1.51.22.PM.mov

To Reproduce

Repo: https://github.com/thomassimko/storybook-control-reproduction
Chromatic: https://642351abc3a0198a09dec78d-yvodapsyev.chromatic.com/?path=/story/example-button--primary

System

Environment Info:

  System:
    OS: macOS 13.2.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 16.16.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 111.0.5563.110
    Edge: 111.0.1661.54
    Firefox: 99.0.1
    Safari: 16.3
  npmPackages:
    @storybook/addon-essentials: ^7.0.0-rc.8 => 7.0.0-rc.8 
    @storybook/addon-interactions: ^7.0.0-rc.8 => 7.0.0-rc.8 
    @storybook/addon-links: ^7.0.0-rc.8 => 7.0.0-rc.8 
    @storybook/blocks: ^7.0.0-rc.8 => 7.0.0-rc.8 
    @storybook/react: ^7.0.0-rc.8 => 7.0.0-rc.8 
    @storybook/react-webpack5: ^7.0.0-rc.8 => 7.0.0-rc.8 
    @storybook/testing-library: ^0.0.14-next.1 => 0.0.14-next.1

Additional context

No response

@shilman
Copy link
Member

shilman commented Apr 25, 2023

Great Caesar's ghost!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.1.0-alpha.9 containing PR #21967 that references this issue. Upgrade today to the @future NPM tag to try it out!

npx sb@next upgrade --tag future

@shilman
Copy link
Member

shilman commented May 3, 2023

Son of a gun!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.8 containing PR #21967 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb@latest upgrade

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

Successfully merging a pull request may close this issue.

3 participants