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]: Controls not showing on first load in 8.5.0 (web components) #30340

Closed
tbz opened this issue Jan 22, 2025 · 7 comments · Fixed by #30638
Closed

[Bug]: Controls not showing on first load in 8.5.0 (web components) #30340

tbz opened this issue Jan 22, 2025 · 7 comments · Fixed by #30638

Comments

@tbz
Copy link

tbz commented Jan 22, 2025

Describe the bug

When upgrading from 8.4 to 8.5.0 in our Lit/web components project we noticed that the controls panel was empty for every story.
When you opened the story a second time the controls would show up as expected/as it did in 8.4.

I can reproduce the same problem in the example project you get when running npx storybook@latest init in an empty folder, and also in the default stackblitz.

Reproduction link

https://stackblitz.com/github/storybookjs/sandboxes/tree/next/lit-vite/default-ts/after-storybook?embed=1&file=README.md

Reproduction steps

  1. If you show the mobile experience, resize window/frame to get the desktop experience
  2. Click on the story Button > Secondary
  3. If not visible, expand the addons panel

Expected result:
Controls show up

Result:
Controls do not show up

Workaround:
Click on another story and then click on Button > Secondary again. The controls are now visible.

System

Storybook Environment Info:

  System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  Binaries:
    Node: 20.18.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD <----- active
  Browsers: {}
  npmPackages:
    @storybook/addon-essentials: ^8.5.0 => 8.5.0 
    @storybook/blocks: ^8.5.0 => 8.5.0 
    @storybook/test: ^8.5.0 => 8.5.0 
    @storybook/web-components: ^8.5.0 => 8.5.0 
    @storybook/web-components-vite: ^8.5.0 => 8.5.0
    storybook: ^8.5.0 => 8.5.0

Additional context

No response

@corbanbrook
Copy link

I am experiencing the same thing.

Controls pane show:

"Interactive story playground
Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."

Clicking on the Actions tab and then back to the Controls tab causes the controls to load properly.

@corbanbrook
Copy link

Also note that if you initialize a storybook project via:

pnpx storybook@latest init

when running in dev mode with npm run storybook I notice the same broken behavior on the Button story example.

@andersonba
Copy link

andersonba commented Jan 28, 2025

Same here! We need to navigate through the panels and then return to the Controls.
I'm using react as framework.

@tbz
Copy link
Author

tbz commented Feb 12, 2025

Did a quick "bisect" by cycling through the 8.5 betas in the sandbox. I could get it to reproduce in beta 10 but not beta 9. My hunch is that this bug is a consequence of this memoization change: 523f051. Will try to verify. Problem persists even with that commit reverted.

@JReinhold
Copy link
Contributor

@valentinpalkovic do you think this is related to the panel logic we fixed recently with the "Code" panel? Can you remember which PR you did that in?

Did a quick "bisect" by cycling through the 8.5 betas in the sandbox. I could get it to reproduce in beta 10 but not beta 9. My hunch is that this bug is a consequence of this memoization change: 523f051. Will try to verify. Problem persists even with that commit reverted.

I would have thought that same change was the issue.

@valentinpalkovic
Copy link
Contributor

valentinpalkovic commented Feb 17, 2025

@JReinhold Is this the PR you have in mind: #30426

If so, it is not merged yet

@smlimasu
Copy link

Angular Storybook here, we were on 8.4.6 for weeks when suddenly controls stopped showing on first load. I can see that it still worked on Feb 6, but it stopped working on Feb 7. When we updated to 8.5.5. on Feb 13, the issue disappeared on this version. New "Code Panel" was not shown in either of them, but i think the culprit relies on some patch between these dates.

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

Successfully merging a pull request may close this issue.

6 participants