Skip to content

Commit

Permalink
release(workbench): v18.0.0-beta.9
Browse files Browse the repository at this point in the history
  • Loading branch information
danielwiehl authored and Marcarrian committed Nov 25, 2024
1 parent 6683bf5 commit de0d580
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 47 deletions.
52 changes: 52 additions & 0 deletions CHANGELOG_WORKBENCH.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
# [18.0.0-beta.9](https://github.com/SchweizerischeBundesbahnen/scion-workbench/compare/18.0.0-beta.8...18.0.0-beta.9) (2024-11-25)


### Bug Fixes

* **workbench/view:** invoke `CanClose` guard in view injection context ([07ba936](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/07ba93604ec6862936a11badf6957d8582a0b687)), closes [#578](https://github.com/SchweizerischeBundesbahnen/scion-workbench/issues/578)
* **workbench/view:** prevent `CanClose` guard from blocking workbench navigation ([12e9e91](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/12e9e9140cf8db11c8fc188f463503ccaaf35195)), closes [#558](https://github.com/SchweizerischeBundesbahnen/scion-workbench/issues/558)
* **workbench/view:** prevent closing views with a pending `CanClose` guard ([4326a63](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/4326a63665ac8a40bfb040250f9a66c582aed7c6))


### Features

* **workbench/view:** add functional `CanClose` guard, deprecate class-based guard ([c2ee531](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/c2ee531d483dbdbff72d468592908bb346002278))


### Deprecations

* **workbench/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} from '@scion/workbench';
import {Component} from '@angular/core';

@Component({})
export class ViewComponent implements CanClose {

public canClose(): boolean {
return true;
}
}
```

**After migration:**
```ts
import {Component, inject} from '@angular/core';
import {WorkbenchView} from '@scion/workbench';

@Component({})
export class ViewComponent {

constructor() {
inject(WorkbenchView).canClose(() => {
return true;
});
}
}
```


# [18.0.0-beta.8](https://github.com/SchweizerischeBundesbahnen/scion-workbench/compare/18.0.0-beta.7...18.0.0-beta.8) (2024-10-28)


Expand Down
78 changes: 32 additions & 46 deletions CHANGELOG_WORKBENCH_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,50 @@
# [18.0.0-beta.8](https://github.com/SchweizerischeBundesbahnen/scion-workbench/compare/18.0.0-beta.7...18.0.0-beta.8) (2024-10-28)
# [18.0.0-beta.9](https://github.com/SchweizerischeBundesbahnen/scion-workbench/compare/18.0.0-beta.8...18.0.0-beta.9) (2024-11-25)


### Bug Fixes

* **workbench/popup:** ensure the popup anchor not leaving view boundaries ([c629f49](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/c629f49f3ba520c2cd700a008e4ed0af1c86e01f))
* **workbench/view:** ensure view overlays align with view boundaries when view position changes ([2998295](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/29982951bf8290108d3b09104ebc456f3acb9f6c))
* **workbench/view:** invoke `CanClose` guard in view injection context ([07ba936](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/07ba93604ec6862936a11badf6957d8582a0b687)), closes [#578](https://github.com/SchweizerischeBundesbahnen/scion-workbench/issues/578)
* **workbench/view:** prevent `CanClose` guard from blocking workbench navigation ([12e9e91](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/12e9e9140cf8db11c8fc188f463503ccaaf35195)), closes [#558](https://github.com/SchweizerischeBundesbahnen/scion-workbench/issues/558)
* **workbench/view:** prevent closing views with a pending `CanClose` guard ([4326a63](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/4326a63665ac8a40bfb040250f9a66c582aed7c6))


### Features

* **workbench:** prevent tracking unwanted dependencies in effects ([7a7eaf8](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/7a7eaf847f3ed54dcc7eeab300cbde53700b8e46))
* **workbench/view:** add functional `CanClose` guard, deprecate class-based guard ([c2ee531](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/c2ee531d483dbdbff72d468592908bb346002278))


### BREAKING CHANGES
### Deprecations

* **workbench:** SCION Workbench requires `@scion/toolkit` version `1.6.0` or later.
* **workbench:** SCION Workbench requires `@scion/components` version `18.1.1` or later.
* **workbench:** Calling following workbench methods in a reactive (tracking) context (e.g., `effect`) now throws an error. Migrate by using Angular's `untracked()` function.
- `WorkbenchRouter.navigate`
- `WorkbenchService.registerPerspective`
- `WorkbenchService.switchPerspective`
- `WorkbenchService.resetPerspective`
- `WorkbenchService.closeViews`
- `WorkbenchService.switchTheme`
- `WorkbenchService.registerPartAction`
- `WorkbenchService.registerViewMenuItem`
- `WorkbenchLauncher.launch`
- `WorkbenchDialogService.open`
- `WorkbenchMessageBoxService.open`
- `NotificationService.notify`
- `PopupService.open`
- `WorkbenchPart.activate`
- `WorkbenchView.activate`
- `WorkbenchView.close`
- `WorkbenchView.move`
- `WorkbenchView.registerMenuItem`
- `WorkbenchDialog.close`
- `Popup.close`

**Migration Example**
* **workbench/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 {effect, inject, untracked} from '@angular/core';
import {WorkbenchRouter} from '@scion/workbench';
import {CanClose} from '@scion/workbench';
import {Component} from '@angular/core';

const workbenchRouter = inject(WorkbenchRouter);
@Component({})
export class ViewComponent implements CanClose {

// Before
effect(() => {
if (someSignal()) {
workbenchRouter.navigate(['path/to/view']);
public canClose(): boolean {
return true;
}
});
}
```

**After migration:**
```ts
import {Component, inject} from '@angular/core';
import {WorkbenchView} from '@scion/workbench';

@Component({})
export class ViewComponent {

// After
effect(() => {
if (someSignal()) {
untracked(() => workbenchRouter.navigate(['path/to/view']));
constructor() {
inject(WorkbenchView).canClose(() => {
return true;
});
}
});
}
```



52 changes: 52 additions & 0 deletions docs/site/changelog-workbench/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,58 @@
## [Changelog][menu-changelog] > Workbench (@scion/workbench)


# [18.0.0-beta.9](https://github.com/SchweizerischeBundesbahnen/scion-workbench/compare/18.0.0-beta.8...18.0.0-beta.9) (2024-11-25)


### Bug Fixes

* **workbench/view:** invoke `CanClose` guard in view injection context ([07ba936](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/07ba93604ec6862936a11badf6957d8582a0b687)), closes [#578](https://github.com/SchweizerischeBundesbahnen/scion-workbench/issues/578)
* **workbench/view:** prevent `CanClose` guard from blocking workbench navigation ([12e9e91](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/12e9e9140cf8db11c8fc188f463503ccaaf35195)), closes [#558](https://github.com/SchweizerischeBundesbahnen/scion-workbench/issues/558)
* **workbench/view:** prevent closing views with a pending `CanClose` guard ([4326a63](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/4326a63665ac8a40bfb040250f9a66c582aed7c6))


### Features

* **workbench/view:** add functional `CanClose` guard, deprecate class-based guard ([c2ee531](https://github.com/SchweizerischeBundesbahnen/scion-workbench/commit/c2ee531d483dbdbff72d468592908bb346002278))


### Deprecations

* **workbench/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} from '@scion/workbench';
import {Component} from '@angular/core';

@Component({})
export class ViewComponent implements CanClose {

public canClose(): boolean {
return true;
}
}
```

**After migration:**
```ts
import {Component, inject} from '@angular/core';
import {WorkbenchView} from '@scion/workbench';

@Component({})
export class ViewComponent {

constructor() {
inject(WorkbenchView).canClose(() => {
return true;
});
}
}
```


# [18.0.0-beta.8](https://github.com/SchweizerischeBundesbahnen/scion-workbench/compare/18.0.0-beta.7...18.0.0-beta.8) (2024-10-28)


Expand Down
2 changes: 1 addition & 1 deletion projects/scion/workbench/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scion/workbench",
"version": "18.0.0-beta.8",
"version": "18.0.0-beta.9",
"description": "SCION Workbench enables the creation of Angular web applications that require a flexible layout to arrange content side-by-side or stacked, all personalizable by the user via drag & drop.",
"license": "EPL-2.0",
"private": false,
Expand Down

0 comments on commit de0d580

Please sign in to comment.