generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
Description
Is your feature request related to a problem? Please describe.
Since I migrated to Storybook 9, I cannot get the desired viewport for stories anymore.
In Storybook 8, the viewport was set in parameters, which I can access in postVisit() via storyContext.parameters:
https://storybook.js.org/docs/8/essentials/viewport#defining-the-viewport-for-a-story
However, in Storybook 9, the viewport is set in globals, which I cannot access in postVisit():
https://storybook.js.org/docs/essentials/viewport#defining-the-viewport-for-a-story
Describe the solution you'd like
The cleanest solution would be if test-runner will automatically apply the default viewport of a story to the page.
Describe alternatives you've considered
Alternately, test-runner could provide all properties of globals in postVisit() via storyContext.globals.
Are you able to assist to bring the feature to reality?
no
Additional context
No response
oleksandr-danylchenko, hunterliu1003 and madogiwa0124