-
Notifications
You must be signed in to change notification settings - Fork 45
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
Use storybook parameters instead of maintaining a separate store #50
Comments
Also the |
This would also allow us to simplify the setup steps for percy-storybook. When we do this, I'd suggest percy-storybook moves to the new format, stops supporting the old format, and makes this a major version release. |
If you're looking at a new major version of percy-storybook, it might also be worth investigating storybook's It'd also be worth keeping an eye on storybookjs/storybook#4878 which suggests a standard mechanism for exposing story data instead of relying on your bespoke |
@BPScott @marcoala I've prepared a PR that adds support for this. It's dependent on the soon-to-be-released Storybook v5 where the SB team has introduced a new raw() API for reading the params. Would either of you like to try it? |
Woo thank you for this! I'm excited for this and Storybook v5. Let me know when you've got a beta version of percy-storybook deployed to npm and I'll give that + storybook v5 a spin in https://github.com/shopify/polaris-react |
@timhaines thank you very much! I'll try to do it by the end of the week! |
Currently percy-storybook maintains its own parameter store for attaching parameters to a particular Story.
Storybook 4.0.0 added support for adding arbitrary parameters to stories.
It would be great if percy-storybook could use this idiomatic way instead of storing data instead of its own store. This would also enable setting global options for all stories within storybook itself instead of having to pass command line flags.
Essentially instead of writing:
Consumers would be able to write:
This would also allow global settings defined in storybook config itself instead of having to rely on CLI arguments:
Example of parameter usage for reference: https://storybooks-official.netlify.com/?selectedKind=Core%7CParameters&selectedStory=passed%20to%20story&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Fstories%2Fstories-panel
The text was updated successfully, but these errors were encountered: