feat: improve multiple deletion process#1846
Conversation
be596a9 to
ee40709
Compare
7e60432 to
0fe077c
Compare
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
…n with count of files Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
DCO Remediation Commit for Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com> I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: c1c6cda I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 34ec547 I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 18aa9fc Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
0fe077c to
f5fd7d8
Compare
…to feat/improve-multiple-deletion-process
…zzzzzard/vscode-sas-extension into feat/improve-multiple-deletion-process
…e saving it Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
…mediately deleting them Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
|
Looks good, thanks Elijah! |
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
…to feat/improve-multiple-deletion-process
scottdover
left a comment
There was a problem hiding this comment.
Hey @Wizzzzzzard. I haven't looked through all of this yet, but here are my general thoughts:
- It was decided a while ago that we don't need a confirmation when moving files to a recycle bin. My assumption is that that still holds. With that in mind, I think we can remove the recycling bin notifications
- For deletion, since the number of deletions is somewhat unbounded, I'd suggest keeping it simple and having two messages: One for single deletion, and one for multiple deletion. For multiple deletion, I'd stick to a message like "Are you sure you want to permanently delete {count} items?" without relying on spelling out every file. That'll hopefully cut down on some of the logic here
- Last, for the dirty files issue, I'm wondering if a single message like this works for all cases: "The selected folders contain unsaved files, are you sure you want to delete?"
Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com> fix: ensuring consistent localization Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
…to feat/improve-multiple-deletion-process
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
|
@scottdover I've actioned your feedback by removing the recycling notifications and simplifying the delete logic down, if you would be ok to re-review when you get the chance? :) |
| const itemHasUnsavedFiles = isContainer | ||
| ? await this.contentDataProvider.checkFolderDirty(resource) | ||
| : false; |
There was a problem hiding this comment.
How is this different than hasUnsavedFiles? Presumably, if we have a single deletable item, then it should've have already triggered this same code up on line 133-137. I think we can probably clean this up.
| : Messages.DeleteButtonLabel, | ||
| )); | ||
| } else { | ||
| confirmed = true; |
There was a problem hiding this comment.
Since we default to confirmed = true here and down on line 189, I'm wondering if it makes more sense to get rid of this else case and the one below and instead start w/ let confirmed = true;
| (resource: ContentItem) => | ||
| this.contentDataProvider.canRecycleResource(resource), | ||
| ); | ||
| const permanentDelete = |
There was a problem hiding this comment.
I was trying to understand this a bit more. From my general understanding, I would suspect permanentDelete means we have something that cannot be recycled. Could this be simplified to something like...
const permanentDelete = deletableItems.some(
(resource: ContentItem) =>
!this.contentDataProvider.canRecycleResource(resource),
);
|
Hey @Wizzzzzzard . Our |





Summary:
Implements a single confirmation dialog for multi-file deletion instead of prompting for each file individually. When users select multiple files or folders and choose to delete them via the context menu, they now see one confirmation dialog showing the total count of items to be deleted, rather than being prompted separately for each item.
DeleteMultipleWarningMessage,RecycleMultipleWarningMessage,RecycleMultipleDirtyWarning) inconst.tsto support batch deletion confirmationsdeleteResourcecommand inindex.tsto collect all selected items and show a single confirmation based on the total countAddresses #1290
Testing:
How did you test this change?
TODOs: