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

Remove Story types in favor of StoryFn #25341

Closed
Tracked by #25331
yannbf opened this issue Dec 27, 2023 · 4 comments · Fixed by #25477 or #25558
Closed
Tracked by #25331

Remove Story types in favor of StoryFn #25341

yannbf opened this issue Dec 27, 2023 · 4 comments · Fixed by #25477 or #25558
Assignees

Comments

@yannbf
Copy link
Member

yannbf commented Dec 27, 2023

The following renderers need removal of the Story type in favor of the StoryFn type:

Web Components:

* @deprecated Use `StoryFn` instead.

Server:

* @deprecated Use `StoryFn` instead.

Preact:

* @deprecated Use `StoryFn` instead.

HTML:

* @deprecated Use `StoryFn` instead.

Angular:

* @deprecated Use `StoryFn` instead.

Vue3:

* @deprecated Use `StoryFn` instead.

For React, there are more utility types which need removal:

DecoratorFn -> Decorator
Story -> StoryFn
ComponentStoryFn -> StoryFn
ComponentMeta -> Meta
ComponentStoryObj -> StoryObj

Location:

* @deprecated Use `StoryFn` instead.

@yannbf
Copy link
Member Author

yannbf commented Dec 27, 2023

It's unclear to me whether there is already a codemod for this, or how we expect users to migrate.

cc @kasperpeulen @shilman

@shilman
Copy link
Member

shilman commented Dec 28, 2023

@nkabrown
Copy link
Contributor

nkabrown commented Jan 7, 2024

I think the Angular framework was overlooked in PR #25477. It did not remove the Story type from storybook/code/frameworks/angular/src/client/public-types.ts.

@shilman shilman reopened this Jan 7, 2024
@shilman
Copy link
Member

shilman commented Jan 7, 2024

Thanks @nkabrown !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment