-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(workbench/view): fix issues preventing views from closing
The following issues have been fixed: - `CanClose` guard now also runs on child routes; - multiple views can be closed simultaneously, even if some views prevent closing; previously, Angular navigation was canceled, causing no views to be closed; - `CanClose` guard can now perform an Angular navigation, e.g., to display a dialog with routed content; closes #27, closes #344 BREAKING CHANGE: Interface and method for preventing closing of a view have changed. To migrate, implement the `CanClose` instead of the `WorkbenchViewPreDestroy` interface. The following snippet illustrates what a migration could look like: **Before migration:** ```ts class YourComponent implements WorkbenchViewPreDestroy { public async onWorkbenchViewPreDestroy(): Promise<boolean> { // return `true` to close the view, otherwise `false`. } } ``` **After migration:** ```ts class YourComponent implements CanClose { public async canClose(): Promise<boolean> { // return `true` to close the view, otherwise `false`. } } ```
- Loading branch information
1 parent
92ea485
commit 535816d
Showing
49 changed files
with
1,699 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.