Skip to content

refactor: update storybook to v9 #6161

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Jun 3, 2025

Closes #6167

Storybook v9 has officially been released 🥳 This PR updates our dependency on Storybook to use v9. It does not covert all code to the new format, in particular for the code tab, as this will be done in a future PR.

Changelog

New

Changed

  • Update Storybook to v9
  • Update stories to follow new eslint rules
  • Update addons and storybook config to use new storybook package paths

Removed

Copy link

changeset-bot bot commented Jun 3, 2025

⚠️ No Changeset found

Latest commit: 29cc3ac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jun 3, 2025
Copy link
Contributor

github-actions bot commented Jun 3, 2025

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@joshblack joshblack added the skip changeset This change does not need a changelog label Jun 4, 2025
Copy link
Contributor

github-actions bot commented Jun 4, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 94.51 KB (0%)
packages/react/dist/browser.umd.js 94.64 KB (0%)

@github-actions github-actions bot temporarily deployed to storybook-preview-6161 June 4, 2025 17:11 Inactive
@joshblack joshblack marked this pull request as ready for review June 4, 2025 17:15
@Copilot Copilot AI review requested due to automatic review settings June 4, 2025 17:15
@joshblack joshblack requested a review from a team as a code owner June 4, 2025 17:15
@joshblack joshblack requested a review from jonrohan June 4, 2025 17:15
Copilot

This comment was marked as outdated.

Copy link
Contributor

@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 updates the project’s Storybook setup to v9 by bumping dependencies, adjusting config files, and migrating all stories to use the new package paths.

  • Upgraded Storybook-related dependencies to v9 in both packages/react and the root package.json.
  • Updated Storybook config files (main.ts, manager.jsx, theme.js, accessibility tool) to use new import paths.
  • Refactored all .stories.tsx files to import Meta from @storybook/react-vite and updated action addon imports.

Reviewed Changes

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

Show a summary per file
File Description
packages/react/src/Autocomplete/Autocomplete.features.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/src/Autocomplete/Autocomplete.dev.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/src/AnchoredOverlay/AnchoredOverlay.stories.tsx Swapped Meta import; updated actions import to storybook/actions.
packages/react/src/AnchoredOverlay/AnchoredOverlay.features.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/src/AnchoredOverlay/AnchoredOverlay.dev.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/src/ActionMenu/ActionMenu.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/src/ActionMenu/ActionMenu.dev.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/src/ActionList/ActionList.stress.dev.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/src/ActionList/ActionList.stories.tsx Swapped StoryFn, Meta import to @storybook/react-vite.
packages/react/src/ActionList/ActionList.features.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/src/ActionList/ActionList.examples.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/src/ActionList/ActionList.dev.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/src/ActionBar/ActionBar.stories.tsx Swapped Meta, StoryObj import to @storybook/react-vite.
packages/react/src/ActionBar/ActionBar.examples.stories.tsx Swapped Meta import to @storybook/react-vite.
packages/react/package.json Bumped Storybook packages (@storybook/react-vite, icons, csf, a11y).
packages/react/.storybook/theme.js Changed theming import to storybook/theming.
packages/react/.storybook/src/accessibility-tool.tsx Updated imports for globals, components, and icons.
packages/react/.storybook/manager.jsx Updated manager imports for globals and components.
packages/react/.storybook/main.ts Reduced addons list; kept storysource and a11y.
package.json Updated eslint-plugin-storybook to v9.0.4.
Comments suppressed due to low confidence (2)

packages/react/.storybook/src/accessibility-tool.tsx:5

  • Import IconButton from the public @storybook/components package instead of the internal path to avoid relying on unstable internal APIs.
import {IconButton} from 'storybook/internal/components'

packages/react/.storybook/manager.jsx:2

  • Use the public @storybook/components package for IconButton, WithTooltip, and TooltipLinkList instead of importing from internal modules.
import {IconButton, WithTooltip, TooltipLinkList} from 'storybook/internal/components'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Storybook to v9
1 participant