Repository navigation
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.
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. |
ntsekouras
left a comment
There was a problem hiding this comment.
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. |
|
While I like the Undo link as part of the success notice, why can't the Undo command be added to where Apply and Cancel are located? Why does Undo have to be in an entirely different place, and once the notice goes away, there is no Undo? |
|
@TheJeffr0, you can also undo changes to the image from the top toolbar. The snackbar action just improves UX. The original issue is still open for design feedback to decide on a more prominent location. |
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