-
-
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
Core: Update index generation to use tags to detect MDX stories #19712
Conversation
|
OK! This PR works, just need to figure out the test for the indexer. |
Nice job @shilman! Will mark this ready for review once storybookjs/mdx2-csf#23 is merged and we can switch back to next |
Merged. I suspect there are bugs in this PR. If you browse the sandbox "csf in mdx" docs page it's blank @tmeasday |
@shilman it turned out to be a simple missing import, not sure how/if it was working before but an easy fix! |
…g-instead-of-matching-on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one q
"tags": Array [ | ||
"story-tag", | ||
"mdx", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just confirming that the mdx
tag here means that the story was generated from MDX. Do we want that? It could be confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was intentional on my part anyway. Happy to change the tag from mdx
if it is confusing that a story can be "mdx". To me it makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WFM after letting it settle in
@shilman for some reason the
When I change import { Meta, Story } from '@storybook/addon-docs';
<>
<Meta component={{}} />
<Story name="StoryOne" />
</> The problem goes away. But I don't think that's right is it? |
Issue: N/A
What I did
Use storybookjs/mdx2-csf#22 to set
mdx
tag, and use it to determine which files need a docs page (rather than matching on filename).