Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

How should we support static html in storybook? #16

Closed
stephenp opened this issue Jun 18, 2018 · 7 comments
Closed

How should we support static html in storybook? #16

stephenp opened this issue Jun 18, 2018 · 7 comments

Comments

@stephenp
Copy link
Contributor

Should we make separate stories for the react components vs static components?

@bernabe9
Copy link
Contributor

bernabe9 commented Jun 18, 2018

Good question.
I think it would be confusing to have static components mixed in with react component.
But we can set up another storybook in this repository.

Also, Im not sure if supporting static html structures should be in the scope of library 🤔

Any thoughts? @a-axton @jesseocon

@a-axton
Copy link
Contributor

a-axton commented Jun 20, 2018

We could have two root sections for static/react using this https://storybook.js.org/basics/writing-stories/#nesting-stories

@jstnjns
Copy link
Collaborator

jstnjns commented Jun 29, 2018

@a-axton I think that's right on the money. There will be a lot of things that are simply foundational to build apps that aren't necessarily React components, but still need to be in here (grid, typography, CSS util classes).

@jstnjns
Copy link
Collaborator

jstnjns commented Jun 29, 2018

I did a little bit of digging, and to add some more structure to the navigation (and better segment non-React UI from the actual components) I think it'd be a good idea to make use of the hierarchyRootSeparator (storybookjs/storybook#2452).

My proposal for initial high level organization:

  • Foundation (CSS)
    • Typography
    • Grid
  • Components (React)
    • Forms
    • Media
    • Global

@bernabe9
Copy link
Contributor

@jstnjns I love it. This way we can keep only one storybook and differentiate between non-react and React components using two high levels

@bernabe9
Copy link
Contributor

It would be good to create a new folder inside the src to include there all the stories for the foundation (CSS).

@stephenp stephenp mentioned this issue Jun 29, 2018
@stephenp
Copy link
Contributor Author

Fixed with #53 - if we want additional features (like actual subfolders in addition to UI subfolders), we should re-create this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants