To streamline bug reporting and maintenance, we're introducing a standardized repro process in Storybook. The process is now in alpha, and we'd love your feedback to make it better before we introduce it to the community at large. Thank you for your help!!!
The process is automated by two new commands:
sb repro
- create a new repro based on a templatesb link
- download a repro and link it against the storybook monorepo to interactively develop a fix against it
To create a reproduction, run the repro
command:
npx sb@next repro
This will prompt you for a destination directory and a template. Using standardized templates help us isolate the conditions required to trigger a bug.
It also takes CLI flags. For example the following will initialize a CRA-based repro:
npx sb@next repro --template cra repro-cra
Create a public github repository and upload your code. We have not automated this step yet and are open to suggestions on the best way to do this.
To run and develop against a repro, run the link
command from the root directory of the storybook monorepo:
npx sb@next link git@github.com:shilman/repro-cra.git
This will create a file ../storybook-repros/repro-cra
, link in the current monorepo workspace, and then run the storybook.
This means that if you run
yarn build components addon-docs addon-controls --watch
And edit files in the monorepo, these changes will be immediately reflected in the repro storybook. Note that Storybook's manager UI (the UI around the iframe) does not HMR, so if you're editing that you'll need to reload the browser.
If you try out the flow and have ideas for how to improve it, please file a github issue. This process is brand new and still untested, and we'd like to make it great. Thank you!!!
This is great!
In step 2, did you mean "Create a public repo"?