Skip to content

Block API: Extract common logic as an initial screen for blocks that define variations #20582

Open

Description

Description

Follow-up for #16283.

In #18283, the Columns was refactored to use block variations API integrated into block variations picker.

We should take it to the next level and extract common logic as an initial screen for blocks that define variations so it's automated. The biggest challenge is how to detect whether a variation was already applied to the block. The issues pop up when you load again the content saved in the database.

Some ideas to explore were shared by @kjellr in #16283 (comment):

This isn't necessarily limited to layout though — theoretically, blocks could use this to allow users to choose any sort of default state for their block. A couple possible ideas:

Example - Map Example - Form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Needs DevReady for, and needs developer effortsReady for, and needs developer efforts[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[Feature] ExtensibilityThe ability to extend blocks or the editing experienceThe ability to extend blocks or the editing experience[Type] EnhancementA suggestion for improvement.A suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions