Skip to content

Storybook: Declare workspace dependencies for theme example story#78979

Merged
manzoorwanijk merged 1 commit into
trunkfrom
storybook/declare-theme-example-dependencies
Jun 5, 2026
Merged

Storybook: Declare workspace dependencies for theme example story#78979
manzoorwanijk merged 1 commit into
trunkfrom
storybook/declare-theme-example-dependencies

Conversation

@jameskoster
Copy link
Copy Markdown
Contributor

What

Declare explicit @wordpress/* workspace dependencies in storybook/package.json for packages imported by the Theme Provider example application story and the with-router decorator.

Added to devDependencies:

  • @wordpress/admin-ui
  • @wordpress/element
  • @wordpress/icons
  • @wordpress/private-apis
  • @wordpress/route
  • @wordpress/ui

(@wordpress/theme was already declared.)

Why

Follow-up to #78814 which introduced imports from @wordpress/admin-ui, @wordpress/route, and related packages in the storybook workspace, but only @wordpress/theme was listed in storybook/package.json.

@manzoorwanijk noted in review that newly used dependencies should be declared explicitly. This aligns with workspace development guidance.

How

Add file:../packages/<name> references to storybook/package.json (same pattern as other root-level workspaces such as routes/* and test/*, adjusted for storybook’s directory depth) and update package-lock.json via npm install --workspace=@wordpress/storybook.

Test plan

  • Confirm npm install completes without errors
  • Confirm Storybook still builds: npm run --workspace @wordpress/storybook storybook:build
  • Open Design System / Theme / Theme Provider / Example Application and verify the story renders correctly (Page header, breadcrumbs, themed components)

Explicitly list @WordPress packages imported by the theme example application story and with-router decorator so the storybook workspace does not rely on hoisted phantom dependencies.

Co-authored-by: Cursor <[email protected]>
@jameskoster jameskoster requested a review from manzoorwanijk June 5, 2026 11:37
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: jameskoster <[email protected]>
Co-authored-by: manzoorwanijk <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Copy Markdown
Member

@manzoorwanijk manzoorwanijk left a comment

Choose a reason for hiding this comment

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

Thank you

@manzoorwanijk manzoorwanijk added the [Type] Code Quality Issues or PRs that relate to code quality label Jun 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Size Change: 0 B

Total Size: 8.21 MB

compressed-size-action

@manzoorwanijk manzoorwanijk enabled auto-merge (squash) June 5, 2026 11:48
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Flaky tests detected in 5069e3b.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27012586795
📝 Reported issues:

@manzoorwanijk manzoorwanijk merged commit a988640 into trunk Jun 5, 2026
46 of 47 checks passed
@manzoorwanijk manzoorwanijk deleted the storybook/declare-theme-example-dependencies branch June 5, 2026 12:12
@github-actions github-actions Bot added this to the Gutenberg 23.4 milestone Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants