Skip to content

Conditional layout variant for displaying block variations in the Inspector #57253

@jarekmorawski

Description

@jarekmorawski

Currently, only the Group block has an interface for quickly switching variations. They're displayed as icons in the block details section in the Inspector. I'm working on a WooCommerce block that will have at least a dozen variations.

The existing grid-like, icon-based layout isn't suitable for displaying them all, so I thought we'd replace it with a dropdown if the number of variations is larger than 4 or 5. It's a small change that greatly enhances scalability and can work any number of items while keeping the interface clean and compact.

Here's a before and after:

Collection type

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Block VariationsBlock variations, including introducing new variations and variations as a feature[Feature] Inspector ControlsThe interface showing block settings and the controls available for each block[Status] In ProgressTracking issues with work in progress[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