Open Sidnioulz opened 1 week ago
@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.
@Sidnioulz it's probably this PR from a long time ago that I forgot about. Will try resurrecting it now https://github.com/storybookjs/storybook/pull/26633
@Sidnioulz Resurrected here https://github.com/storybookjs/storybook/pull/29655 and it should already be supported in the index
@shilman thanks!
When I get round to addressing this, I'll open a PR to extend the tags intersection logic to group entries then.
I've opened the PR on the Storybook side. Once it's merged, I'll be able to make the necessary changes:
group
to display optionsgroup
in the defaultConfig
for relevant badges
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)
Originally posted by @Fedduh in https://github.com/Sidnioulz/storybook-addon-tag-badges/issues/15#issuecomment-2482303149