gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

WP 6.3-beta3: User is not given the choice in the patterns admin of what type of pattern to create (synced/unsynced)

Open bvlgn opened this issue 3 years ago • 3 comments

Description

When adding a new pattern using the Add New button on the admin screen the user is not presented with the dialog to choose wether he wants to add a synced or an unsynced pattern.

The pattern will thus by marked as synced and the user has no option to change that to unsynced

Step-by-step reproduction instructions

  1. Go to /wp-admin/edit.php?post_type=wp_block
  2. Click on the [Add New] button
  3. The pattern is added as a synced pattern (no choice given)

Screenshots, screen recording, code snippet

No response

Environment info

WordPress: 6.3-beta3

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

bvlgn avatar Jul 05 '23 13:07 bvlgn

Hi, Thanks for reporting; I am able to reproduce this as well on Gutenberg 16.1.1, WP 6.2

I am not sure if this is the intentional behavior and right now, the workflow (for creating patterns - both sync and unsynced) is very unclear.

What is now the expected user flow for creating patterns?

(In the mean time, I suppose you could use register_block_pattern for registering unsynced block patterns and then using the above directions you mentioned to create a synced pattern (aka: reusable block)

skorasaurus avatar Jul 05 '23 15:07 skorasaurus

I am not sure if this is the intentional behavior

I am testing this new functionality introduced in 6.3. In 6.2 this was expected behavior, but since 6.3 the wp_block pattern is being used to store both synced patterns (in wp 6.2 called reusable blocks) en standard/unsynced patterns (this is new). At other places in the updated WP 6.3 UI the user is shown a dialog to set the desired pattern type, but they forgot to do the same for the Add New button, hence my beta bug report, so that it can be fixed before the final WP6.3 release ;-)

The dialog as shown in other places in WP 6.3, e.g. when you convert selected blocks via the more menu in the block editor to a pattern:

Scherm­afbeelding 2023-07-05 om 18 11 53

This modal should also be shown when the user clicks on the Add New button in the admin screen.

bvlgn avatar Jul 05 '23 16:07 bvlgn

Just to close the loop, can confirm this is a regression and a PR is in progress to help address this! Thanks so much for reporting and testing ✨

annezazu avatar Jul 06 '23 18:07 annezazu