Skip to content
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

[Bug]: Unclear instructions for migrating manager configuration #25718

Closed
yannbf opened this issue Jan 23, 2024 · 4 comments · Fixed by #26039
Closed

[Bug]: Unclear instructions for migrating manager configuration #25718

yannbf opened this issue Jan 23, 2024 · 4 comments · Fixed by #26039

Comments

@yannbf
Copy link
Member

yannbf commented Jan 23, 2024

Describe the bug

When creating custom themes or configuring Storybook's UI, in Storybook 7 users would have the dependency @storybook/addons and something like this in their manager.js/ts file:

.storybook/manager.ts
import { addons } from '@storybook/addons'
import { create } from '@storybook/theming/create'

const theme = create({
  base: 'light',
  // ...the properties
})

addons.setConfig({
  theme,
  showPanel: true, // show addons panel by default
  panelPosition: 'right', // position addons panel on the right by default
})

In Storybook 7, @storybook/addons was split into @storybook/manager-api and @storybook/preview-api but the migration notes don't really seem clear about what to do in the scenario just described.

When a user upgrades Storybook, they reach the following error:
image

I'd say we should improve the migration notes, but optimally provide an automigration for this.

@yannbf yannbf added this to the 8.0-beta milestone Jan 23, 2024
@Jkker
Copy link

Jkker commented Jan 23, 2024

Bump. As of 8.0.0-alpha.13, the addPanel API used in the migration docs is not available in "@storybook/manager-api"

@vanessayuenn
Copy link
Contributor

@Jkker can you link where addons.addPanel() is used? It has been deprecated since 7.x in favour of addons.add() and we should update the docs if it's still there.

@kylegach
Copy link
Contributor

Fwiw, addPanel does not appear anywhere in the 7.6 or 8.0 docs.

@kylegach
Copy link
Contributor

I added a note to MIGRATION.md here: #26039

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants