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

Support 'group' entries in sidebar? #20

Open
Sidnioulz opened this issue Nov 18, 2024 · 6 comments
Open

Support 'group' entries in sidebar? #20

Sidnioulz opened this issue Nov 18, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request in progress This is being worked on

Comments

@Sidnioulz
Copy link
Owner

I also have for stories that include the meta with documentation (+ stories) but also include some manual .mdx files with code examples. I noticed that for these folders, the tags also don't show up.

(but maybe that's an odd setup I use..)

(for these 'groups' the icon is also a folder, instead of the component square icon)
image

Originally posted by @Fedduh in #15 (comment)

@Sidnioulz Sidnioulz self-assigned this Nov 18, 2024
@Sidnioulz Sidnioulz added the enhancement New feature or request label Nov 18, 2024
@Sidnioulz
Copy link
Owner Author

@Fedduh the problem we have with this issue is that 'group' entries don't have a tags definition in the sidebar.

For component entries, we agreed with the Storybook core team to define their tags as the intersection of their contents' tags... which coincides with what you define in the meta export of a CSF.

For group entries like yours, I suspect the MDX pages would not have associated tags. So, the intersection of tags for all group entries would be empty.

@shilman I'm curious if there's a good way to define metadata like tags on freeform MDX entries? If there is such a mechanism, I could try to extend the logic we used for component to group HashEntries.

@shilman
Copy link
Collaborator

shilman commented Nov 19, 2024

@Sidnioulz it's probably this PR from a long time ago that I forgot about. Will try resurrecting it now storybookjs/storybook#26633

@shilman
Copy link
Collaborator

shilman commented Nov 19, 2024

@Sidnioulz Resurrected here storybookjs/storybook#29655 and it should already be supported in the index

@Sidnioulz
Copy link
Owner Author

@shilman thanks!

When I get round to addressing this, I'll open a PR to extend the tags intersection logic to group entries then.

@Sidnioulz
Copy link
Owner Author

I've opened the PR on the Storybook side. Once it's merged, I'll be able to make the necessary changes:

  • Add group to display options
  • Include group in the defaultConfig for relevant badges

@Sidnioulz Sidnioulz added the in progress This is being worked on label Nov 23, 2024
@Sidnioulz
Copy link
Owner Author

Storybook PR merged! I'll work on this once Storybook 8.5 is officially released :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress This is being worked on
Projects
Status: In progress
Development

No branches or pull requests

2 participants