-
-
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
Discussion: CLI Overhaul #10723
Comments
Thanks for opening this @yannbf! Agree with your suggestions across the board. The first question about
Given this, perhaps we should:
WDYT? |
agreed
agreed
We should update it so it mentions |
Downside to this is we would need to change the implementation of the generators and make it more complex, because right now it just does a Also, we'd need to change the text on the Welcome story based on that, because in that text there is a reference to one of the stories like this: |
true, good point, that is a downside.. We could say we copy the stories into the project dir, then OPTIONALLY move the stories dir into the src directory? And make sure the glob specified in
I think we can drop the |
Here's my suggestion for the one-for-all wording of the introduction story. Should we add a section that encourages the usage of docs ? Welcome to storybookThis is a UI component dev environment for your app. We've added some basic stories inside your source code. A story is a single state of one or more UI components. You can have as many stories as you want. (Basically a story is like a visual test case.) StoriesYou can add your own components as stories. Use the left panel to switch between stories. Create new stories using one of the following format:
You can edit components and see changes right away. (Try editing the ConfigurationYour app may require additional configurations. Check our configuration documentation for more information Tips
|
So @shilman mentioned in one of the PRs:
What do we want to use? I think it would be nice to use |
Docs is a different approach. I can see projects where I am not yet sure I'll install docs. (simpler is better). Same for backgrounds. So this leads to: This increase the maintenance cost (Lots of PR to harmonize only links & actions) Concerning |
That's a great question!
Sounds like a great idea! |
@tooppaaa i think it's fine if the user has to delete some or even all of the code generated by the template -- that's already the case with stories. its main purposes are (1) to give users something useful out of the box and (2) to educate them about storybook concepts. what's nice specifically about the
|
But less is better. referencing demo components from
The issue is that (as @shilman mentions as well), that part of the purpose of this copied template is to give the user something to play with code-wise. If it's a ref they can see the storybook, but they cannot experience changing the component & story. But I'm not apposed to the idea of adding a ref by default... WDYT? (asking to anyone reading this) |
In 5.3 I wrote a meta-addon called Storybook Essentials, which is a curated collection of zero-config addons for Storybook. I think Essentials should be the basis for the updated CLI template and related work. Essentials had a technical limitation about package imports. However, I've fixed the limitation in in 6.0, and it's now available in #10737 Over the course of the 6.x milestones, we will actively promote essentials as the easiest way to get started with a high-quality Storybook experience. If all the CLI templates use it and all the tests make sure that it works smoothly with all the existing frameworks, it will be a huge win for users and for Storybook maintenance. |
Reusing what has been done ? Love the idea ! |
Huzzah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.6 containing PR #10729 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
Hey @shilman what tasks based on this discussion do you think can be created so far? Or should we mature it a bit more before creating tasks? |
Ok @shilman @ndelangen I'd love to create tasks however I'd like to know which ones should be tasks, which ones should not, and have a more concrete idea about them: 1 - Remove addon notes usage from CLI generated stories. And this one doesn't seem to be decided If you could help me out shape these into proper tasks would be awesome! |
my preferences:
@domyen would you be able to design a welcome-to-storybook component that can be re-used for all framework generators? |
Sounds awesome Norbert, I can do that 👍
…On Thu, May 14, 2020 at 8:59 AM Norbert de Langen ***@***.***> wrote:
my preferences:
✅ remove addon notes from generators
✅ add addon-essentials to the generators
❓ Use demo components in generated stories
❓ generate into the src directory if we can find one
✅ consistent welcome-component (and button) in all generators
(let's show a pretty one, with:
- storybook logo
- link to storybook docs
- link to discord invite
- link to storybook repo on github
- some message about the ability to add & write addons
@domyen <https://github.com/domyen> would you be able to design a
welcome-to-storybook component that can be re-used for all framework
generators?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10723 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACAJWKQNCTMIUOMHERHJGDRRPTLDANCNFSM4M5INNMA>
.
|
@yannbf @ndelangen we need to ship components with the stories. if we do:
it adds more complexity to the templates, but we just need to deal with it |
@gaetanmaisse would you be so kind and create issues about the following points you mentioned?
|
@domyen Did you had a chance to work on that Welcome page ? |
Hey @tooppaaa will work on that this coming week. I'm freed up some time to focus on SB design tasks. 👍 |
@airtonix yes, but that's really unrelated the the issue currently being discussed.. add |
Jeepers creepers!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.8 containing PR #11505 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
@shilman can we close this issue? maybe create a new issue to track the remaining bits if there are any? |
What is this?
This is an issue to center the status and discussions about the work that's being done at #10702.
We are making an overhaul of the CLI so that we can automate the generation of templates for the frameworks that Storybook supports.
The work also involves adding and improving E2E tests and making the storybook installation consistent across all frameworks.
This gives us the opportunity to:
yarn bootstrap
performance by only installing the basic, necessary projectsGeneral
There is already quite some work done, and it has been divided into multiple PRs.
Additional tasks
sb init
The table below will be updated as new tasks arise:
## Discussion-
- Currently it's inconsistent across frameworks. What's should be the correct path?
-
- Currently it's inconsistent across frameworks. Should we keep the stories boilerplate as minimal as possible by just importing components from the demos like React or should we ship example files like it's done with Vue?
-
- The content of the Welcome component should be consistent across frameworks. One thing we noticed is the message about webpack:
-
- Lots of example stories have
Stories being generated under
stories
vssrc/stories
.Using demo components from
@storybook/FRAMEWORK/demo
vs shipping example components together with the stories.Updating Welcome component content.
Have a look at the .storybook/webpack.config.js to add webpack loaders and plugins you are using in this project.
although that file is not present. Maybe it should be just rephrased that if you add the file it will be picked up, or rather tell people to add the rules tomain.js
instead if that's the way to go. Also, in some frameworks there is inconsistency because in the welcome component there is a reference tostories/1-Button.stories.js
but the correct path is actuallysrc/stories/1-Button.stories.js
and the other way around (to be aligned with point 1 above).removing notes parameter on template stories
notes
as parameters, although the notes addon has been removed.I'll be updating this text as we progress. For the ones working on this feel free to update this as well!
The text was updated successfully, but these errors were encountered: