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

Migration: Preview default exports #20950

Closed
3 of 6 tasks
shilman opened this issue Feb 6, 2023 · 2 comments · Fixed by #21205
Closed
3 of 6 tasks

Migration: Preview default exports #20950

shilman opened this issue Feb 6, 2023 · 2 comments · Fixed by #21205
Assignees
Labels
csf maintenance User-facing maintenance tasks typescript

Comments

@shilman
Copy link
Member

shilman commented Feb 6, 2023

For preview files we want something like:

import { Preview } from '@storybook/react';

const preview: Preview {
  decorators: [ ... ]
} ;
export default preview;

Similarly to #20554 we want:

  • export Preview from all renderers
  • Update CLI templates
  • Add MIGRATION note
  • Update all documentation
  • Runtime warning for old-style preview.js files
  • add test case to QA matrix

There's already a PreviewAnnotations type in @storybook/csf and we just need to fill in the renderer type in each renderer

Originally posted by @shilman in #20554 (comment)

@shilman shilman added maintenance User-facing maintenance tasks typescript csf labels Feb 6, 2023
@shilman shilman moved this to Required for QA in Core Team Projects Feb 6, 2023
@kasperpeulen kasperpeulen moved this from Required for QA to In Progress in Core Team Projects Feb 20, 2023
@vanessayuenn vanessayuenn assigned JReinhold and unassigned kasperpeulen and yannbf Feb 21, 2023
@JReinhold JReinhold assigned kasperpeulen and unassigned JReinhold Feb 22, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Core Team Projects Feb 23, 2023
@shilman
Copy link
Member Author

shilman commented Feb 24, 2023

Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.54 containing PR #21205 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb@next upgrade --prerelease

@shilman
Copy link
Member Author

shilman commented Feb 25, 2023

Re-opening for documentation fixes & (possibly) runtime warning for old-style files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
csf maintenance User-facing maintenance tasks typescript
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants