-
Notifications
You must be signed in to change notification settings - Fork 613
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
base: main
Are you sure you want to change the base?
Conversation
|
👋 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! |
size-limit report 📦
|
There was a problem hiding this 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 rootpackage.json
. - Updated Storybook config files (
main.ts
,manager.jsx
,theme.js
, accessibility tool) to use new import paths. - Refactored all
.stories.tsx
files to importMeta
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 forIconButton
,WithTooltip
, andTooltipLinkList
instead of importing from internal modules.
import {IconButton, WithTooltip, TooltipLinkList} from 'storybook/internal/components'
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
Removed