Block Bindings: Remove source items constrained by enums#76200
Block Bindings: Remove source items constrained by enums#76200
Conversation
|
Size Change: +10 B (0%) Total Size: 6.89 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 4fcb58e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22956525727
|
7f692b1 to
4fcb58e
Compare
|
Let's consider this as an alternative to #76085 after all. We might still get it into WP 7.0 Beta 5 which is scheduled for tomorrow. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
t-hamano
left a comment
There was a problem hiding this comment.
LGTM! For now, I think this is the best approach.
What?
Exempt
enum-constrained block attributes from Block Bindings support.Alternative to #76085.
Why?
Prior to this PR, it was possible to bind an
enum-constrained block attribute to an unconstrained Block Bindings source, which can lead to the attribute taking on a value that it's not permitted.In #76085, I explored permitting
enum-constrained block attributes as long as a source item was also constrained by anenumwhose possible values were all contained in the block attribute's, but ultimately decided against it.How?
By removing all Block Bindings source items from the UI for any block attribute whose values are constrained by an
enum.Testing Instructions
npm run wp-env-test).localhost:8889), activate the "Gutenberg Test Block Bindings" and "Gutenberg Test Server-Side Rendered Block" plugins.emojiattribute to any Block Bindings source (should say "No sources available")Screenshots or screencast
Follow-up
metadata.