Skip to content

Blocks: Add support for the ancestor and parent settings for the block variation #48424

@gigitux

Description

@gigitux

What problem does this address?

Part of #41236.

It would be very interesting to have support for the ancestor setting for the block variations.

In WooCommerce, we use a variation of the Query Loop block called Products. To be consistent with the naming and offer a good UI/UX, we created a variation of the Post Title called Product Title.

image

We can't limit the block visibility without the' ancestor' setting. Users can add the Product Title to a post/page block. Being a variation of the Post Title, the behavior is the same as this latter, but for the user could be weird.

What is your proposed solution?

Having the possibility to change the visibility of the variation via the ancestor setting fixes this use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DevReady for, and needs developer efforts[Feature] Block APIAPI that allows to express the block paradigm.[Feature] Block VariationsBlock variations, including introducing new variations and variations as a feature[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