Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gigitux opened this issue Feb 24, 2023 · 1 comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Feature] Block Variations Block variations, including introducing new variations and variations as a feature Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.

Comments

@gigitux
Copy link
Contributor

gigitux commented Feb 24, 2023

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.

@gigitux gigitux changed the title Add support for the ancestor setting for the block variation Add support for the ancestor and parent settings for the block variation Feb 24, 2023
@gziolo gziolo added [Feature] Block API API that allows to express the block paradigm. [Feature] Block Variations Block variations, including introducing new variations and variations as a feature [Type] Enhancement A suggestion for improvement. Needs Dev Ready for, and needs developer efforts labels Feb 25, 2023
@gziolo gziolo changed the title Add support for the ancestor and parent settings for the block variation Blocks: Add support for the ancestor and parent settings for the block variation Feb 26, 2023
@gziolo gziolo mentioned this issue Feb 26, 2023
58 tasks
@gziolo
Copy link
Member

gziolo commented Feb 26, 2023

This is a great idea to include both features for block variations. There might be more features that we could share with variations but we would need to identify what'd make sense.

Thank you for opening this issue that is now tracked in #41236 with other planned tasks for Block API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Feature] Block Variations Block variations, including introducing new variations and variations as a feature Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants