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

Custom Pattern: Each time you switch pattern categories, the number of custom patterns increases #51872

Closed
t-hamano opened this issue Jun 25, 2023 · 2 comments
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

Description

It is a strange behavior, but every time I switch categories in the main inserter, the number of registered custom patterns increases. This problem appears to occur when multiple custom patterns are registered. Also, I don't think this is the intended behavior, but the custom patterns appear in all categories.

Step-by-step reproduction instructions

  • Register two patterns with Synced turned off from the Library menu in the Site Editor.
  • Open the main block inserter.
  • Click Patterns tab.
  • Click Custom patterns category.
  • Two patterns should appear correctly.
  • Switch to other categories.
  • One custom pattern is added.
  • Return to Custom patterns category.
  • The number of custom patterns increases to three.
  • Repeat to switch categories.
  • Each iteration should increase the number of custom patterns.

Screenshots, screen recording, code snippet

c22f1fcfc097fa80150a073597e14f6f.mp4

Environment info

No response

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

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Jun 25, 2023
@glendaviesnz
Copy link
Contributor

This PR seems to also fix this issue. Can you please test against that PR @t-hamano and confirm?

@talldan
Copy link
Contributor

talldan commented Jun 28, 2023

Fixed by #51947

@talldan talldan closed this as completed Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended
Projects
3 participants