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

Site Editor - Pattern Categories - Add a filter in Gutenberg to extend the order #77130

Closed
miksansegundo opened this issue May 19, 2023 · 7 comments
Labels
[Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue.

Comments

@miksansegundo
Copy link
Contributor

miksansegundo commented May 19, 2023

What

Add a new filter to customize the order of categories and patterns in the editor.

The order of categories is alphabetical after WordPress/gutenberg#53835 was merged.

Category list in the pattern inserter

Screenshot 2567-01-02 at 15 59 14

Category list in the patterns admin

Screenshot 2567-01-02 at 15 59 30

Why

Because different projects using the editor have different needs.

The editor doesn't allow extending the sorting in:

How

Adding hooks/filters to customize the ordering will be useful for us in Dotcom and others too.

@miksansegundo miksansegundo added the [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. label Jan 2, 2024
@miksansegundo miksansegundo changed the title Site Editor - Pattern Inserter - Add a filter in Gutenberg to control the order of categories and patterns Site Editor - Pattern Categories - Add a filter in Gutenberg to extend the order Jan 2, 2024
@miksansegundo
Copy link
Contributor Author

miksansegundo commented Jan 2, 2024

@richtabor what do you think about adding this feature in core? I can create issues and maybe a PR too. cc: @Automattic/lego

@richtabor
Copy link

What order would dotCom use that shouldn't be used outside of dotCom? I'm not particularly convinced reordering is a good idea, but I may be convinced otherwise.

@miksansegundo
Copy link
Contributor Author

Dotcom had the Featured category on top of the rest.

The alphabetical order works well, and I think that having the same order in Core and Dotcom is more user-friendly.

@richtabor
Copy link

Following up here a bit late, but what about if we get something like this in core, moving All, My Patterns and Featured into a group above the rest? Then everything below it is alphabetically ordered?

CleanShot 2024-03-22 at 17 06 12

@miksansegundo
Copy link
Contributor Author

Looks good to me 👍

@richtabor
Copy link

richtabor commented Mar 25, 2024

@miksansegundo mind writing up an issue in Gutenberg to propose the changes?

@miksansegundo
Copy link
Contributor Author

Closing in favor of WordPress/gutenberg#60210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue.
Projects
None yet
Development

No branches or pull requests

2 participants