Server directive processing: Process only root blocks#55739
Server directive processing: Process only root blocks#55739luisherranz merged 9 commits intotrunkfrom
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/experimental/interactivity-api/directive-processing.php ❔ phpunit/experimental/interactivity-api/directive-processing-test.php |
|
Let's get rid of the |
|
Sure, I'll update it and ping when is ready. |
phpunit/experimental/interactivity-api/directive-processing-test.php
Outdated
Show resolved
Hide resolved
34d60b0 to
705448b
Compare
|
Flaky tests detected in 72686e2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6796476784
|
|
The e2e interactive tests are failing. |
luisherranz
left a comment
There was a problem hiding this comment.
The e2e tests should be fixed now.
On second thought, I don't love this unit test because it's coupled with the implementation and won't be useful when we switch to processing the directives using other methods, but I think it's good enough for now.
Let's merge this to keep things moving 🙂
b51a282 to
448c391
Compare
|
Has this been backported to Core already? |
|
Yesss. |
Co-authored with @luisherranz
What?
Create a "root blocks" identifier, so the Interactivity API will only process the directives of these ones.
When we process the directives in PHP of a block that contains inner blocks, we already have the entire HTML, so, in order to prevent the function to run on a inner block render, we need a function to retrieve only the root blocks.
Testing Instructions
Unit tests are included in the PR
Testing Instructions for Keyboard
Screenshots or screencast