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

Add support for allowedBlocks attribute in block variations #65851

Open
stevencamilleri-g2m opened this issue Oct 3, 2024 · 1 comment
Open
Labels
[Block] Navigation Affects the Navigation Block [Feature] Block Variations Block variations, including introducing new variations and variations as a feature [Type] Enhancement A suggestion for improvement.

Comments

@stevencamilleri-g2m
Copy link

What problem does this address?

Currently there is no way of determining the allowed block types for a variation of a parent block (i.e. limiting the allowed blocks for a Navigation block variation to only support core/navigation-link).

What is your proposed solution?

Add support via an allowedBlocks attribute (like the group block has) to allow developers to define the supported block types on each instance, making it also changeable per instance. This would be more reliable, as the allowed block types would be stored throughout a block variation instance’s life.

@stevencamilleri-g2m stevencamilleri-g2m added the [Type] Enhancement A suggestion for improvement. label Oct 3, 2024
@talldan talldan added [Block] Navigation Affects the Navigation Block [Feature] Block Variations Block variations, including introducing new variations and variations as a feature labels Oct 3, 2024
@talldan
Copy link
Contributor

talldan commented Oct 3, 2024

Here's a link to the related conversation in slack - https://wordpress.slack.com/archives/C02QB2JS7/p1727941224001089. (it requires a wordpress.org account to access it)

@gziolo gziolo mentioned this issue Oct 10, 2024
69 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Feature] Block Variations Block variations, including introducing new variations and variations as a feature [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants