Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add categories to the "New Page" pattern modal #46498

Open
simison opened this issue Dec 13, 2022 · 8 comments
Open

Add categories to the "New Page" pattern modal #46498

simison opened this issue Dec 13, 2022 · 8 comments
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Comments

@simison
Copy link
Member

simison commented Dec 13, 2022

What problem does this address?

As implemented previously, when registering patterns with 'blockTypes' => array( 'core/post-content' ) annotation, they appear in a modal when creating a new page:

Screenshot 2022-12-13 at 12 41 20

The small modal becomes unwieldly very quickly when a theme or plugin registers dozens of patterns:

Screen.Recording.2022-12-13.at.12.50.08.mov

What is your proposed solution?

  • Add possibility to add categories.
  • Increase the modal size to (almost) full browser size to accommodate categories and, be able to see patterns better
  • Add search input. When it makes sense to add lots of patterns, it makes sense to let search them, too.

Basically re-use already existing "Explore all patterns" modal. That seemed to be intention in the original issue as well.

Screenshot 2022-12-13 at 12 59 27

Categories could be pulled from existing categories key, without needing to introduce new APIs.

@simison simison added the [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced label Dec 13, 2022
@simison simison mentioned this issue Dec 13, 2022
14 tasks
@annezazu annezazu added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. labels Dec 13, 2022
@annezazu
Copy link
Contributor

Tagging in @WordPress/gutenberg-design on this one too :)

@paaljoachim
Copy link
Contributor

Thank you for sharing @simison and @annezazu !
Sounds like a very good idea to me!
As a bigger modal will give more space to the explorations of the current patterns being looked at.

@jasmussen
Copy link
Contributor

Proposed solution of using existing "Explore all" sounds good.

I think there's still an opportunity for further unification at a later time. We have a couple of very adjacent modals:

  • This one
  • Explore all patterns
  • Choose a starting pattern when adding a new page
  • Choose a starting pattern when creating a new template

All of those could be considered as part of a whole, and look and behave similarly.

@jameskoster
Copy link
Contributor

Re unification, I just wanted to point to issue #39308 which has some designs for that. They probably need some polishing, but I'm sharing here in case we want to implement any of those ideas.

@paaljoachim
Copy link
Contributor

There is a PR here which addresses the modal size and is associated to this issue:
#49722

@simison
Copy link
Member Author

simison commented Jan 8, 2024

@jameskoster @jasmussen I was looking at new page modal and while it looks great, it still feels like category-list would be very helpful for sites with lots of patterns?

image

@jameskoster
Copy link
Contributor

I'm wondering whether this modal could be updated to utilise the data view work and make use of all the associated features (search/filtering, view options, pagination, etc). That would allow users to filter by category, and anything else deemed useful.

@simison
Copy link
Member Author

simison commented Dec 20, 2024

@scruffian I think this can be closed now that #66836 merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants