-
Notifications
You must be signed in to change notification settings - Fork 910
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
Add confirmation dialog before closing app #19139
Conversation
Pull Request Test Coverage Report for Build 2186479908
💛 - Coveralls |
what if i have multiple unsaved table designer, looking at the code I will be getting multiple notifications, right? |
If there are multiple unsaved table designers and try to close ADS.
|
Is table designer implemented as a custom editor in VS Code, or something else? Just want to make sure that we shouldn't be hooking into any VS Code editor-related functionality here (since editors already have this concept of prompting before closing) |
@chlafreniere Yes, the |
@alanrenmsft bump |
Chris mentioned another way of implementing this, I will see if i can figure it out. |
|
||
public _serviceBrand: undefined; | ||
private _providers = new Map<string, TableDesignerProvider>(); | ||
|
||
private async confirmBeforeExit(): Promise<boolean> { | ||
let openTableDesignerEditors = this._editorService.editors.filter(e => e instanceof TableDesignerInput); |
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.
seems like we can combine 34 and 35 into one line.
const dirtyTableDesigners = this._editorService.editors.filter(e => e instanceof TableDesignerInput && e.isDirty());
if (dirtyTableDesigners.length > 0) {
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.
is there a reason that this comment was not taken?
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.
it wasn't a big change and a suggestion so I didn't want to spend time making a minute non functional change and wait for the build.
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.
If you particularly want it in your specific style, I'll just edit this in my next PR
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.
that would be good. BTW, it would be nice not to leave open comments when you merge the PR, it is ok if you don't want to make certain changes, reply to it and mark it as resolved.
This PR fixes #19080
Updated screenshot-