-
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: Fix disable bindings editing when source is undefined #58961
Block Bindings: Fix disable bindings editing when source is undefined #58961
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: +52 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
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 totally agree. The main issue right now is that the editor APIs are not public because we have to explore that part better. On the other hand, I believe we could use a more generic message and allow sources to override it. I included it as part of this issue to improve the UX: link. |
…#58961) * Disable editing if source is undefined * Add tests when source is undefined
I just cherry-picked this PR to the more/backports-for-beta3 branch to get it included in the next release: 50244c6 |
…#58961) * Disable editing if source is undefined * Add tests when source is undefined
What?
Right now, when users bind an attribute to a source that is not registered in the editor, it doesn't lock the UI. In this pull request, I'm trying to fix that.
Additionally, I'm adding some tests to check that.
Why?
It is the expected behavior for this initial version.
How?
Adding a conditional to check that.
Testing Instructions
Tests should cover the use cases.
For manual testing:
Ensure that the existing bindings keep working as expected:
In a page
Test paragraph
Test heading
Repeat the paragraph test but using a heading.
Test button
Test image
In a template
Go to a page template, for example, and repeat the process. In this case, the blocks can't show the value of the custom fields because it depends on each page. They should show a placeholder instead.
Test pattern syncing overrides