-
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
Image block: Add reset button #64669
Conversation
Size Change: +42 B (0%) Total Size: 1.77 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.
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. |
Thanks again for the nice work. Should we add the Reset button also to Media & Text? Perhaps even more, is there a way to use the same "media replace" dropdown as a reusable component across all the various pieces? CC: @Mamaduka |
I think most core blocks use or should use the |
That seems reasonable! If you can add a media item, you should probably also be able to unset it. I assume it'd have the same UI as we're shipping? |
Yeah, we've already consolidated resetting UI; it doesn't make sense to change it now. |
Should i create a PR to Implement |
I don't think we need an ability to hide the Reset button, but otherwise a PR would be welcome! Thank you. |
* Add reset button on image block * Update argument on onSelectImage function Co-authored-by: akasunil <[email protected]> Co-authored-by: jasmussen <[email protected]> Co-authored-by: Mamaduka <[email protected]>
What?
There is no method to reset the image block. You can replace images but not remove them from blocks.
Why?
This PR adds a 'Reset' option to the toggle control that removes the selected image from the image block.
Testing Instructions
Screenshots or screencast
image-block-add-reset-button.webm