-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Feature Request]: Upgrade Primary
, Title
, Subtitle
and Stories
blocks to the new v7 blocks API
#22490
Comments
@italoteix this is something you might like to contribute to! |
@yannbf is this issue open to anyone who wants to contribute? |
|
Primary
, Title
and Subtitle
blocks to the new v7 blocks APIPrimary
, Title
, Subtitle
and Stories
blocks to the new v7 blocks API
May I pick up the Title? |
Go ahead @Beadko |
May i pick up Primary / Stories? |
May I pick the Primary block? |
I've assigned @ssingh3856 to Stories and @Idan-Garay to Primary. |
I see that there are people already working on each of the blocks but if there is something else that needs to be taken care of feel free to assign it to me. |
Hi, is this issue still open, Can I work on this issue? |
@JReinhold can I work on this issue, is this still open? |
@Dvinod1 and anyone else, you're free to open a pull request that fixes any of this. From now on no one is "reserving" a block here, anyone can open a PR. |
Partially implements storybookjs#22490
Partially implements storybookjs#22490
Partially implements storybookjs#22490
Enable `*.stories.mdx` in Storybook config. Comment out Subtitle from Icons story to avoid error: "Error: No primary story defined for docs entry. Did you forget to use `<Meta>`?" This error seems to be related to: storybookjs/storybook#19964 storybookjs/storybook#22490
Enable `*.stories.mdx` in Storybook config. Comment out Subtitle from Icons story to avoid error: "Error: No primary story defined for docs entry. Did you forget to use `<Meta>`?" This error seems to be related to: storybookjs/storybook#19964 storybookjs/storybook#22490
Is your feature request related to a problem? Please describe
Storybook v7 introduced a new API for doc blocks that is based on an
of
prop and change in parameters location. See https://storybook.js.org/blog/storybook-7-docs/#doc-blocks-api-is-powerful-yet-simpleHowever the blocks
Primary
,Title
andSubtitle
were not fully migrated to the new API.Describe the solution you'd like
Each block should be changed to match the general blocks API, similar to how eg. the
Description
block is implemented: https://github.com/storybookjs/storybook/blob/next/code/ui/blocks/src/blocks/Description.tsxIt's important that the changes are backwards compatible, and the current usage is still supported, but with a deprecation warning.
Primary
of
prop viauseOf
- only the"meta"
type is valid herename
prop, or no prop at all (infers the current component)Title
of
prop viauseOf
- only the"meta"
type is valid herechildren
prop should not be deprecatedSubtitle
— #22552 by @joaonunomotaof
prop viauseOf
- only the"meta"
type is valid hereparameters.docs.subtitle
parameters.componentSubtitle
children
prop should not be deprecated.Stories
of
prop viauseOf
- only the"meta"
type is valid heretitle
fromparameters.docs.stories.title
includePrimaryStory
fromparameters.docs.stories.includePrimaryStory
Additional context
These changes are rather small, so they can be made in one PR or in 4 different PRs. Any new or experienced contributor is free to pick these up.
The text was updated successfully, but these errors were encountered: