Skip to content

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

Merged
ntsekouras merged 1 commit intotrunkfrom
fix/gutenberg-prefix-block-library
Feb 1, 2023
Merged

Block Library: Don't use methods with the 'gutenberg_' prefix#47649
ntsekouras merged 1 commit intotrunkfrom
fix/gutenberg-prefix-block-library

Conversation

@Mamaduka
Copy link
Copy Markdown
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 requested a review from ntsekouras February 1, 2023 13:56
@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 Beta/RC labels Feb 1, 2023
@github-actions
Copy link
Copy Markdown

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:

* @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
Copy Markdown
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
Copy Markdown
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 Beta/RC 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