Block Bindings: Add warning in attributes connected to invalid sources#65002
Conversation
|
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. |
|
Size Change: +30 B (0%) Total Size: 1.78 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 798d4dd. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10682780799
|
I think you are right and it is not related to this pull request. I can see the same problem in |
Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
|
@jasmussen Regarding your comment: I have opened a follow-up PR to have the same line-height for the attribute and the key: #65007. It doesn't change the line height of the Text component but, if that is changed in the future, it ensures it is properly applied to both places. I hope that's fine. |


What?
Alternative to #64893
Instead of stopping the rendering of the block, just shows the default content and add a warning message in the connections panel.
Why?
It is less invasive, especially for use cases where the invalid attribute wouldn't break the block.
How?
I'm just checking if the source exists and, if not, change the message and add the
isDestructiveproperty of theTextcomponent.Testing Instructions
Check that the warning is shown.

Check the paragraph still shows the default content.
You can repeat the process with an image with multiple attributes: