WP 6.3-beta3: User is not given the choice in the patterns admin of what type of pattern to create (synced/unsynced)
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
- Go to /wp-admin/edit.php?post_type=wp_block
- Click on the [Add New] button
- 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
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)
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:
This modal should also be shown when the user clicks on the Add New button in the admin screen.
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 ✨