Skip to content

Hide blocks from inserter when multiple is set to false #61415

@roykho

Description

@roykho

What problem does this address?

Currently we have a definition in the block.json to say supports: { "multiple": false }. This in theory should prevent a block to appear or to be added more than once. However this doesn't actually do that. Instead it just displays a message stating 'This block can only be used once.' but in fact it will still appear in the editor and in the frontend.

What is your proposed solution?

I think it would be more intuitive if the block is hidden from the inserter once there is already a block present. In that way, you can't even add another block to the page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] InserterThe main way to insert blocks using the + button in the editing interface[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