-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Feature: Show confirmation dialog when the undo operation is to delete items. #11185
Conversation
I'm still a little confused as to why ctrl + z is deleting the folder, we should really match File Explorers behavior in that case and skip cutting the folder.
Can we show the regular confirm delete dialog? This already has the logic and indicates that it'll be permanently deleted.
Perhaps a new setting for "Show confirmation dialog when permanently deleting items". I think this was already requested so might be a good thing to do. |
In Files, creating a new folder like executing the following command.
Yes, this PR will do so.
I think we should add a settings for "Show confirmation dialog when the undo operation is to delete items" as the title of this PR. |
Would it be desirable to copy this behavior so that it's consistent?
Unchecking the "permanently" delete will send to trash, does this work?
My concern is that it's confusing to explain what this does. |
I don't think so. I think the folder rather should be deleted, not rename to "New folder" when undoing. Instead, it would be better to show a confirmation dialog if necessary.
Yes.
How about adding the following sub-settings? Show confirmation dialog when deleting items - On or Off |
I think it's still confusing, I think we should release the change without a setting and if users request an option to turn it off, we can reevaluate the behavior. |
Ok, the rest is a matter of the operation history. |
Which one is safer? |
I think it is safer to keep a history since the user may think that the history remains if they cancel. |
I committed a new code to keep the history. So I think it is ready to merge. |
Sorry, this code may not be good. I will try to fix it immediately. |
This reverts commit b595131.
Keep the history correctly
This time it's okay. |
src/Files.App/Filesystem/StorageHistory/Helpers/StorageHistoryHelpers.cs
Show resolved
Hide resolved
It looks like the issue with ctrl + z was fixed but I'm not seeing a confirmation prompt |
…Helpers.cs Co-authored-by: yaira2 <[email protected]>
I rebuilt the branch and it's working now, LGTM |
src/Files.App/Filesystem/StorageHistory/StorageHistoryOperations.cs
Outdated
Show resolved
Hide resolved
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.
LGTM
Resolved / Related Issues
Items resolved / related issues by this PR.
Details
A confirmation dialog will appear when the undo operation is to delete items to prevent unexpected deletion.
TODO
The setting should be separate from "Show confirmation dialog when deleting items". No new settings this time.the history is erased even though it is not actually undone. Is that right?keep the history.Is that right?It's ok.Validation
How did you test these changes?