Skip to content
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

Consider adding a “revert to original” button after altering or cropping an image #43882

Open
annezazu opened this issue Sep 5, 2022 · 3 comments
Assignees
Labels
[Block] Image Affects the Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs Decision Needs a decision to be actionable or relevant [Type] Enhancement A suggestion for improvement.

Comments

@annezazu
Copy link
Contributor

annezazu commented Sep 5, 2022

What problem does this address?

The ability to quickly get back to the original state of an image after making alterations. This came up in the sixteenth call for testing for the FSE Outreach Program:

I cannot remove a crop on an image, only replace it with the original from the media library. I would like to be told a new image was created. It would be nice if the image block would be smart enough to have a “revert to original” button and know which image in the media library to revert to.

What is your proposed solution?

In the same way there's an option to turn on/off a duotone filter, it would be neat to have a way to undo cropping to set things back to how the image originally was, perhaps both while still cropping and after the fact. I understand that this is likely complicated by the fact that a new image is created post cropping so I'm not sure if this is technically improbable/impossible. When thinking about current and future possibilities for altering images, being able to get back to an original/clean state will be important to figure out rather than expecting folks to rely on clicking the undo button or manually unsetting each feature: #23721 cc @jasmussen who I know has thought a lot about this area of work!

The lighthouse app offers a "reset" option for inspiration:
IMG_2415
IMG_2416

@annezazu annezazu added [Type] Enhancement A suggestion for improvement. [Block] Image Affects the Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Sep 5, 2022
@jasmussen
Copy link
Contributor

Good ticket, thanks for the ping!

When an image gets cropped, a copy of the original image gets saved. I.e. my-photo.jpgmy-photo-edited.jpg. Which means, beyond pressing "undo" in a single editing session, if we were to build a revert to original button, presumably all we'd have to go on to know an image had been edited, is the -edited suffix from the filename. If we can contextually show a revert button (perhaps in the inspector under dimensions) which when clicked would revert the image back to the un-suffixed version, then it seems feasible.

Where this gets a little gnarly, is that -edited is a pretty generic suffix, and a suffix that a photographer might likely use on their own volition without first going through image tools. In this case, a revert button might show up even though there isn't any original to revert back to! This is where the effort to build such a button might go from "small fix" to a great deal of potential complexity, which might not be worth it. In other words: would this tradeoff be acceptable in the name of keeping this simple?

Alternatively, I'm pretty convinced that #38990 can bring some pretty great options to the Image block in terms of masking instead of cropping:

uncrop

In the case of a masked image (perhaps an image from a pattern that was preset with custom dimensions and masking), reverting to the original would be a matter of pressing the "unmask" button in the inspector.

@Mamaduka
Copy link
Member

We can make the "Revert/Reset" part of the snack bar notice - #22573. Would that work?

@annezazu annezazu added this to Polish Apr 28, 2023
@priethor priethor moved this to Needs development in Polish Apr 30, 2023
@annezazu annezazu removed this from Polish May 1, 2023
@Mamaduka Mamaduka self-assigned this Nov 26, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 26, 2024
@Mamaduka Mamaduka removed the [Status] In Progress Tracking issues with work in progress label Nov 26, 2024
@Mamaduka
Copy link
Member

Merged a partial solution for this - #67314.

Do we also want to add something prominent, such as a "Revert to Orignal" button in the toolbar or sidebar?

@Mamaduka Mamaduka added the Needs Decision Needs a decision to be actionable or relevant label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs Decision Needs a decision to be actionable or relevant [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants