Block Bindings: Remove the experimental flag#58089
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/compat/wordpress-6.5/blocks.php ❔ lib/experimental/blocks.php ❔ lib/experimental/editor-settings.php ❔ lib/experiments-page.php ❔ lib/load.php ❔ lib/compat/wordpress-6.5/block-bindings/block-bindings.php ❔ lib/compat/wordpress-6.5/block-bindings/class-wp-block-bindings.php ❔ lib/compat/wordpress-6.5/block-bindings/sources/pattern.php ❔ lib/compat/wordpress-6.5/block-bindings/sources/post-meta.php |
|
Flaky tests detected in 0fc3262. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7643069301
|
|
Looks like the unit test failures are due to this: https://core.trac.wordpress.org/ticket/60309 |
|
@michalczaplinski The PR removing the pattern overrides experiment is now merged, so there are a few conflicts to solve! I had a go at rebasing the branch against If that looks good you can reset your branch to the same state. If you decide to solve the conflicts yourself, you'll need to cherry-pick 3e611d0 onto your branch. That commit updates the e2e tests for pattern overrides so that the block bindings experiment isn't enabled as part of the test set up. |
b0b4940 to
3e611d0
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
Awesome, thank you @talldan ! 🙏 Your rebase looks good to me so I've just pushed the same commits to this branch. |
|
Thanks for the review @c4rl0sbr4v0 ! I've realized I should make the changes suggested in the Core backport here as well: WordPress/wordpress-develop#5888 (review) |
|
Actually, those changes would be better in a separate PR so that we keep it clean, but we should also merge them today. I ll work on it ASAP. |
|
Hi @michalczaplinski ! I followed the instructions provided, and is not working. Example provided: Part of the code that handles the custom field printing: // If the attribute is not in the list, process next attribute.
if ( ! in_array( $binding_attribute, $allowed_blocks[ $block_instance->name ], true ) ) {
continue;
}In this case, makes it work. Is this expected? I'm worried that I don't have enough context to confirm it, so let me know! |
|
Heads up that the JSON for the paragraph in the testing instructions was incorrect and was attempting to bind the So in the description, I changed it from this:
To this:
|
1be72e2 to
5c29613
Compare
Co-authored-by: Carlos Bravo <37012961+c4rl0sbr4v0@users.noreply.github.com>
5c29613 to
a69d979
Compare
SantosGuillamot
left a comment
There was a problem hiding this comment.
I've tested it, and everything seems to work fine. 🙂 I tested all the blocks that are currently supported, a query loop, and the pattern overrides. Additionally, the experiments option is not there anymore.
|
I noticed this PR was merged after I raised the PHP Sync Tracking Issue for WP 6.5 and has changed PHP files that may need backporting to WP Core. Please forgive the ping, but I marked as |
|
@getdave Backported to Core in WordPress/wordpress-develop#5888 |
What?
Following up on #56867 and #57742.
Removes the experimental flag for Block Bindings:
gutenberg-partial-pattern-syncingcheckTIP: Hide the whitespace when looking at the diff.
Testing Instructions
Register a custom field. E.g.:
Open a post or page.
Insert a Paragraph block
Open the Code Editor
Inside the Paragraph block, add the following snippet which adds a binding:
{"metadata":{"bindings":{"content":{"source":{"name":"post_meta","attributes":{"value":"text_custom_field"}}}}}}Open the frontend of the site and make sure that the
text_custom_fieldis present as the content of the Paragraph.Also, make sure that the "Block bindings" experiement is no longer present on the GB Experiments page.