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

Add support for Storybook #742

Merged
merged 37 commits into from
Jun 29, 2020
Merged

Add support for Storybook #742

merged 37 commits into from
Jun 29, 2020

Conversation

peterp
Copy link
Contributor

@peterp peterp commented Jun 23, 2020

Storybook allows you to develop your components in isolation, away from all the conflated cruft of your real app.

"Props in, views out! Make it simple to reason about."

  • Add a yarn storybook command
  • This will search for files with *.stories.js, *.stories.tsx, and *.stories.jsx
  • Load Redwood's webpack configuration
  • Load the user's webpack configuration.
  • Load Providers

Generators

  • Add story file to generated Cell components. Closes Storybook support for cells #231
  • Add story file to generated component.
  • Add story file to generated pages.
  • Add story file to generated layouts.

Configuration options for users

  • How would a user overwrite the Providers?
  • How would the user add addons?

Debug

  • LiveReload doesn't appear to be working.

@peterp peterp marked this pull request as draft June 24, 2020 06:22
@peterp
Copy link
Contributor Author

peterp commented Jun 24, 2020

@RobertBroersma I'm going to be using your GraphQL msw mocking abilities over here :)

@tmeasday
Copy link

tmeasday commented Jun 26, 2020

Hi @peterp, let us know if need any help or advice! PS I recently created this document with some thoughts about how we are thinking about data mocking in Storybook (we want to add a docs page on it soon), and would be interested you are thinking about it at your end.

@peterp
Copy link
Contributor Author

peterp commented Jun 26, 2020

Ooooh @tmeasday Thanks for this! We started using Mock Service Worker for our tests, and it's pretty amazing for mocking GraphQL, rest and HTTP requests.

It's great because it's client agnostic and has a very minimal API design! I should be done with this PR soon and I would love to show you the approach, maybe we can jump on a call early next week?

@jtoar
Copy link
Contributor

jtoar commented Jun 27, 2020

@peterp I'll take a look at this this weekend and start writing some docs!

@peterp
Copy link
Contributor Author

peterp commented Jun 27, 2020

@jtoar Awesome! Hit me up if you have any questions!

@tmeasday
Copy link

Let's do it @peterp -- I'll send you an email

@peterp peterp marked this pull request as ready for review June 29, 2020 11:08
@peterp peterp added this to the next release milestone Jun 29, 2020
@toxsick
Copy link
Contributor

toxsick commented Dec 28, 2020

Hey Guys,

are there any tracking issues for "How would a user overwrite the Providers?" or "How would the user add addons" ?

@peterp
Copy link
Contributor Author

peterp commented Dec 29, 2020

@toxsick I've added an issue over here: #1595

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

Successfully merging this pull request may close these issues.

Storybook support for cells
4 participants