Repository navigation
List still dirty files when backup fails - #114064
Conversation
left a comment
There was a problem hiding this comment.
Matt Bierner (@mjbvz) I suggest to implement this inside the showErrorDialog method because there are 2 cases where an error can show: either because backup failed or because save/revert failed and in both cases it would help the user see the name of the editor, right?
So simply check for dirty working copies inside showErrorDialog and if there are, list the names below the error message, is what I suggest.
| this.dialogService.show(Severity.Error, msg, [localize('ok', 'OK')], { detail: localize('backupErrorDetails', "Try saving or reverting the dirty editors first and then try again.") }); | ||
| private showErrorDialog(msg: string, error?: Error, fileList?: string): void { | ||
| const advice = localize('backupErrorDetails', "Try saving or reverting the dirty editors first and then try again."); | ||
| const detail = fileList ? fileList + '\n' + advice : advice; |
There was a problem hiding this comment.
I wonder if the details part of the dialog should be like this:
Try saving or reverting the dirty editors first and then try again:
<list of editors>
Instead of the other way around?
There was a problem hiding this comment.
Also, is it worth including the actual error held in the 'error' variable in the dialog. It is pushed through the log service, but, not part of the dialogue.
commented
Jan 11, 2021
|
Thanks Benjamin Pasero (@bpasero)! I've moved the file list logic into For your other suggestion, here's the detail UI with the current change: And here's with the detail order swapped: I like prefer the current ordering and also think this matches our current 'save all' dialog: #113627 (comment) |
left a comment
There was a problem hiding this comment.
Matt Bierner (@mjbvz) I also prefer the first variant where it aligns with the save dialog.


Fixes #113627