-
-
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
CLI: Add common welcome MDX and cleanup #11422
Conversation
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.
Awesome awesome. Can't speak to the CLI changes but LGTM
|
||
<Meta title="Example/Introduction" /> | ||
|
||
<style>{` |
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.
Do you think we should maybe import this style too?
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.
I think we should if it's easy. I tried to import a css file in mdx but it doesn't work. Is that supposed to be supported ?
If it's not, maybe we should log a ticket and see if it gets community support ?
Either it's wanted or not, I think we can ship this and improve later.
Awesome stuff! I'll check it out and give my feedback soon |
The following links don't exist: I assume we only want to have this deployed once the links are working? |
</div> | ||
|
||
<div class="tip-wrapper"> | ||
<span class="tip">Tip</span>Edit the Markdown in <code>src/storybook-examples/welcome.mdx</code> |
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.
Here it says src/storybook-examples/welcome.mdx
although the generated file is stories/0.Introduction.stories.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.
That was my mistake! @tmeasday why is the file called 0.Introduction
? Is it so Storybook shows it as the first story without having extra configuration in main.js
?
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.
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.
@tmeasday why is the file called 0.Introduction? Is it so Storybook shows it as the first story without having extra configuration in main.js?
That was originally why, yeah. Can we just change the stories field to import mdx
first? Or is that too complex?
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.
@tmeasday I think it looks weird to have 0.name when I first install. I'd rather the default story import be something reasonable like showing MDX files first.
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.
I have experienced quite some colleagues keeping this nomenclature in order to have properly ordered stories, and of course it all starts because the template does it.
For the ones that want to have a simpler way of organizing the stories (per category is something I see a lot), notice people creating a custom sorting mechanism like this one: https://github.com/ing-bank/lion/blob/master/.storybook/preview.js#L30
Sorting stories should be something simple by default and if people want to do something more complex they should be free to do so, IMO.
There's an issue which I reproduced while updating @babel/core from 7.10.2 to 7.10.4
|
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.
💪
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.
Looking good! Going to merge this and resolve some of the issues in a followup PR. Great work @tooppaaa 🔥
Issue: #10794
What I did
Use @domyen welcome story in all frameworks template with a single implementation
Remove old welcome stories
Update e2e
Relates to #9103
I updated angular CLI to use this setup out of the box: https://github.com/storybookjs/storybook/blob/next/addons/docs/angular/README.md#props-tables
How to test