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

Vite: Support runStep in Vite builder SSv6 #19235

Merged
merged 2 commits into from
Sep 24, 2022
Merged

Vite: Support runStep in Vite builder SSv6 #19235

merged 2 commits into from
Sep 24, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Sep 22, 2022

Issue: N/A

Ref: #18555 (comment)

What I did

Support for runStep in story store v6 was added to the Webpack builder, but not Vite. This adds it to vite as well, and cleans up some conditional calls which were necessary before. Previously, we didn't have any guarantee which version of storybook the builder was being used with. Now that it's in the monorepo, it'll be versioned together with the rest of storybook.

How to test

CI, though I'm not sure there are any step functions being executed in tests, or else the Vite builder would have failed previously, I think...

Previously, we didn't have any guarantee which version of storybook the builder was being used with.
Now that it's in the monorepo, it'll be versioned together with the rest of storybook.
@tmeasday
Copy link
Member

CI, though I'm not sure there are any step functions being executed in tests, or else the Vite builder would have failed previously, I think..

The default implementation of runStep is to just run it 🤷. The one exported by the interactions addon additionally adds instrumentation so it shows up nicely in the debugger, so I guess we would need to check a story in the vite builder. We do have some, let's see if we can find it...

@tmeasday
Copy link
Member

We don't (currently) have a v6 sandbox using vite (we plan to address this!) so there's no artifact I can point at, but in order to check, I advise running a vite sandbox, setting SSv6, and visiting this story: http://localhost:6006/?path=/story/addons-interactions-basics--step and checking the step works.

image

Actually it was erroring on next:

image

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@IanVS IanVS merged commit 253ffdb into next Sep 24, 2022
@IanVS IanVS deleted the vite/step-support branch September 24, 2022 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants