Skip to content

refactor: migrate from @storybook/addons to manager-api for Storybook 9 #1079

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
Aug 14, 2025

Conversation

ImmortalRabbit
Copy link
Contributor

@ImmortalRabbit ImmortalRabbit commented Aug 9, 2025

Replaced @storybook/addons with storybook/manager-api and storybook/preview-api according to migration guide of storybook to use storybook 9.

Storybook 8:
@storybook/addons split into @storybook/manager-api and @storybook/preview-api

Storybook 9:
@storybook/manager-api and @storybook/preview-api import as storybook/manager-api and storybook/preview-api

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 migrates the codebase from the deprecated @storybook/addons package to the newer storybook/manager-api and storybook/preview-api imports to ensure compatibility with Storybook 9. The migration follows Storybook's official migration guide where the @storybook/addons package was split and reorganized across multiple versions.

  • Updated React hook imports from @storybook/addons to storybook/preview-api in story files
  • Migrated manager-side imports from @storybook/addons to storybook/manager-api
  • Removed the deprecated @storybook/addons dependency from package.json
  • Updated custom addon registration to use the new import structure

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/core/src/data-editor/stories/data-editor.stories.tsx Updated React hooks import to use preview-api
packages/core/src/data-editor/stories/data-editor-repros.stories.tsx Updated React hooks import to use preview-api
package.json Removed deprecated @storybook/addons dependency
.storybook/manager.ts Migrated addons and theming imports to new manager-api structure
.storybook/addons/expand-all/register.mjs Updated addon registration with new manager-api and core-events imports

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ImmortalRabbit
Copy link
Contributor Author

Hi @lukasmasuch,

Could you check discord message or can I email you? I have some questions about release 6.0.4 and would like to help with release of it.

Copy link
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@lukasmasuch lukasmasuch merged commit 8aae076 into glideapps:main Aug 14, 2025
3 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.

2 participants