-
-
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
[Discussion] [Ideas] Story definition API #1511
Comments
@sterlingwes Nice!! We're excited to learn from your workflow. Are you proposing a single PR, or a handful of PR's for:
Happy to provide feedback here, or if you're up for it our slack is a great place to get more realtime feedback: https://now-examples-slackin-nqnzoygycp.now.sh/ |
Oh nice, I'll join in on Slack 👍 Yes was looking to split up the work for sure. Your first two suggestions I think I could tackle quickly. I might tread more carefully on the third being a fairly big API change. Thanks for the feedback! |
Hello! We love Storybooks at Wealthsimple and use it regularly as part of our React Native development. I'm excited for opportunities to contribute and thought I'd share our workflow for discussion and to see if there's interest in my efforts in any area.
There's a few things we've enjoyed doing:
An example:
The object format maps to current API methods:
storyGroup
=>storiesOf(storyGroup)
layout
=>addDecorator(() => {})
stories[story variant]
=>add('story variant', () => {})
Where the
default
variant exists, we're usingdiff-react
to only commit the snapshot diff between the default and the variant.As far as organizing stories goes, we still explicitly define all our requires and wrap each with the module that makes the object definition possible. I've seen the separate add-on for generating those requires but feel like a glob syntax for the
storybook start
cli may be useful as well.I'm not looking to add to your issue queue, just seeking guidance on areas worth pursuing before I start on a PR, so hopefully we can close this soon 😬
I'm excited for some of the upcoming changes focused on React Native (like the in-simulator UI in the 3.2 alpha)! Thanks for all of your efforts 🎉
The text was updated successfully, but these errors were encountered: