-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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]: Subcomponents support #20782
Comments
... and they didn't give us an alernative :( storybookjs/storybook#20782
... and they didn't give us an alernative :( storybookjs/storybook#20782
Our team would also appreciate this feature! |
Thanks for the feedback, keep it coming! Let's try to keep this issue as the canonical place for subcomponents, for everyone to chime in with what their specific needs and use cases are. There are definitely real use cases where functionality like this is valuable. Specifically compound components, where it doesn't make sense to use a single component in isolation. Deprecation ReasonThe biggest issue with the And the current API doesn't leave much room to add features on top of that later, which is why we've decided to deprecate them now, because we're fairly certain that whatever the evolution of the feature will be, it will be in another form. For 7.0 we did a lot of restructuring of doc blocks and docs in general, and we decided to not move WorkaroundWe have documentation for different ways to have multiple components for a story at https://storybook.js.org/docs/7.0/react/writing-stories/stories-for-multiple-components (at the time of writing it still references the Use
|
@JReinhold How long will the workaround to keep the existing 6.5 behavior be available? Are there plans to eventually deprecate the ArgsTable block |
@wilkinsjade the |
Nice! but have a little bit bug... |
I also want to have |
We found this feature particularly useful for our composite structure. I understand why you removed it but I feel this feature does add a lot of value for onboarding our team. |
I'm not sure I see the problem with "the subcomponents API is that it is documentation-only". Many projects use Storybook for documentation and don't necessarily need the controls. Happy to hear that it's not going away until there's an alternative, as for us this feature is very useful! |
+1 for this, we have namespaced components with dot notation Like this example: <Card>
<Card.Body>
</Card.Body>
</Card> |
We in monday-ui-react-core also use |
Also looking for a way to add documentation for compund components using dot notation. How can I use the Tried something like this but it doesn't work:
It yields an error like:
|
I have the same question as @oncet. "Use the |
Time flies and we haven't been able to carve out a new API that would holistically solve the issues that we want, and we don't expect to be able to in the near future. Therefore we've decided to undeprecate the This means that we'll:
|
Is your feature request related to a problem? Please describe
Currently the roadmap involves dropping support for
subcomponents
, which is already done in the latest beta if i'm not mistaken, because it was a half-baked feature, but unfortunately there is no real alternative in place.It's a frequent architecture to have subcomponents in elements like Navigations for example, that need to share the same context.
For example in our case we used this feature in many cases to document sub-components that can be used only in a specific context:
Describe the solution you'd like
Keep the
subcomponents
functionality, or make a convenient alternative.As proposed from @JReinhold in the discord forum, grouping in
ArgsTable
could be used: https://storybook.js.org/docs/react/writing-docs/doc-block-argstable#groupingwhich have the following pros and cons:
subcomponents
feature was implicitly inferring the propsDescribe alternatives you've considered
Keep the subcomponents until there is a valuable alternative, and maybe to avoid confusion, flag the subcomponent tabs, so users can understand that those tabs are not interactive rather than demonstrating the props the components can use.
Are you able to assist to bring the feature to reality?
no
Additional context
No response
The text was updated successfully, but these errors were encountered: