-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Filter to switch from the Interactivity API to the old implementation #52580
Filter to switch from the Interactivity API to the old implementation #52580
Conversation
@SantosGuillamot, I'd appreciate your review to make sure I didn't miss anything. Thanks 🙂 |
Closing as duplicate of @westonruter's #52579. |
@@ -471,7 +471,7 @@ function render_block_core_navigation( $attributes, $content, $block ) { | |||
// - we don't have a relationship to a `wp_navigation` Post (via `ref`). | |||
// ...then create inner blocks from the classic menu assigned to that location. | |||
if ( | |||
defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && | |||
apply_filters( 'gutenberg_block_core_navigation_use_interactivity_api', true ) && |
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.
Is this right? The code in here is not all related to Interactivity API.
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.
You're right, but let's use your PR instead: #52579
Flaky tests detected in d762b95. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5534847419
|
What?
Add filters to switch from the Interactivity API to the old implementation of the Navigation and File blocks.
Follow up on #52553.
Why?
To be able to keep improving those versions, which are still in WP Core (more context).
How?
Just replace the
IS_GUTENBERG_PLUGIN
constant which was used to avoid merging the Interactivity API in Core with two filters, one for each block:gutenberg_block_core_navigation_use_interactivity_api
gutenberg_block_core_file_use_interactivity_api
Testing Instructions
aria-expanded
switching totrue
on hover).micromodal
(check the network tab or accessibility issues likearia-expanded
not switching totrue
on hover).