WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.19k forks source link

Consider using standard category UI for synced pattern categories #57129

Open richtabor opened 10 months ago

richtabor commented 10 months ago

I'm curious, is there a reason why synced patterns don't use the typical category selection UI that all other post types leverage? Perhaps to reduce the footprint of the create pattern modal?

They're currently implemented like tags, which lead to unexpected results (related https://github.com/WordPress/gutenberg/pull/57094).

Pattern categories:

CleanShot 2023-12-15 at 17 10 28

Other post types:

CleanShot 2023-12-15 at 17 13 57

talldan commented 10 months ago

@richtabor Pattern categories are non-hierarchical like tags, while post categories are hierarchical taxonomies.

So because of that the non-hierachical control is used for pattern categories. I don't see a reason why it couldn't be more like the control used for posts, but perhaps without the parent selector.

glendaviesnz commented 10 months ago

We did look at using something similar to the category selection, but it took up a look of extra space in the add pattern model. The form token tag input is much more compact in that context:

Screenshot 2023-12-18 at 7 07 29 PM

and we thought it best to have the same input in both places. A decision that can be revisiting of course.

If we stick with the token input maybe we should look at making the select list expand on focus in the sidebar control like it does in the modal?

Screenshot 2023-12-18 at 7 10 43 PM