-
-
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: consistent welcome-component in all generators #10794
Comments
I spoke to @tmeasday and @shilman about how this coincides with the new documentation. Requirements:
Details Here's an early preview of how that might look: wdyt? |
That looks amazing! And all those links would then point to sections of the documentation website? I like that there are a bunch of info which (at least how I read) reiterates about storybook being a tool to develop entire screens 👌 About MDX it seems to be nice and it would be also a great way to show people how to have documentation pages in their setup right from the start. However that also means that they need to have addon docs out of the box, which shouldn't be a problem once we ship the examples with addon-essentials. I think, however, that it would be important for the users to distinguish the difference and purpose of mdx and js stories, so they don't get confused. |
Nice! The links will go to different parts of the documentation.
Good idea! Folks are currently unclear about what goes in a story (evidenced by how many Storybooks include prose in the story). We should articulate the difference by adding code comments in the MDX files. SB Docs |
It's awesome @domyen, really like it. Just a few practical questions / comments:
|
@tooppaaa Any recommendations on a lightweight way of including these images? I can output them however is easiest (svg, png, etc). |
The most realistic way is the best. In my company's storybook instance, we have an assets folder where we pick svg icons to use in MDX. |
Nice, that makes sense. I'm not very familiar with the build step, but would we run into any issues with webpack? |
I checked before saying we could embed svg :D I don't have any special configuration in mine so I assume it's fine. |
According to the docs we can import I wonder if that'll work in MDX files? I guess we'll find out. Hmm.. although thinking about this a bit I don't know if we can substitute a variable into raw HTML in a MDX file (assuming that is how we want to do this markup in a framework-independent way). |
Storybook adds a few webpack rules by default, and png is supported using file-loader. |
PNG, SVG, either will work. What's easiest for you @domyen. |
@yannbf I think it makes sense to show people how to make a welcome page in MD(x). I think it's a pretty common thing that folks want to do (for design systems anyway). |
Oh, in that sense I totally agree with you!
|
Thanks for the feedback everyone. 🙇♂️ I coordinated with @tmeasday and @shilman to reexamine the other stories generated by I created a product design strawman that includes:
Check the doc out here @yannbf Should we track the work in this issue or break it out into separate issues? |
Presenting myself available as well to help! Last month was crazy but now I have some time to contribute too 💃 |
Here's a proposal that we can start to work on https://gist.github.com/tooppaaa/08accf47c0823d2cfbc016debf47276e My main questions are:
Even if the final wording / UI / content is not finalize on your side, I think we can have a good-enough first version we can ship before RC, what do you think ? |
This is amazing @tooppaaa! Before you get too far, I'm going to take a stab at the styling and markup today. Ideally, we should use raw HTML and CSS in the MDX as much as possible. That will make it easy to port to all frameworks. And users will be familiar with what's going on no matter what framework they use. Hang tight, hopefully will have something for you in a few hours |
I styled the welcome mdx in this repo, see this file. My plan is to style the rest of the example components tomorrow because they're used in the updated docs. I think the idea is to make the welcome component and the example components consistent in all frameworks. Strawman next steps
WDYT? |
Hello ! I can take this task over the weekend ;) The only comment so far is that it's a lot html of hard-to-read html and don't really show up the capabilities of MDX. <a>
--- <svg>
--- ...
--- </svg>
+++ <Icon />
</a>
+++ export const Icon = () => <svg> ... </svg> This would ease the reading of the links We can of course see that later and so far, deliver this cross framework welcome page ! |
That's beautiful @domyen ! |
@tooppaaa @tom I styled the rest of the components in the sample repo here. This brings their appearance in line with the design spec. Hooray! Question The Button component is very "React-y". It relies on JSX for styling.
@tooppaaa Re: Welcome MDX, I agree with you on it being hard to read. I updated the code to |
Here’s my 2c, fwiw:
With that in mind maybe we should have a single css file that we can add to all templates somehow?
|
A single CSS file that we import in each file makes sense to me for maintenance reasons. Should we drop the CSS and images in the |
After looking at the code, I'm in favor of @tmeasday idea. Classnames would ease the reading of components. |
These are subjective questions, maybe for @domyen or @shilman : Somehow I think that 2 is more straight forward and people can quickly go to their framework of choice in the side navigation. Also, the welcome component has a link to this component driven approach article https://blog.hichroma.com/component-driven-development-ce1109d56c8e and although it's a great article, it's from 2017. Everything related to storybook there is outdated (like install step, code example etc), and there are links even to kadira. I assume we want to either update that article or revamp it in a new one? |
@yannbf we'll need to update the article! Thanks for pointing that out. The point of the 2017 article is to show that the component-driven process is not a new concept. Re: link to docs, we're launching new docs and docs site in the next couple of weeks. storybook.js.org/docs will go to the same path as storybook.js.org/docs/basics/introduction. It doesn't go there right now because we haven't had a chance to update the legacy Gatsby 1 site. |
Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.2 containing PR #11422 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. |
Work summary
Make all
0-Welcome.stories.*
components look the same and have the same content accross all storybook templates.These are suggestions from @ndelangen but we can discuss further in this issue:
This work is part of #10723 and depends on:
Where to start
Check all framework templates under generators folder and change the
0-Welcome.stories.*
components accordingly.Acceptance criteria
Who to contact
@shilman @ndelangen @domyen
The text was updated successfully, but these errors were encountered: