Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#59305 closed enhancement (fixed)

Make wp_block action notices reference patterns instead of blocks

Reported by: aaronrobertshaw's profile aaronrobertshaw Owned by: isabel_brison's profile isabel_brison
Milestone: 6.4 Priority: normal
Severity: minor Version:
Component: Posts, Post Types Keywords: has-patch commit
Focuses: Cc:

Description

First reported in https://github.com/WordPress/gutenberg/issues/53370

Now that reusable blocks have been renamed to patterns, it doesn't make sense to reference blocks in the wp_block action notices, e.g. "1 block moved to the Trash".

Instead, these notices should read something like: "1 pattern moved to the Trash."

Step-by-step reproduction instructions:

  1. Add a new pattern via wp-admin/post-new.php?post_type=wp_block
  2. Navigate back to the Patterns wp-admin page: wp-admin/edit.php?post_type=wp_block
  3. Perform actions such as deleting or restoring the new pattern
  4. Note the notices refer to a "block"

Change History (9)

This ticket was mentioned in PR #5163 on WordPress/wordpress-develop by @aaronrobertshaw.


3 months ago
#1

  • Keywords has-patch added

Update the wp-admin notices when performing actions on the wp_block post type to refer to patterns now that reusable blocks have been renamed to patterns.

First reported in https://github.com/WordPress/gutenberg/issues/53370.

Test instructions:

  1. Add a new pattern via wp-admin/post-new.php?post_type=wp_block
  2. Navigate back to the Patterns wp-admin page: wp-admin/edit.php?post_type=wp_block
  3. Perform actions such as deleting or restoring the new pattern
  4. The notices should now refer to a "pattern" instead of "block" as per screenshots below.

https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/60436221/987e1087-1de9-464d-9ab5-a18d425684ea
https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/60436221/f3d3e3cc-cf4c-46d0-b13b-f5cfba6411c2
https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/60436221/1211471c-2f76-430d-86a4-4426bf903d69

Trac ticket: https://core.trac.wordpress.org/ticket/59305

@mukesh27 commented on PR #5163:


3 months ago
#2

@aaronrobertshaw Is this PR part of 6.4?

@aaronrobertshaw commented on PR #5163:


3 months ago
#3

Thanks for reviewing @mukeshpanchal27 👍

Is this PR part of 6.4?

Reusable blocks were renamed to patterns in 6.3 so this would be good to land in 6.4.

#4 @mukesh27
3 months ago

  • Milestone changed from Awaiting Review to 6.4
  • Version trunk deleted

#5 @oglekler
3 months ago

@mukesh27 are we good to go with this ticket? I wonder if we need to add (sync patterns) into docs when we have reusable blocks as well, because it is getting a bit confusing, but it can be done separately if needed :)

#6 @mukesh27
3 months ago

  • Keywords commit added

@oglekler, yes, please open a new ticket. However, before it gets into the core, it should be merged into the GB (Gutenberg) repository, and then it can be backported.

@isabel_brison, could you kindly review and commit this? The changes are straightforward.

#7 @aaronrobertshaw
3 months ago

@mukesh27, FWIW, I couldn't see any references to these action notices in Gutenberg, only in core. I believe this is why the notices weren't updated when reusable blocks were first renamed to patterns.

So that said, I don't think there will be a Gutenberg PR to merge first unless I'm missing something.

Update: Nevermind me, I misunderstood the last comment :)

Last edited 3 months ago by aaronrobertshaw (previous) (diff)

#8 @isabel_brison
3 months ago

  • Owner set to isabel_brison
  • Resolution set to fixed
  • Status changed from new to closed

In 56606:

Posts: update admin notices to refer to patterns.

Updates wp_block action notices to refer to patterns instead of blocks.

Props aaronrobertshaw, mukesh27, oglekler.
Fixes #59305.

@isabel_brison commented on PR #5163:


3 months ago
#9

Committed in r56606.

Note: See TracTickets for help on using tickets.