Skip to content

Storybook: Fix Overview doc #104049

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

Merged
merged 4 commits into from
Jun 9, 2025
Merged

Storybook: Fix Overview doc #104049

merged 4 commits into from
Jun 9, 2025

Conversation

mirka
Copy link
Member

@mirka mirka commented Jun 6, 2025

Regression discovered while testing #103000

Proposed Changes

Fixes the "Cannot find module './.storybook/overview.mdx'" error when trying to load the main "Overview" MDX file in Storybook.

Also flattens some of the approved components to the top level.

Why are these changes being made?

This likely regressed in a recent dependency update.

Testing Instructions

yarn components:storybook:start and confirm that the main "Overview" file loads without error.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@mirka mirka self-assigned this Jun 6, 2025
@mirka mirka added Documentation Regression Issues/bugs caused by change in code. Storybook labels Jun 6, 2025
Copy link

github-actions bot commented Jun 6, 2025

@mirka mirka requested a review from a team June 6, 2025 18:07
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jun 6, 2025
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Confirmed no errors on Overview, and affected components / sections are shown as expected.

@@ -4,7 +4,8 @@ module.exports = {
...storybookDefaultConfig( {
stories: [
'../{src,styles}/**/*.stories.{js,jsx,ts,tsx}',
'../{src,styles,.storybook}/**/*.mdx',
'../{src,styles}/**/*.mdx',
'./**/*.mdx',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What files is this intended to match?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're intended to match the MDX files under packages/components/.storybook/. The original glob ../{src,styles,.storybook} used to work fine for this but I think something in the path resolution changed recently.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting that the ../src file matching still works 🤔 Maybe something specifically about traversing up and back into the same directory.

@@ -17,6 +17,7 @@ yarn components:storybook:start
## Special sections

- **WP Overrides**: Automattic-specific overrides for WordPress Core components.
- **Still Internal**: Components that are still internal to the package and not exported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing, but I wonder if this should just be "Internal", or maybe "Unpublished" or "Experimental". There's somethig awkward about "still internal" 😅

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure 😄 7877be0

@mirka mirka merged commit 96d5d9b into trunk Jun 9, 2025
10 of 11 checks passed
@mirka mirka deleted the fix-storybook-overview branch June 9, 2025 15:50
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Regression Issues/bugs caused by change in code. Storybook
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants