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

Block Bindings: Expose bindable attributes through an annotation in the block definition #64756

Open
zaguiini opened this issue Aug 23, 2024 · 2 comments
Labels
[Feature] Block API API that allows to express the block paradigm. [Feature] Block bindings [Type] Enhancement A suggestion for improvement.

Comments

@zaguiini
Copy link
Member

What problem does this address?

As a plugin developer, there is currently no way of knowing whether or not a block attribute is bindable.

My current workaround is to hard code the list of known bindable attributes, but that might soon get outdated.

What is your proposed solution?

Add a new annotation to the block attribute definition explicitly stating that the attribute is bindable. Something like bindable: boolean.

@gziolo
Copy link
Member

gziolo commented Sep 9, 2024

There is a slightly related prior exploration from @retrofox for exposing the list of allowed blocks and attributes from the source:

@fabiankaegy described how we can build on top of the idea shared in this issue to open dynamic blocks for overrides/bindings:

@artemiomorales
Copy link
Contributor

artemiomorales commented Nov 4, 2024

If we use role: content to determine which attributes are bindable, would we still need a bindable: boolean flag?

If we go with role: content as the bindings enabler, I imagine some developers would want the ability to opt content attributes out of block bindings. To address this, one option is to use the flag, though perhaps creating a list and accompanying filter for NOT_ALLOWED_BLOCKS could be a better approach.

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 bindings [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants