feat: support storybook storyStoreV7 - #69
Merged
Merged
Conversation
Hotell
commented
Feb 5, 2025
| "name": "storywright", | ||
| "description": "Storybook setup.", | ||
| "license": "MIT", | ||
| "version": "0.0.27-storybook7.9", |
Author
There was a problem hiding this comment.
not sure how do you do releases ?
| else { | ||
| let steps = findSteps(children); | ||
| return steps; | ||
| // @ts-check |
Author
There was a problem hiding this comment.
this logic has been mostly encapsulated to a more maintainable way, incorporating the new behaviours which are necessary to obtain page rendered stories Array
| } = require(storiesJsonPath); | ||
| stories = Object.values(rawStoriesObject.stories ?? {}); | ||
| console.log(`${stories.length} stories found`); | ||
| console.warn('NOTE: stories Steps will not be processed') |
Author
There was a problem hiding this comment.
provide explicit notification to user in case of GetStories.js eval would fail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous Behaviour:
StoryWright Steps functionality doesn't work in Storybook 7 by default
New Behaviour:
StoryWright Steps functionality works in Storybook 7 by default
More Context
Ff storyStoreV7 is enabled ( default SB v7 ), SB exposed api on window object, which is used to obtain stories rendered on page within iframe, is different and needs to be executed in 2 steps (also those apis are async).
fun fact: It is still possible to turn off
storyStoreV7within v7 configuration although that is not recommended ( deprecated ) and was supposed to be completely removed from SB - this is probably the case for storybook 8Fixes microsoft/fluentui#33759