Storybook: Upgrade Storybook to 10.3#77382
Conversation
|
Size Change: 0 B Total Size: 7.75 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 72955b0. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24460462135
|
On my machine the old Storybook build takes 1min20s, while with this PR it goes up to 12min. Something horrible is going on. I suspect it's related to Turning off |
|
The build times go back to normal when I disable the |
|
After I disable
|
|
Nice find, @jsnajdr 👍 Yeah, I think it's fine to disable that as long as the regression doesn't return. And it sounds like it's separate problem from the component import resolution. |
|
The "Prop type error" and "No component file found" errors happen because the manifest generator fails to read the component info with The storybookjs/storybook#34386 issue is very closely related. The reporter has the same problem, and tried to work around by creating a custom This is a problem only in the manifest generator, which is quite independent from the main storybook build. There, when generating the stories for components and their props docs, At this moment I don't know how to solve this, it will probably require an upstream patch. |
|
Nice discovery @jsnajdr . I had also stumbled on storybookjs/storybook#34386 but wasn't entirely confident it was related. It was also the reason I added the commented I wonder if there's some option to temporarily patch/override |
The main problem is that the manifest generator code is almost completely independent from the rest of Storybook, and does things its own way. And it's a very new code (2 months old) that is not battle-tested. The main Storybook build uses you can see it does a tremendous amount of preprocessing and wrapping before actually creating the docgen instance with The manifest generator doesn't reuse this at all, it has its own code to load the TS project and create the docgen instance. It's much simpler, but doesn't work for our case. |

What?
Updates Storybook to the latest version (10.3.5 at time of writing).
Draft: Two problems to explore:
npm run storybook:buildis painfully slow. Was it always this slow?Why?
As identified in #77112, current component manifests produce incorrect results. One of the proposed action items there was to explore whether newer versions of Storybook and its related dependencies improve the outcome without workarounds like proposed in that pull request.
Additionally, this is also just general good code health maintenance to keep up to date with the latest features and bug fixes. Of note, Storybook 10.3 includes stable support for its MCP feature (which we indirectly leverage through the
componentsManifestfeature) as well as general accessibility improvements.Testing Instructions
Verify that development and built outputs produce navigable stories, preserving existing expectations of Storybook that commonly regress in upgrades like like component descriptions, prop tables, code snippets.
Use of AI Tools
No AI was used in the upgrade itself at time of writing, though working through remaining issues is likely expected to leverage AI for troubleshooting.