-
Notifications
You must be signed in to change notification settings - Fork 34.6k
Closed
Labels
debtCode quality issuesCode quality issueson-testplanworkbench-electronElectron-VS Code issuesElectron-VS Code issues
Milestone
Description
Electron provides sync and async dialog API (file pickers and message boxes). Today we mainly use the sync variant of the API which means that the JavaScript thread is stopped while the dialog is showing. However, for the usages of the dialogs with checkbox, we must use the async version because otherwise the result of the checkbox is not returned.
We should consider switching to the async version of the API to have a consistent usage pattern. However, there are bugs and issues that make this hard:
- multiple dialogs showing at once with async API are not showing up on all platforms (Dialogs: showing two async dialogs one after the other never shows second dialog electron/electron#11324)
- showing a sync dialog after an async can freeze the window (Dialogs: showing an async followed by sync dialog freezes the window electron/electron#11323)
In order to get this right imho we need to:
- make all dialog API promise based
- switch to the async version of all dialogs
- have a central place on the main thread to handle the case of multiple dialogs opening at the same time. we must ensure that at any time only 1 dialog is active and make sure that other dialog open requests are buffered and processed one after the other
Metadata
Metadata
Assignees
Labels
debtCode quality issuesCode quality issueson-testplanworkbench-electronElectron-VS Code issuesElectron-VS Code issues