Skip to content

Pattern shuffle: The shuffle button is displayed when there is only a single pattern in a category #63902

@ndiego

Description

@ndiego

Description

The pattern shuffle button allows users to cycle through patterns in the same category. However, if there is only a single pattern in a category (admittedly this might be a rare occurrence), the shuffle button is still displayed. When clicked, there are no additional patterns to cycle through, so the button does nothing. This happens in both Zoom out mode and at the block level.

Step-by-step reproduction instructions

  1. Create a new pattern category
  2. Add a pattern to this category
  3. Insert the pattern and see that the shuffle button is displayed, but it doesn't do anything

Screenshots, screen recording, code snippet

shuffle-single.mp4

Environment info

  • WordPress 6.6
  • Gutenberg trunk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions