1.0.0-beta.28 (2024-11-25)
- workbench-client/view: add functional
CanClose
guard, deprecate class-based guard (ecd52b3)
-
workbench-client/view: The class-based
CanClose
guard has been deprecated in favor of a functional guard that can be registered onWorkbenchView.canClose
.Migrate by registering a callback on
WorkbenchView.canClose
instead of implementing theCanClose
interface.Before migration:
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:
import {WorkbenchView} from '@scion/workbench-client'; import {Beans} from '@scion/toolkit/bean-manager'; export class ViewComponent { constructor() { Beans.get(WorkbenchView).canClose(() => { return true; }); } }
1.0.0-beta.27 (2024-10-11)
- workbench-client: position document root as required by
@scion/toolkit
(007e9c3)
1.0.0-beta.26 (2024-09-11)
- workbench-client/popup: support returning result on focus loss (ce5089e)
- workbench-client/popup: The method
closeWithError
has been removed from theWorkbenchPopup
handle. Instead, pass anError
object to theclose
method.
Before migration:
import {Beans} from '@scion/toolkit/bean-manager';
import {WorkbenchPopup} from '@scion/workbench-client';
Beans.get(WorkbenchPopup).closeWithError('some error');
After migration:
import {Beans} from '@scion/toolkit/bean-manager';
import {WorkbenchPopup} from '@scion/workbench-client';
Beans.get(WorkbenchPopup).close(new Error('some error'));
1.0.0-beta.25 (2024-08-28)
- workbench-client/dialog: unsubscribe previous title observable when setting new title observable (2e72b39)
1.0.0-beta.24 (2024-06-21)
- workbench-client/router: control workbench part to navigate views (af702d0)
- workbench-client/view: provide part via view handle (849d7f3)
- workbench-client/perspective: enable micro app to contribute perspective (f20f607), closes #449
1.0.0-beta.23 (2024-05-21)
-
workbench-client/message-box: The signature of the
WorkbenchMessageBoxService.open
method has changed.To migrate:
- To display a text message, pass the message as the first argument, not via the
content
property in the options. - To display a custom message box, pass the qualifier as the first argument and options, if any, as the second argument.
Example migration to display a text message
// Before Migration inject(WorkbenchMessageBoxService).open({ content: 'Do you want to continue?', actions: {yes: 'Yes', no: 'No'}, }); // After Migration inject(WorkbenchMessageBoxService).open('Do you want to continue?', { actions: {yes: 'Yes', no: 'No'}, });
Example migration to open a custom message box capability
// Before Migration inject(WorkbenchMessageBoxService).open({ title: 'Unsaved Changes', params: {changes: ['change 1', 'change 2']}, actions: {yes: 'Yes', no: 'No'}, }, {confirmation: 'unsaved-changes'}, ); // After Migration inject(WorkbenchMessageBoxService).open({confirmation: 'unsaved-changes'}, { title: 'Unsaved Changes', params: {changes: ['change 1', 'change 2']}, actions: {yes: 'Yes', no: 'No'}, });
- To display a text message, pass the message as the first argument, not via the
1.0.0-beta.22 (2024-05-07)
- workbench-client/router: remove
blank
prefix from navigation extras (446fa51)
-
workbench-client/view: Interface and method for preventing closing of a view have changed.
To migrate, implement the
CanClose
instead of theViewClosingListener
interface.Before migration:
class YourComponent implements ViewClosingListener { constructor() { Beans.get(WorkbenchView).addClosingListener(this); } public async onClosing(event: ViewClosingEvent): Promise<void> { // invoke 'event.preventDefault()' to prevent closing the view. } }
After migration:
class YourComponent implements CanClose { constructor() { Beans.get(WorkbenchView).addCanClose(this); } public async canClose(): Promise<boolean> { // return `true` to close the view, otherwise `false`. } }
-
workbench-client/router: Property
blankInsertionIndex
inWorkbenchNavigationExtras
has been renamed.Use
WorkbenchNavigationExtras.position
instead ofWorkbenchNavigationExtras.blankInsertionIndex
. -
workbench-client/view: Changed type of view id from
string
toViewId
.If storing the view id in a variable, change its type from
string
toViewId
.
1.0.0-beta.21 (2024-03-29)
- workbench-client/view: remove qualifier from microfrontend URL and params (57cfd9e)
- workbench-client/dialog: enable microfrontend display in a dialog (11d762b)
-
workbench-client/view: Removing qualifier from params has introduced a breaking change.
The view qualifier has been removed from the view parameters as it is static.
1.0.0-beta.20 (2023-10-31)
- workbench-client: enable microfrontend to display a splash until loaded (7a79065)
- workbench-client: provide workbench color scheme (ed63b22)
1.0.0-beta.19 (2023-10-10)
1.0.0-beta.18 (2023-05-23)
- workbench-client: consolidate workbench view handle (3f6fb22)
-
workbench-client: consolidating workbench view handle introduced a breaking change.
The following APIs have changed:
WorkbenchView.viewId
=>WorkbenchView.id
1.0.0-beta.17 (2023-02-10)
- workbench-client/router: ignore matrix params to resolve views for navigation (ce133bf), closes #239
-
workbench-client/router: adding support for closing views that match a pattern introduced a breaking change in the Workbench Router API.
The communication protocol between host and client is backward compatible, so you can upgrade the host and clients independently.
To migrate:
- Use
close=true
instead ofcloseIfPresent=true
in navigation extras to instruct the router to close matching view(s). - Parameters now support the asterisk wildcard value (
*
) to match views with any value for that parameter.
Close views
// Capability this.manifestService.registerCapability({ type: 'view', qualifier: {component: 'user'}, params: [ {name: 'id', required: true}, {name: 'param', required: false}, ], properties: { path: 'user/:id', }, }); // Before migration: optional params affect view resolution this.workbenchClientRouter.navigate({component: 'user'}, {target: 'blank', params: {id: 1, param: 1}}); // opens view 1 this.workbenchClientRouter.navigate({component: 'user'}, {target: 'blank', params: {id: 1, param: 2}}); // opens view 2 this.workbenchClientRouter.navigate({component: 'user'}, {close: true, params: {id: 1, param: 1}}); // closes view 1 this.workbenchClientRouter.navigate({component: 'user'}, {close: true, params: {id: 1, param: 2}}); // closes view 2 // After migration: optional params do not affect view resolution this.workbenchClientRouter.navigate({component: 'user'}, {target: 'blank', params: {id: 1, param: 1}}); // opens view 1 this.workbenchClientRouter.navigate({component: 'user'}, {target: 'blank', params: {id: 1, param: 2}}); // opens view 2 this.workbenchClientRouter.navigate({component: 'user'}, {close: true, params: {id: 1}}); // closes view 1 and view 2
Close views matching a pattern (NEW)
// Capability this.manifestService.registerCapability({ type: 'view', qualifier: {component: 'team-member'}, params: [ {name: 'team', required: true}, {name: 'user', required: true}, ], properties: { path: 'team/:team/user/:user', }, }); // Open 4 views this.workbenchClientRouter.navigate({component: 'team-member'}, {params: {team: 33, user: 11}}); // opens view 1 this.workbenchClientRouter.navigate({component: 'team-member'}, {params: {team: 33, user: 12}}); // opens view 2 this.workbenchClientRouter.navigate({component: 'team-member'}, {params: {team: 44, user: 11}}); // opens view 3 this.workbenchClientRouter.navigate({component: 'team-member'}, {params: {team: 44, user: 12}}); // opens view 4 // Closes view 1 this.workbenchClientRouter.navigate({component: 'team-member'}, {close: true, params: {team: 33, user: 11}}); // Closes view 1 and view 2 this.workbenchClientRouter.navigate({component: 'team-member'}, {close: true, params: {team: 33, user: '*'}}); // Closes view 2 and view 4 this.workbenchClientRouter.navigate({component: 'team-member'}, {close: true, params: {team: '*', user: 12}}); // Closes all views this.workbenchClientRouter.navigate({component: 'team-member'}, {close: true, params: {team: '*', user: '*'}});
- Use
-
workbench-client/router: ignoring matrix params to resolve views for navigation introduced a breaking change in the Workbench Router API.
The communication protocol between host and client is backward compatible, so you can upgrade the host and clients independently.
To migrate:
- Use
target=auto
instead ofactivateIfPresent=true
in navigation extras.
Usingauto
as the navigation target navigates existing view(s) that match the qualifier and required parameter(s), if any. If not finding a matching view, the navigation opens a new view. This is the default behavior if no target is specified. - Use
target=blank
instead ofactivateIfPresent=false
in navigation extras.
Usingblank
as the navigation target always navigates in a new view. - Use
target=<view.id>
instead of settingtarget=self
andselfViewId=<view.id>
in navigation extras.
Setting a view id as the navigation target replaces the specified view, or creates a new view if not found. - Use the property
activate
in navigation extras to instruct the router to activate the view after navigation. Defaults totrue
if not specified. - The router does not navigate the current view anymore. To navigate the current view, specify the current view as the navigation target in navigation extras.
Navigate existing view(s)
// Before migration this.workbenchClientRouter.navigate({entity: 'person'}, {activateIfPresent: true}); // After migration this.workbenchClientRouter.navigate({entity: 'person'}); this.workbenchClientRouter.navigate({entity: 'person'}, {target: 'auto'}); // this is equivalent to the above statement
Open view in new view tab
// Before migration this.workbenchClientRouter.navigate({entity: 'person'}, {activateIfPresent: false}); // After migration this.workbenchClientRouter.navigate({entity: 'person'}, {target: 'blank'});
Replace existing view
// Before migration this.workbenchClientRouter.navigate({entity: 'person'}, {target: 'self', selfViewId: 'view.1'}); // After migration this.workbenchClientRouter.navigate({entity: 'person'}, {target: 'view.1'});
Prevent view activation after navigation (NEW)
this.workbenchClientRouter.navigate({entity: 'person'}, {target: 'blank', activate: false});
- Use
1.0.0-beta.16 (2022-12-21)
- workbench-client: update
@scion/microfrontend-platform
to version1.0.0-rc.12
(1f674fa)
-
workbench-client: Updating
@scion/microfrontend-platform
to version1.0.0-rc.12
introduced a breaking change.More information on how to migrate can be found in the changelog of the SCION Microfrontend Platform.
1.0.0-beta.15 (2022-12-07)
- workbench-client: do not focus nested microfrontend in a popup (9293464)
- workbench-client: update
@scion/microfrontend-platform
to version1.0.0-rc.11
(34fec1d)
- workbench-client: enable Observables of
WorkbenchView
to emit in the correct context (ec0d808)
-
workbench-client: Updating
@scion/microfrontend-platform
to version1.0.0-rc.11
introduced a breaking change.More information on how to migrate can be found in the changelog of the SCION Microfrontend Platform.
For Angular applications, we strongly recommend replacing zone-specific decorators for
MessageClient
andIntentClient
with anObservableDecorator
. Otherwise, you may experience performance degradation due to frequent change detection cycles.To migrate:
- Remove decorators for
MessageClient
andIntentClient
, including their registration in the bean manager (e.g.,NgZoneMessageClientDecorator
andNgZoneIntentClientDecorator
). - Provide a
NgZoneObservableDecorator
and register it in the bean manager before starting the platform. Note to register it as a bean, not as a decorator.
export class NgZoneObservableDecorator implements ObservableDecorator { constructor(private zone: NgZone) { } public decorate$<T>(source$: Observable<T>): Observable<T> { return new Observable<T>(observer => { const insideAngular = NgZone.isInAngularZone(); const subscription = source$ .pipe( subscribeInside(fn => this.zone.runOutsideAngular(fn)), observeInside(fn => insideAngular ? this.zone.run(fn) : this.zone.runOutsideAngular(fn)), ) .subscribe(observer); return () => subscription.unsubscribe(); }); } }
const zone: NgZone = ...; // Register decorator Beans.register(ObservableDecorator, {useValue: new NgZoneObservableDecorator(zone)}); // Connect to the host zone.runOutsideAngular(() => WorkbenchClient.connect(...));
- Remove decorators for
1.0.0-beta.14 (2022-11-09)
- workbench-client/router: support named parameters in title/heading of view capability (98f4bbd)
1.0.0-beta.13 (2022-10-11)
- workbench-client/popup: add 'referrer' to popup handle to provide information about the calling context (920d831)
1.0.0-beta.12 (2022-10-07)
- workbench/popup: allow positioning of a popup relative to its contextual view or the page viewport (484d9bd), closes #342
- workbench/router: allow setting CSS classes on a view via router and route data definition (3d46204)
1.0.0-beta.11 (2022-09-14)
-
workbench-client: change example to new parameter declaration API (e83bd74)
-
workbench-client: fix TypeDoc links (bd4bcd7)
1.0.0-beta.10 (2022-05-20)
- workbench-client: migrate to the framework-agnostic package
@scion/toolkit
(38368e9)
-
workbench-client: Migrating to the framework-agnostic package
@scion/toolkit
introduced a breaking change.Previously, framework-agnostic and Angular-specific tools were published in the same NPM package
@scion/toolkit
, which often led to confusion and prevented framework-agnostic tools from having a release cycle independent of the Angular project. Therefore, Angular-specific tools have been moved to the NPM package@scion/components
. Framework-agnostic tools continue to be released under@scion/toolkit
, but now starting with version1.0.0
instead of pre-release versions.To migrate:
- Install the NPM package
@scion/toolkit
in version1.0.0
using the following command:npm install @scion/toolkit@latest --save
. Note that the toolkit was previously released as pre-releases of version13.0.0
or older. - If you are using Angular components from the toolkit in your project, for example the
<sci-viewport>
component, please follow the migration instructions of the SCION Toolkit Changelog. Components of the toolkit have been moved to the NPM package@scion/components
.
- Install the NPM package
1.0.0-beta.9 (2022-05-02)
- workbench/view: discard parameter if set to
undefined
(b3b6a14), closes #325 - workbench/view: preserve position and size of inactive views (c0f869b)
-
workbench-client: Migrating
@scion/workbench-client
to RxJS 7.5 introduced a breaking change.To migrate:
- migrate your application to RxJS 7.5; for detailed migration instructions, refer to https://rxjs.dev/6-to-7-change-summary;
- update @scion/toolkit to version 13; for detailed migration instructions, refer to https://github.com/SchweizerischeBundesbahnen/scion-toolkit/blob/master/CHANGELOG.md;
1.0.0-beta.8 (2022-02-11)
- workbench/popup: open popups from within an interceptor (a11fd9d), closes #276
- workbench/view: open views from within an interceptor (137b8d0)
- workbench: allow controlling which view params to persist in the URL (dcb5ee1), closes #278
- workbench: migrate to @scion/microfrontend-platform v1.0.0-beta.20 (24dfec2), closes SchweizerischeBundesbahnen/scion-microfrontend-platform/#96
-
workbench: Supporting
@scion/microfrontend-platform v1.0.0-beta.20
introduced a breaking change in the configuration of the host application and the host/client communication protocol.SCION Microfrontend Platform consolidated the API for configuring the platform, eliminating the different ways to configure the platform. Consequently, SCION Workbench could also simplify its API for enabling microfrontend support.
Related issue of the SCION Microfrontend Platform: SchweizerischeBundesbahnen/scion-microfrontend-platform/#96
- the micro application must now pass its identity (symbolic name) directly as the first argument, rather than via the options object;
- the options object passed to
WorkbenchClient.connect
has been renamed fromMicroApplicationConfig
toConnectOptions
and messaging options are now top-level options; - the bean
MicroApplicationConfig
has been removed; you can now obtain the application's symbolic name as following:Beans.get<string>(APP_IDENTITY)
;
For further instructions on how to migrate the client, refer to https://github.com/SchweizerischeBundesbahnen/scion-microfrontend-platform/blob/master/docs/site/changelog/changelog.md#client-app-migration
-
workbench/popup: Opening popups from within an interceptor introduced a breaking change in the host/client communication protocol.
The communication protocol between host and client HAS CHANGED for opening a popup. You need to update host and affected clients to the new version simultaneously. The API has not changed; the breaking change applies only to the version of @scion/workbench and @scion/workbench-client. To migrate, upgrade to @scion/[email protected] and @scion/[email protected], respectively.
-
workbench/view: Opening views from within an interceptor introduced a breaking change in the host/client communication protocol.
The communication protocol between host and client HAS CHANGED for opening a view. You need to update host and affected clients to the new version simultaneously. The API has not changed; the breaking change applies only to the version of @scion/workbench and @scion/workbench-client. To migrate, upgrade to @scion/[email protected] and @scion/[email protected], respectively.
1.0.0-beta.7 (2021-07-09)
1.0.0-beta.6 (2021-04-13)
-
workbench/popup: Adding support for opening a popup of the host app from within a microfrontend introduced a breaking change in the host/client communication protocol.
The communication protocol between host and client HAS CHANGED for opening a popup. You need to update host and clients to the new version simultaneously. The API has not changed; the breaking change applies only to the version of
@scion/workbench
and@scion/workbench-client
. To migrate, upgrade to@scion/[email protected]
and@scion/[email protected]
, respectively.
1.0.0-beta.5 (2021-02-12)
- workbench-client/router: provide microfrontends with the most recent view capability (0b8f140)
- workbench/popup: configure contextual reference(s) via context object (0591e7a)
-
workbench/popup: Changed popup config for passing contextual reference(s)
To migrate: Set a popup's view reference via
PopupConfig#context#viewId
instead ofPopupConfig#viewRef
.
1.0.0-beta.4 (2021-02-10)
1.0.0-beta.3 (2021-02-03)
- workbench-client/message-box: provide the messagebox capability under the type
messagebox
instead ofmessage-box
(ad15ba1) - workbench-client/routing: allow view navigation without specifying navigation extras (4ade8a9)
- workbench/microfrontend: upgrade to @scion/[email protected] (11c2f20)
1.0.0-beta.2 (2021-01-25)
- workbench: start microfrontend platform outside the Angular zone (296f6b0)
- workbench-client/message-box: consolidate message box API to be consistent with the popup API (4a386c3)
- workbench-client/notification: consolidate notification API to be consistent with the message box and popup API (162a70d)
- workbench-client/message-box: allow messages to be displayed from microfrontends (30aef07)
- workbench-client/notification: allow notifications to be displayed from microfrontends (4757ac3)
- workbench-client/popup: allow providing a microfrontend for display in a workbench popup (bc23e65)
- workbench/popup: allow to open a popup from a screen coordinate and bind it to the lifecycle of a view (864d75c)
-
workbench-client/notification: The refactoring of the notification introduced a breaking change as properties were renamed:
- To display a notification, pass a
NotificationConfig
instead of aNotification
object. TheNotification
object is now used exclusively as the handle for injection into the notification component. It has the following new methods:setTitle
,setSeverity
,setDuration
,setCssClass
. - If passing data to the notification component, set it via
componentInput
config property instead of theinput
property.
- To display a notification, pass a
-
workbench-client/message-box: The refactoring of the message box introduced a breaking change as properties were renamed:
- To display a message box, pass a
MessageBoxConfig
instead of aMessageBox
object. TheMessageBox
object is now used exclusively as the handle for injection into the message box component. It has the following new methods:setTitle
,setSeverity
,setActions
,setCssClass
. - If passing data to the message box component, set it via
componentInput
config property instead of theinput
property.
- To display a message box, pass a
-
workbench/popup: consolidated the config for opening a popup in preparation for the microfrontend popup integration
To migrate:
- Rename the
position
property toalign
. This property is used for aligning the popup relative to its anchor. - Remove the closing strategy
onLayoutChange
as binding a popup to a Workbench view is now supported. This strategy existed only as a workaround to close popups when switching between views. - Pass the preferred popup overlay size as
PopupSize
object literal instead of separate top-level config properties, as follows:PopupConfig.width
->PopupConfig.size.width
PopupConfig.height
->PopupConfig.size.height
PopupConfig.minWidth
->PopupConfig.size.minWidth
PopupConfig.maxWidth
->PopupConfig.size.maxWidth
PopupConfig.minHeight
->PopupConfig.size.minHeight
PopupConfig.maxHeight
->PopupConfig.size.maxHeight
- Rename the
- workbench-client: add project skeleton for @scion/workbench-client (59895f4)
- workbench-client: provide core workbench API to microfrontends (55fabc3)
-
workbench-client: Workbench Microfrontend support introduced the following breaking changes:
- The workbench component is no longer positioned absolutely but in the normal document flow. To migrate, add the workbench component to your CSS layout and make sure it fills the remaining space vertically and horizontally.
- Renamed the workbench config from
WorkbenchConfig
toWorkbenchModuleConfig
. - Removed the e2e-testing related CSS classes
e2e-active
ande2e-dirty
; to migrate, replace them withactive
anddirty
. - Renamed flag to set popup closing strategy from
onGridLayoutChange
toonLayoutChange