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

Storyshots snapshot generation for every knobs composition #9962

Closed
stereodenis opened this issue Feb 26, 2020 · 21 comments
Closed

Storyshots snapshot generation for every knobs composition #9962

stereodenis opened this issue Feb 26, 2020 · 21 comments

Comments

@stereodenis
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Now storyshots doesn't generate snapshots for every knobs composition.

Describe the solution you'd like
Generate snapshots for every knobs composition

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Are you able to assist bring the feature to reality?
no

@stereodenis
Copy link
Contributor Author

@shilman add knobs label please

@stale
Copy link

stale bot commented Mar 19, 2020

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Mar 19, 2020
@stereodenis
Copy link
Contributor Author

this is not stale

@stale stale bot removed the inactive label Mar 19, 2020
@shilman
Copy link
Member

shilman commented Mar 21, 2020

@stereodenis do you want to pick this up?

@stereodenis
Copy link
Contributor Author

@shilman could you give me a direction?

@shilman
Copy link
Member

shilman commented Mar 23, 2020

@stereodenis Yeah I'd be happy to. Want to jump on our Discord https://discord.gg/UUt2PJb

I'm pretty booked up for the next month or so until 6.0 is out, but I'd love to see this get into SB 6.1.

@osdiab
Copy link
Contributor

osdiab commented Apr 8, 2020

I too am interested in this!

@osdiab
Copy link
Contributor

osdiab commented Apr 8, 2020

I would assume that some knobs would be easy to exhaustively step through (finite ones like radios and selects), but some knobs are not so straightforward (unbounded numbers); and that the number of combinations would explode if you have a lot of knobs, however (5 knobs with 5 settings already makes over 3000 combinations). would definitely need to constrain what gets tested, likely manually

@stereodenis
Copy link
Contributor Author

@osdiab 5 knobs with 5 settings generate 120 combinations

@osdiab
Copy link
Contributor

osdiab commented Apr 9, 2020

Huh? It would be 5^5 permutations no? Which is far more than 120

@stale stale bot added the inactive label Apr 30, 2020
@stereodenis
Copy link
Contributor Author

not stale. waiting for v6

@stale stale bot removed the inactive label Apr 30, 2020
@shilman shilman added the todo label May 1, 2020
@shilman
Copy link
Member

shilman commented May 28, 2020

Hi gang, We’ve just released addon-controls in 6.0-beta!

Controls are portable, auto-generated knobs that are intended to replace addon-knobs long term.

Please upgrade and try them out today. Thanks for your help and support getting this stable for release!

@stereodenis
Copy link
Contributor Author

@shilman what about React Native?

@shilman
Copy link
Member

shilman commented Jun 1, 2020

For anybody who is interested in Controls but don't know where to start, I've created a quick & dirty step-by-step walkthrough to go from a fresh CRA project to a working demo. Check it out:

=> Storybook Controls w/ CRA & TypeScript

There are also some "knobs to controls" migration docs in the Controls README:

=> How do I migrate from addon-knobs?

@shilman
Copy link
Member

shilman commented Jun 2, 2020

@stereodenis Storybook for RN is still catching up with Component Story Format (CSF). It might adopt controls someday, but no direct path from here to there until it supports CSF.

@chrisj-skinner
Copy link
Contributor

@shilman I've been using controls with the latest V9 of Angular lately and having good progress 👍 Nice one on the CRA project.

@ZDerekh
Copy link

ZDerekh commented Jan 21, 2021

Isn't this feature must have to get proper coverage of the components? Correct me if I'm wrong, but this would give so much value either based on knobs or brand new controls. It's been so many threads already on this topic, and no one was resulting in a submitted PR or a draft.

@storybookjs storybookjs deleted a comment from stale bot Jan 22, 2021
@ybrodsky
Copy link

Any update on this?
Any way to do it?

If you have 10 stories and you manage to reduce it to just 1 by using knobs (or controls, whatever) you will see a coverage decresed. So you are forced to have 10x more code just to avoid losing coverage.

@shilman
Copy link
Member

shilman commented Mar 11, 2021

@jorisw
Copy link
Contributor

jorisw commented Jan 6, 2022

Just to chime in, I don't think we're looking for Storybook Combos per se.

We're looking for StoryShots to cover boolean and enum Control options.

This would automate 10x the coverage on the components, without having a Combo story, which is a feature with a different target audience.

@ndelangen
Copy link
Member

The future of storyshots is the test-runner:
https://storybook.js.org/docs/react/writing-tests/test-runner#page-top

And use the play function for expectations:
https://storybook.js.org/docs/react/writing-stories/play-function#page-top

We will not be making any improvement / changes to storyshots.

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

No branches or pull requests

8 participants