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

Support undo-ing file deletion #1830

Open
nathanfranke opened this issue Nov 13, 2020 · 6 comments
Open

Support undo-ing file deletion #1830

nathanfranke opened this issue Nov 13, 2020 · 6 comments

Comments

@nathanfranke
Copy link
Contributor

nathanfranke commented Nov 13, 2020

Describe the project you are working on:

Godot Test Project

Describe the problem or limitation you are having in your project:

image

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

We should support restoring these deleted files. Simply CTRL+Z or Scene->Undo should do the operation.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

There are two possible ways that I think this could be implemented.

  1. .godot/deleted folder.
  1. System trash can
  • Pro: Seemingly Intuitive for users
  • Pro: If working with temporary projects - proposed here

If this enhancement will not be used often, can it be worked around with a few lines of script?:

This is used very often

Is there a reason why this should be core and not an add-on in the asset library?:

It would help everyone

@Calinou
Copy link
Member

Calinou commented Nov 13, 2020

I think it's fine to remove the confirmation dialog if the file is moved to trash instead (like Windows 8 onwards). That said, there's a known bug about this: godotengine/godot#42840

@YuriSizov
Copy link
Contributor

YuriSizov commented Nov 13, 2020

Delete Keyboard Shortcut

This is exactly the case highlighting this as a bad idea. Accidentally hit the button, miss that and thus miss that you need to undo it, and that's it, you've broken something unwittingly.

But this can be turned into an editor setting, I guess.

@nathanfranke nathanfranke changed the title Remove the delete files confirmation and support undo-ing the operation. Support undo-ing file deletion and (possibly) remove the popup dialog Nov 13, 2020
@nathanfranke
Copy link
Contributor Author

Delete Keyboard Shortcut

This is exactly the case highlighting this as a bad idea. Accidentally hit the button, miss that and thus miss that you need to undo it, and that's it, you've broken something unwittingly.

I edited the title to reflect that this is certainly something we can discuss. Personally, I don't think it is easy to accidentally hit the delete button and that is why it rarely has a confirmation dialog (I use Dolphin file manager, but I don't remember this happening on PCMan File Manager or Windows' file manager

@YuriSizov
Copy link
Contributor

For what it's worth, on Windows you do have a confirmation in the explorer.

image

@FeatherAntennae
Copy link

FeatherAntennae commented Nov 19, 2020

I don't know how feasible the undo-ing would be, but that could be a nice thing to have.
I'm not for removing that dialogue though. It's a pretty basic concept for safety against destructive operations.
Not all OS handle this the same.

Here's two ways to improve the dialogue instead:

  • The default highlight should be on cancel.
  • We should have a setting to not show it, if possible with a "never show again" checkbox in the dialogue.

@nathanfranke nathanfranke changed the title Support undo-ing file deletion and (possibly) remove the popup dialog Support undo-ing file deletion Nov 19, 2020
@nathanfranke
Copy link
Contributor Author

nathanfranke commented Nov 19, 2020

Support for removing the delete dialog is pretty minimal it seems (Even I'm against removing it completely). As for replacing the dialog with a snackbar/toast, that discussion should be put in #1489 😃

Plus, there should only be one proposal per proposal, so I will make this one strictly about supporting undo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants