-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Only use canUserEditValue
when setValues
is defined
#65566
Block Bindings: Only use canUserEditValue
when setValues
is defined
#65566
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested but conceptually it sounds like a great idea to add this additional safe-guard.
Size Change: +3 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
Flaky tests detected in ad24f57. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10993431241
|
You may use the |
I am not sure I understand what you mean here. If you refer to the UI to create and modify bindings, I believe that's different. This is to disable editing of the blocks when they are connected to a source that doesn't support it.
Yes, it should be locked when it is undefined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: 6584230 |
Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
I just cherry-picked this PR to the release/19.3 branch to get it included in the next release: ee598d0 |
What?
When a block bindings source is registered, I believe we shouldn't allow editing when
setValues
is not defined.Why?
It is confusing that users can edit the blocks but nothing will happen.
How?
Setting
canUserEditValue
to undefined whensetValues
is not defined.In order to add e2e tests, we need to register custom sources in the client. This is being done as part of this other pull request, so I thought of including the test there.
Testing Instructions
and
canUserEditValuereturns
true`.