-
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
Server directive processing: Process only root blocks #55739
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. |
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.
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