-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
SlotFill: Allow contextual SlotFillProviders #56779
Conversation
Size Change: +23 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
Flaky tests detected in 629e5ff. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7193766454
|
f8ea0bc
to
a9d4b3c
Compare
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.
LGTM, thanks!
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.
Good fix, thanks for implementing the idea 👍
a9d4b3c
to
629e5ff
Compare
# Conflicts: # packages/components/CHANGELOG.md
👋 @youknowriad, I've just cherry-picked this so it's included in the next 6.4 point release, but I had to include several other PRs to make sure the build ran correctly:
As there are so many, I just wanted to double-check if this sounds right before I went any further. Here's the branch I'm working with for the next release: #57360 Thanks! |
@mikachan That sounds like a lot of PRs and changes just for this to be cherry-picked, personally I'd have just applied the same fix on the non-typescript version. (Basically adding the passthrough prop and passing it) |
That makes more sense! I wasn't sure how important it was to keep the changes in line with the current version of GB, but applying the changes to the non-typescript version is much easier 😅 I've done that now here: 733b844 |
LGTM 👍 Thanks |
# Conflicts: # packages/components/CHANGELOG.md
Package Update includes fixes for: - Image Block: Enable image block to be selected correctly when clicked. - Reduce specificity of default Cover text color styles. - Image Block: Fix deprecation when width/height attribute is number. - Text selection: show CSS hack to Safari only. - SlotFill: Allow contextual SlotFillProviders. See: #5696 See: WordPress/gutenberg@bd6767b See: WordPress/gutenberg#56043 See: WordPress/gutenberg#56411 See: WordPress/gutenberg#57063 See: WordPress/gutenberg#57300 See: WordPress/gutenberg#56779 Props mikachan, wildworks, alexstine, poena, isabel_brison, andrewserong, czapla, andraganescu, joen, ellatrix, youknowriad, ntsekouras. Fixes #59943, #59943. git-svn-id: https://develop.svn.wordpress.org/trunk@57258 602fd350-edb4-49c9-b593-d223f7449a82
Package Update includes fixes for: - Image Block: Enable image block to be selected correctly when clicked. - Reduce specificity of default Cover text color styles. - Image Block: Fix deprecation when width/height attribute is number. - Text selection: show CSS hack to Safari only. - SlotFill: Allow contextual SlotFillProviders. See: WordPress/wordpress-develop#5696 See: WordPress/gutenberg@bd6767b See: WordPress/gutenberg#56043 See: WordPress/gutenberg#56411 See: WordPress/gutenberg#57063 See: WordPress/gutenberg#57300 See: WordPress/gutenberg#56779 Props mikachan, wildworks, alexstine, poena, isabel_brison, andrewserong, czapla, andraganescu, joen, ellatrix, youknowriad, ntsekouras. Fixes #59943, #59943. Built from https://develop.svn.wordpress.org/trunk@57258 git-svn-id: http://core.svn.wordpress.org/trunk@56764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Package Update includes fixes for: - Image Block: Enable image block to be selected correctly when clicked. - Reduce specificity of default Cover text color styles. - Image Block: Fix deprecation when width/height attribute is number. - Text selection: show CSS hack to Safari only. - SlotFill: Allow contextual SlotFillProviders. See: WordPress/wordpress-develop#5696 See: WordPress/gutenberg@bd6767b See: WordPress/gutenberg#56043 See: WordPress/gutenberg#56411 See: WordPress/gutenberg#57063 See: WordPress/gutenberg#57300 See: WordPress/gutenberg#56779 Props mikachan, wildworks, alexstine, poena, isabel_brison, andrewserong, czapla, andraganescu, joen, ellatrix, youknowriad, ntsekouras. Fixes #59943, #59943. Built from https://develop.svn.wordpress.org/trunk@57258 git-svn-id: https://core.svn.wordpress.org/trunk@56764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
closes #56519
What?
In #53940 we refactored SlotFillProvider to allow the BlockEditorProvider to bundle a provider and if a parent provider was already on the tree, the bundled provider would just pass the slots to the parent provider which means slots and fills will continue to render at the same position.
That behavior caused a regression because it seems some people were relying explicitly on the "contextual" aspect of SlotFillProvider in the editor UI
This PR introduces a prop to make SlotFillProvider contextual by default but allow BlockEditorProvider to pass through Slots to the parent provider.
Testing Instructions