Storybook: Use experimental docgen server#80697
Draft
aduth wants to merge 1 commit into
Draft
Conversation
Member
Author
|
Likely next steps here:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Updates Storybook to use the new React meta docgen service through its new
experimentalDocgenServeroption in Storybook 10.5.0.Note: The pull request in its current shape is heavily AI-coded and I haven't fully reviewed the code changes. It's unlikely that this would land in its current shape, but is useful to understand for context to the chain of pull requests in the stack (#80692, #80655) that it influences.
Why?
The new docgen service is meant to be more performant and accurate, and it's something we already use for the components manifest, so enabling it everywhere also brings consistency between the manifest and live Storybook site.
How?
experimentalReactComponentMetawithexperimentalDocgenServer.react-docgen-typescript, including its settings and related dependencies. The new docgen service is meant to replacereact-docgen-typescript.Unfortunately, this update brings some issues which either block this or will need to be worked through.
@ignoredoes not currently seem to be respected, causing ignored props to be shown on the live Storybook site."v": 1is not compatible in affected clients like the design system MCP server.The latter is a pretty substantial issue, and what we'll likely want to do is extract the pieces here for the "dual client" to make it so that the published
@wordpress/design-system-mcpis capable of handling the new manifest shape before we make that the default in the live Storybook site. We can remove the dual handling later once clients are updated.This is also a reminder of why it's hazardous to try to leverage experimental features, and this is something we "signed up for" by choosing to do so. It may also be prudent to wait for the manifest shape to fully stabilize before committing to this upgrade.
Testing Instructions
TBD
Use of AI Tools
Used Cursor IDE + Auto (likely Composer) model for the sequence of pull requests in this stack of pull requests, reviewed and iterated manually prompted by myself.