elementary / files

File browser designed for elementary OS
https://elementary.io
GNU General Public License v3.0
330 stars 77 forks source link

Accidental user actions such as changing file permissions should be reversible #1121

Open 4jNsY6fCVqZv opened 4 years ago

4jNsY6fCVqZv commented 4 years ago

Unfortunately, I accidentally changed some permissions, but I can't remember which and how their original state was. Affects the Permissions tab in the file settings in the right-click menu.

Maybe an Undo button could be shown as soon as critical changes are made?

jeremypw commented 4 years ago

There is code for undoing permissions already (with <Ctrl>Z) in the core library but it is not working when permissions are changed with the Properties window because that widget changes the file attributes directly, by-passing core code - which seems silly. Never noticed that before - I have never had cause to undo a permission change. It should not be too difficult to have the PropertiesWindow use core code for changing permissions.

Have to get UX team input on having an Undo button - there isn't one in the main window.

4jNsY6fCVqZv commented 4 years ago

Thank you for taking care of the issue!

I'm also wondering: Are there other critical/sensitive actions in Files besides deleting files and giving access permissions that could benefit from an Undo function?

jeremypw commented 4 years ago

The undo manager only covers file operations at the moment - all of these (except permanent delete) should be covered. Please let us know if you find any more that are not. Other actions like create/delete bookmark are not considered critical and are not covered. Also actions performed by contractors and the color tag plugin are not undoable at the moment. Please raise an issue if there is something else you think should be undoable.

4jNsY6fCVqZv commented 4 years ago

Do you think a solution makes sense in the context of https://github.com/elementary/files/pull/1132?

Would you like to include actions performed by contractors and the color tag plugin in Undo?

jeremypw commented 4 years ago

I do not think it is practical for Files to provide undo for external contractor apps. I guess color tag undo might be feasible if there were a demand for it but it does not seem to be a priority.

4jNsY6fCVqZv commented 4 years ago

I agree. What do you think of the first part of the comment?

jeremypw commented 4 years ago

When porting to Vala it is usually simpler to initially do a straight port unless the fix is very simple. I'll look into it.

4jNsY6fCVqZv commented 4 years ago

Could you or someone else from the community imagine to work on a solution here?

jeremypw commented 4 years ago

This and many other issues it would be nice to fix but there are a lot of outstanding PRs awaiting review so there is little incentive to add to that queue - it is more important to get existing code either merged or rejected.

4jNsY6fCVqZv commented 1 year ago

@tintou Could you imagine to work on it?