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.
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
Core: Add context as a property of the context (self-referencing) #28353
Core: Add context as a property of the context (self-referencing) #28353
Changes from 8 commits
e944cc5
f5d8384
ba61879
f24a39b
054f661
156966b
b765c98
fd11b1a
1332415
b7e974c
b9f37a5
c4f4ed5
99bc89c
2fa896a
8948af4
a795391
2a9a313
e15a81d
f71def6
00af650
9096e89
053d9ee
6a91865
fced992
ccabc98
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that loaders, beforeEach, the step function, the renderer and the play function, all get the same context reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed this with someone recently (@shilman I think?). Alternatively we could get rid of
composeConfigs
and just passProjectAnnotations[]
around -- and do the composing here.That makes sense to me as it avoids the need for both WP + Vite to call
composeConfigs
at the right time.It definitely doesn't makes sense to have both
composeConfigs
andnormalizeProjectAnnotations
.Also I don't think these two lines belong in there:
storybook/code/lib/preview-api/src/modules/store/csf/normalizeProjectAnnotations.ts
Lines 43 to 48 in 8bb1298
Instead, they should get added to the
ProjectAnnotations[]
somewhere.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I like that. It seems better to do as little as possible JS in the webpack/vite template files.
Those 2 lines, should move to the addon-controls preview file right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly, let's discuss with @shilman to make sure.