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

Dev tool request: Take React Storybook into use #7013

Closed
1 of 2 tasks
atakiel opened this issue Apr 2, 2018 · 2 comments
Closed
1 of 2 tasks

Dev tool request: Take React Storybook into use #7013

atakiel opened this issue Apr 2, 2018 · 2 comments

Comments

@atakiel
Copy link

atakiel commented Apr 2, 2018

Start using react storybook.

What is

React storybook is a simple ui development environment that allows developing react components separately from the rest of the application.

Pros

  • No need to start whole mastodon dev server when doing simple front-end development. Storybook server is enough.
  • Favors splitting components into smaller story-sized bites.
  • Favors separating components from their data sources.
  • Easy to setup and use.
  • Can be taken into use when needed, component by component.
  • Storybook acts as a simple way to list and view all the components in the project.

Story organizing conventions

If storybook is taken into use in a project this size, it's good to keep stories next to the components they are written about. That is, in the same folder and with a name *.stories.js (instructions for doing this).

i.e.

components
  - first-component.js
  - first-component.stories.js
  - second-component.js
  - second-component.stories.js

Additionally, if stories in a specific file require larger amounts of example data, the data is handy to keep in a separate file, named e.g *.stories.data.js.


  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • This bug happens on a tagged release and not on master (If you're a user, don't worry about this).
@Gargron
Copy link
Member

Gargron commented Apr 4, 2018

We had react-storybook in the past (#91, #4397) but nobody was making use of it so we removed it again. I highly doubt that anyone will suddenly start using it this time, so it's a no from me.

@Gargron Gargron closed this as completed Apr 4, 2018
@pawelngei
Copy link
Contributor

I'd like to use Storybook to develop some more features, since I don't see an easy way to generate content (posts, notifications, users) to test the components with right now.

Should I make a PR without the Storybook commits, just the features?

@Gargron

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

No branches or pull requests

3 participants