-
-
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
Sidebar subheadings unexpectedly appearing #11692
Comments
@astrotim Do you think you could help me reproduce this? I'm sure there's a bug / unwanted feature in there, but in our official storybook example (which does use a combination of storieOf, MDX, CSF) Do you have any pointers to what you think might be the cause of this? |
@ndelangen I haven't been able to spot any clues on this one, but I'll try reproducing it on a branch in the Storybook example and see how that goes. |
Thanks @astrotim 👍 |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
I was also stumped by the subheading logic. Seems to only appear when components are put into a folder with no root component/story. However, on auto-reload it sometimes appears *once if the path root string doesn't match the folder name it's in. But it goes away on reload :) |
Can you try upgrading to 6.1 and see if it's fixed with the new sidebar?
|
OK, will do! |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Here's the docs on "roots"... |
Closing this for now. Please let me know if there's more to be done here! |
Since upgrading from
v6-beta
tov6-rc
, we've noticed that some stories are getting the non-expandable groupings in the sidebar while others aren’t, and I can’t see any difference in how they are implemented.For example our MDX page for Button appears in a folder in alphabetical order.
It is marked up with the Meta component
while our MDX page for List appears with a subheading, at the end of the alphabetical list. It is marked up the same
The configuration of these two components is very similar.
Note: we use
ComponentName.stories.mdx
andComponentName.story.js
simply to make the MDX appear before the CSF in the navigation order.To Reproduce
We don't have any public-facing URLs to share unfortunately, but the Storybook admins may have access to view our Chromatic builds. There are also some illustrative screenshots below.
Chromatic build using v6-rc which demonstrates the appearance of 6 subheadings below the main alphabetically ordered story list.
Expected behavior
I expected not to see subheadings since there were no code changes related to opting in to this appearance.
Chromatic build using v6-beta which shows the same 6 components folders in alphabetical order without any sub headings.
Screenshots
After: v6-rc.3 (sub headings appearing - screenshot simplifed for brevity)
Before: v6-beta (no subheadings - screenshot simplifed for brevity)
Code snippets
If applicable, add code samples to help explain your problem.
System:
Results of
npx -p @storybook/cli@next sb info
- TBDPackages installed:
Additional context
We have worked around this for now by disabling the subheadings via:
But we would like to evolve towards using the subheadings, so it would be great to understand why and how to use them properly.
The text was updated successfully, but these errors were encountered: