-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Prioritize existing placeholder
over bindingsPlaceholder
#65154
Block Bindings: Prioritize existing placeholder
over bindingsPlaceholder
#65154
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: -1 B (0%) Total Size: 1.78 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.
Unrelated but surprising, when transforming the Paragraph into Heading, the |
I discovered what the root issue is.
In effect, |
What?
Respect existing
placeholder
attribute when it exists over the one provided by the Block Bindings API.Why?
We're setting a more helpful placeholder if the block has bindings. While that's awesome and works as intended most of the time, if the block already has an existing placeholder, that value is lost, but it should've been prioritized.
How?
Prioritize
placeholder
in the applicable places (placeholder
andaria-label
.)Testing Instructions
Register a new post meta field on the server:
In Gutenberg...
The result should match the screenshot below.
Side note: The 2nd paragraph is empty because the value returned from the server is an empty string. I'm not sure that's intended, but that's what we have right now in
trunk
. 🤔 I'm also unable to edit the value, which is weird considering recently we've fixed a similar bug.Screenshots or screencast