-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Migrate screener stories to CSF instead of storiesOf #21779
Comments
Official docs from screener: https://docs.saucelabs.com/visual/faq/#how-do-i-add-screener-steps-to-storybook-component-story-format-csf-stories |
moving to backlog, plan is to address this in upcoming 6 months |
Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. Still require assistance? Please, create a new issue with up-to date details. |
Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. Still require assistance? Please, create a new issue with up-to date details. |
Right now in the vr-tests packages we use the deprecated
storiesOf
format for declaring stories. This will be removed in storybook v7, so we'll eventually need to migrate the vr-tests stories to CSF (component story format).Storybook has a migration for
storiesOf
to CSF:npx sb migrate storiesof-to-csf --glob "**/*.stories.js"
https://storybook.js.org/blog/component-story-format/
This doesn't quite work out of box on our stories, but if we make the following manual modifications it will get us a lot of the way there:
addStory
=>add
(so the mod will recognize it; leaving the extra parameters for now is fine)storiesOf
calls in the same file (at least with the same name), split it into multiple filesThe migration more or less works after that (based on a small test). We'll still have to figure out how to restore the functionality of auto-added stories for RTL and different themes (that's what the
addStory
API did) but there should be some way to do it.The text was updated successfully, but these errors were encountered: