-
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: Fix bindings image placeholder showing in patterns overrides #58252
Block Bindings: Fix bindings image placeholder showing in patterns overrides #58252
Conversation
@@ -333,7 +334,26 @@ export function ImageEdit( { | |||
} ); | |||
|
|||
// Much of this description is duplicated from MediaPlaceholder. | |||
const isUrlAttributeConnected = !! metadata?.bindings?.url; | |||
const { lockUrlControls = false } = useSelect( |
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.
Technically speaking, there is no need to return an object if there is only a single return value. Anyway, we can refactor that later when we introduce the helper React hook as discussed in #58233.
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.
Looks good 👍🏻
Size Change: +20 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
I just cherry-picked this PR to the release/17.6 branch to get it included in the next release: 6faff4e |
What?
Fix an issue where the image placeholder we created for block bindings was showing when adding an empty image in a pattern overrides.
Why?
Pattern overrides creators should be able to insert any media if wanted.
How?
I'm changing the conditional to understand that, in case of pattern overrides, it should show the normal placeholder.
Testing Instructions
In
trunk
right now, this placeholder is shown instead: