close
Skip to content

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

@simison

Description

@simison

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Design FeedbackNeeds general design feedback.[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions