Skip to content
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

Interactivity API: Fix interactivity api e2e tests. #59836

Merged
merged 3 commits into from
Mar 13, 2024

Conversation

cbravobernal
Copy link
Contributor

What?

Update the priority of removing the SSR for e2e tests to the number according to the current Core one.

@cbravobernal cbravobernal added [Type] Bug An existing feature does not function as intended [Packages] Interactivity /packages/interactivity labels Mar 13, 2024
@cbravobernal cbravobernal self-assigned this Mar 13, 2024
Copy link

github-actions bot commented Mar 13, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: c4rl0sbr4v0 <[email protected]>
Co-authored-by: sirreal <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

* Uses a priority of 100 to ensure that other filters can add additional
* directives before the processing starts.
*/
add_filter( 'render_block_' . $block_name, $process_interactive_blocks, 100, 2 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 70 to 74
/*
* Uses a priority of 100 to ensure that other filters can edit $parsed_block
* without crashing the SSR.
*/
add_filter( 'render_block_data', 'wp_interactivity_process_directives_of_interactive_blocks', 100 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core has 1 as the last argument here, although I think that's the default and maybe it should be omitted in core.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it should be omitted, pointless to add the default

@cbravobernal cbravobernal enabled auto-merge (squash) March 13, 2024 15:21
@cbravobernal cbravobernal merged commit dc648e5 into trunk Mar 13, 2024
56 checks passed
@cbravobernal cbravobernal deleted the fix/interactivity-api-e2e-tests branch March 13, 2024 15:48
@github-actions github-actions bot added this to the Gutenberg 18.0 milestone Mar 13, 2024
@getdave
Copy link
Contributor

getdave commented Mar 18, 2024

I think this PR probably should have been backported to wp/6.5 branch to avoid tests breaking there also. Going to look into doing that.

@getdave getdave added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Mar 18, 2024
getdave pushed a commit that referenced this pull request Mar 19, 2024
* Use same prioprity than in Core

* Backport priority filter

* Add argument

Co-authored-by: c4rl0sbr4v0 <[email protected]>
Co-authored-by: sirreal <[email protected]>
@getdave
Copy link
Contributor

getdave commented Mar 19, 2024

I just manually cherry picked this PR into the wp/6.5 branch in b9e73ef in order to get the tests passing in case we need further release for WP 6.5.

@getdave getdave added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Mar 19, 2024
@bph bph added [Feature] Interactivity API API to add frontend interactivity to blocks. and removed [Packages] Interactivity /packages/interactivity labels Mar 21, 2024
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Mar 27, 2024
* Use same prioprity than in Core

* Backport priority filter

* Add argument

Co-authored-by: c4rl0sbr4v0 <[email protected]>
Co-authored-by: sirreal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported to WP Core Pull request that has been successfully merged into WP Core [Feature] Interactivity API API to add frontend interactivity to blocks. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants