-
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.
release(workbench-client): v1.0.0-beta.28
- Loading branch information
1 parent
4326a63
commit 6683bf5
Showing
4 changed files
with
134 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,45 @@ | ||
# [1.0.0-beta.27](https://github.com/SchweizerischeBundesbahnen/scion-workbench/compare/workbench-client-1.0.0-beta.26...workbench-client-1.0.0-beta.27) (2024-10-11) | ||
# [1.0.0-beta.28](https://github.com/SchweizerischeBundesbahnen/scion-workbench/compare/workbench-client-1.0.0-beta.27...workbench-client-1.0.0-beta.28) (2024-11-25) | ||
|
||
|
||
### Bug Fixes | ||
### Features | ||
|
||
* **workbench-client:** position document root as required by `@scion/toolkit` ([007e9c3](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/007e9c396dff4c2dde11c62d810b5997c034eca2)) | ||
* **workbench-client/view:** add functional `CanClose` guard, deprecate class-based guard ([ecd52b3](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/ecd52b3afe82c0e1353cf96be550f925e76a72d5)) | ||
|
||
|
||
### Deprecations | ||
|
||
* **workbench-client/view:** The class-based `CanClose` guard has been deprecated in favor of a functional guard that can be registered on `WorkbenchView.canClose`. | ||
|
||
Migrate by registering a callback on `WorkbenchView.canClose` instead of implementing the `CanClose` interface. | ||
|
||
**Before migration:** | ||
```ts | ||
import {CanClose, WorkbenchView} from '@scion/workbench-client'; | ||
import {Beans} from '@scion/toolkit/bean-manager'; | ||
|
||
export class ViewComponent implements CanClose { | ||
|
||
constructor() { | ||
Beans.get(WorkbenchView).addCanClose(this); | ||
} | ||
|
||
public canClose(): boolean { | ||
return true; | ||
} | ||
} | ||
``` | ||
|
||
**After migration:** | ||
```ts | ||
import {WorkbenchView} from '@scion/workbench-client'; | ||
import {Beans} from '@scion/toolkit/bean-manager'; | ||
|
||
export class ViewComponent { | ||
|
||
constructor() { | ||
Beans.get(WorkbenchView).canClose(() => { | ||
return true; | ||
}); | ||
} | ||
} | ||
``` |
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