Skip to content

feat(storybook): upgrade to Storybook 9 ✨ #230

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
Jul 8, 2025

Conversation

JamesIves
Copy link
Contributor

@JamesIves JamesIves commented Jun 18, 2025

Makes the necessary adjustments for migration to Storybook 9. This is a breaking change, and should likely be a major version due to the peer dependency changes.

  • Storybook now depends on Node 20+, as such lts/jod is now used.
  • Followed the Storybook migration guide for addons and Storybook itself to ensure both the doc site and the addon builds and operates correctly.
  • Installed remark-gfm as the tables in the doc site were broken.
  • Made a few adjustments to the CI job as it was not validating the build, nor was it validating the code style.
  • Adjusted the peer dependency range for React so it supports 19+.
Screenshot 2025-06-18 at 9 51 37 AM

Closes #228 #226

Copy link

netlify bot commented Jun 18, 2025

Deploy Preview for storybook-addon-mock ready!

Name Link
🔨 Latest commit f2ed71f
🔍 Latest deploy log https://app.netlify.com/projects/storybook-addon-mock/deploys/6852c54f17008300098f4262
😎 Deploy Preview https://deploy-preview-230--storybook-addon-mock.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the project to Storybook 9 with the necessary changes for module import paths, dependency versions, and CI workflows. The key changes include:

  • Updating import paths for Storybook modules across the mock addon and docs packages.
  • Adjusting dependency and peer dependency versions, including updating Storybook and React support.
  • Replacing the old CI workflow with a new build validation workflow.

Reviewed Changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/mock-addon/src/withRoundTrip.js Updated internal Storybook module import paths.
packages/mock-addon/src/preset/manager.js Updated internal Storybook module import paths.
packages/mock-addon/src/components/MockItem/index.js Updated theming and control component import paths as per migration.
packages/mock-addon/src/components/ErrorItem/index.js Updated theming import path.
packages/mock-addon/src/components/Card/index.js Updated theming import path.
packages/mock-addon/src/components/ButtonToggle/index.js Updated theming import path.
packages/mock-addon/src/Panel.js Updated Storybook API and component import paths.
packages/mock-addon/package.json Updated Storybook versions and peer dependency ranges.
packages/mock-addon-docs/stories/docs/*.mdx Updated MDX files to use the new addon-docs/blocks import.
packages/mock-addon-docs/package.json Upgraded Storybook-related dependencies and added remark-gfm.
packages/mock-addon-docs/.storybook/main.js Added absolute path resolution for preset import and remark-gfm config.
.nvmrc Updated Node LTS version to lts/jod.
.github/workflows/nodejs.yml Removed outdated CI workflow.
.github/workflows/build.yml Added new CI workflow for build validation and code style checks.

Copy link
Collaborator

@nutboltu nutboltu left a comment

Choose a reason for hiding this comment

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

Thanks @JamesIves for looking into this upgrade!

@nutboltu nutboltu merged commit 4908ed5 into linearlabs-workspace:master Jul 8, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Storybook 9] Addon compatibility - Update needed
2 participants