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
kevin940726
left a comment
There was a problem hiding this comment.
Tested well and code looks good! 👍
There was a problem hiding this comment.
Should we add the overrides attribute in block.json or should we do in #58105?
There was a problem hiding this comment.
Oh yeah, I did make that change but reverted it accidentally, I'll bring it back again.
|
@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.phppreviously added a way for those blocks touseContextwhen the pattern experiment was active. In this PR I'm instead adding theuseContextdeclarations directly to the block.json files.Why?
This should help with:
Testing Instructions
Both should work the same as in
trunk.