-
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 Editor: Add notice action to revert image to original after cropping #67314
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: +20 B (0%) Total Size: 1.82 MB
ℹ️ View Unchanged
|
Flaky tests detected in fbbc529. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12031660762
|
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.
Thanks for the PR George!
This in essence is just like clicking the undo
button after changing the image. I saw in the original issue that finding the original issue might be quite convoluted and not worth it, but I'm not sure this undo
in the notice brings much value..
Maybe @jasmussen can share some thoughts, since he commented at the issue?
A more visible "Undo" action can be an easy win here; according to the original report, not everyone is aware that changes can be undone using the top toolbar. |
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.
A more visible "Undo" action can be an easy win here; according to the original report, not everyone is aware that changes can be undone using the top toolbar.
Okay, let's land this, but I'm not sure if we want to close the original issue. I mean we could probably add a role:local
attribute to keep the original image or something and not rely on filename. 🤔
Not a strong opinion, but as a snackbar, this seems okay to add, since in context of the operation, a sort of "Undo" reminder can be a good tip. |
What do you mean? The solution doesn't rely on the filename; it calls |
If you're bad at using a pointer device, you do have to be quick to catch the link in the snackbar 😄 |
Actually, the snackbar sits there for 10 seconds, way too long. I'd much rather it stayed on screen much shorter, and was only used for things where the action is in the tip category: "by the way, you can undo this". In this case, that's still fine, because you could use use the undo button. Or press ⌘Z. |
I meant for the original issue that we could keep the original image in block's attributes and we could have a way to know that original image without searching the file system. |
Okay, I think I finally got it. I'm going to merge this. Let's continue discussing a more permanent "Revert to original" button in the issue. |
What?
Part of #43882.
PR adds an "Undo" action to the image editing notices to easily revert it to its original state.
Why?
See #43882.
Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast
CleanShot.2024-11-26.at.17.10.50.mp4