Skip to content
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

Standard Template for Component Stories #29

Open
nathanstilwell opened this issue Apr 21, 2020 · 0 comments
Open

Standard Template for Component Stories #29

nathanstilwell opened this issue Apr 21, 2020 · 0 comments
Labels
📝 docs Contributes to documentation or Storybook

Comments

@nathanstilwell
Copy link
Contributor

nathanstilwell commented Apr 21, 2020

Our storybook efforts have been very adhoc up until now. In the prototyping work that's been done so far some patterns have emerged. At a minimum I think there should be two sub-views to each component story.

Example

The Example view should document a components features (props, states, interactions, etc). Here are some example examples 😄 ,


Screen Shot 2020-04-21 at 13 43 16


Screen Shot 2020-04-21 at 13 43 27

Here I took the simple approach of a basic description and demonstrating the possible states for each prop.

Questions

  • Should we have example usage for a component? Such as displaying it in context?
  • Should we provide guidelines for when to use the component and when to use a different component?
  • What else are we missing?

Demo

The Demo view should provide an interactive place to allow contributors, implementers, and designers to experiment with different states of a component. This could be to test multiple props at once, determine capabilities to see if this component is well suited to a task, or to determine correctness of a component.

storybook-demo-view

Questions

  • I rolled these by hand in prototyping, is there a way to automate creating these?
  • Would this be useful in automated testing somehow?
  • I used the Knobs plugin here but are there better tools out there?
  • What else?

Others?

Are there other standard views that would be essential to have in our stories? I thought using something like the README plugin would be quite nice for providing more technical documentation about prop types and usage. I'm sure there's more that I'm missing.

@nathanstilwell nathanstilwell added the 📝 docs Contributes to documentation or Storybook label Apr 21, 2020
@nathanstilwell nathanstilwell changed the title [storybook] Standard Template for Component Stories Standard Template for Component Stories Apr 21, 2020
dhartunian pushed a commit to dhartunian/ui that referenced this issue Dec 11, 2020
Empty state for tables without data redesign
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📝 docs Contributes to documentation or Storybook
Projects
No open projects
Development

No branches or pull requests

1 participant