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

Block Library: Don't use methods with the 'gutenberg_' prefix #47649

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

Mamaduka
Copy link
Member

@Mamaduka Mamaduka commented Feb 1, 2023

What

PR replaces the gutenberg_ prefix in block PHP files.

Why?

These files are bundled with the package and should use methods also available in WP Core.

How?

  • Updates the styles engine function to use core alternatives.
  • Renamed filter callbacks to match the general naming convention.

Testing Instructions

CI tests should be green.

The navigation inspector animation testing instructions - #46342

@Mamaduka Mamaduka self-assigned this Feb 1, 2023
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Package] Block library /packages/block-library 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 Feb 1, 2023
@github-actions
Copy link

github-actions bot commented Feb 1, 2023

Flaky tests detected in df09832.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4065094619
📝 Reported issues:

@@ -382,7 +382,7 @@ function register_block_core_navigation_link() {
* @param array $settings Default editor settings.
* @return array Filtered editor settings.
*/
function gutenberg_enable_animation_for_navigation_link_inspector( $settings ) {
function block_core_navigation_link_enable_inspector_animation( $settings ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can do this quick fix for now(renaming), but we need to see what we're going to do with __experimentalBlockInspectorAnimation introduced here.

This setting is part of the auditing of experimental API for 6.2. @artemiomorales is this something that we want to stabilize or exclude from 6.2?

If the plan is to remain experimental, among the changes that will be needed, these functions(for the two other blocks) would need to be moved in different files and not remain here.

Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

Thank you George!

@ntsekouras ntsekouras merged commit 605217a into trunk Feb 1, 2023
@ntsekouras ntsekouras deleted the fix/gutenberg-prefix-block-library branch February 1, 2023 16:00
@github-actions github-actions bot added this to the Gutenberg 15.2 milestone Feb 1, 2023
@Mamaduka Mamaduka added the Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) label Feb 3, 2023
@Mamaduka Mamaduka removed Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) 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 Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants