-
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
Stabilize the pattern overrides block context #58102
Stabilize the pattern overrides block context #58102
Conversation
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/load.php |
Flaky tests detected in c8ca2e9. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7622686822
|
…videsContext" This reverts commit aca9b906e676a16bfa117ebfaa406e9141b72817.
aca9b90
to
cd183cc
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.
Tested well and code looks good! 👍
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.
Should we add the overrides
attribute in block.json
or should we do in #58105?
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.
Oh yeah, I did make that change but reverted it accidentally, I'll bring it back again.
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.
Changed in c8ca2e9
@talldan I saw you noted that |
Yep, I think we managed to move all the logic into block code, apart from the registration using the block binding API, but there's the block bindings backport PR that handles that. |
✅ I updated the PHP Sync Tracking Issue for WP 6.5 to note this PR does not require a backport for WP 6.5. |
What?
This PR stabilizes the pattern overrides block context, and partially removes the pattern overrides experiment.
Four core blocks are currently supported for pattern overrides, and the code in
lib/block-supports/pattern.php
previously added a way for those blocks touseContext
when the pattern experiment was active. In this PR I'm instead adding theuseContext
declarations directly to the block.json files.Why?
This should help with:
Testing Instructions
Both should work the same as in
trunk
.