Releases: SchweizerischeBundesbahnen/scion-workbench
1.0.0-beta.25 (@scion/workbench-client)
1.0.0-beta.25 (2024-08-28)
Bug Fixes
- workbench-client/dialog: unsubscribe previous title observable when setting new title observable (2e72b39)
18.0.0-beta.3 (@scion/workbench)
18.0.0-beta.3 (2024-06-21)
Bug Fixes
- workbench/perspective: create default perspective if no perspective exists (7010623)
- workbench/view: align microfrontend with view bounds when moving it to another part of the same size (e57f0d0)
- workbench/view: do not error when initializing view in
ngOnInit
(1374260) - workbench/view: initialize microfrontend loaded into inactive view (764f89e)
Features
- workbench/perspective: activate first view of each part if not specified (161d05d)
- workbench/perspective: enable micro app to contribute perspective (f20f607), closes #449
- workbench/view: display "Not Found" page if microfrontend is not available (93be385)
BREAKING CHANGES
- workbench/perspective: The return type of the function to select the initial perspective has changed. To migrate, return the perspective id instead of the perspective instance.
- workbench: SCION Workbench requires
@scion/microfrontend-platform
version1.3.0
or later. - workbench: SCION Workbench requires
@scion/workbench-client
version1.0.0-beta.24
or later.
1.0.0-beta.24 (@scion/workbench-client)
1.0.0-beta.24 (2024-06-21)
Features
18.0.0-beta.2 (@scion/workbench)
18.0.0-beta.2 (2024-06-13)
Code Refactoring
- workbench: change default icon font directory from
/assets/fonts
to/fonts
(d347dae)
BREAKING CHANGES
-
workbench: The default icon font directory has changed from
/assets/fonts
to/fonts
.To migrate:
- Move the
fonts
folder from/src/assets
to/public
. - Include content of the
public
folder in angular.json:"assets": [ { "glob": "**/*", "input": "public" } ]
- Alternatively, to not change the folder structure, you can configure a custom path to the icon font directory in your
styles.scss
:use '@scion/workbench' with ( $icon-font: ( directory: 'assets/fonts' ) );
- Move the
18.0.0-beta.1 (@scion/workbench)
18.0.0-beta.1 (2024-06-10)
Dependencies
- workbench: update @scion/workbench to Angular 18 (d39fa85)
BREAKING CHANGES
-
workbench: Updating
@scion/workbench
to Angular 18 introduced a breaking change.To migrate:
- update your application to Angular 18; for detailed migration instructions, refer to https://v18.angular.dev/update-guide;
- update @scion/components to version 18; for detailed migration instructions, refer to https://github.com/SchweizerischeBundesbahnen/scion-toolkit/blob/master/CHANGELOG_COMPONENTS.md;
17.0.0-beta.9 (@scion/workbench)
17.0.0-beta.9 (2024-05-22)
Bug Fixes
- workbench/dialog: avoid
ExpressionChangedAfterItHasBeenCheckedError
when registering dialog header, footer and actions (5554428) - workbench/dialog: set initial focus on delayed content (312280e)
Features
- workbench/message-box: enable microfrontend display in a message box (3e9d88d)
BREAKING CHANGES
-
workbench/message-box: Support for displaying microfrontend in a message box has been added.
To migrate, update to the latest version of
@scion/workbench-client
.
1.0.0-beta.23 (@scion/workbench-client)
1.0.0-beta.23 (2024-05-21)
Features
BREAKING CHANGES
-
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
17.0.0-beta.8 (@scion/workbench)
17.0.0-beta.8 (2024-05-07)
Bug Fixes
- workbench/view: fix issues to prevent a view from closing (a280af9), closes #27 #344
- workbench/view: update view properties when navigating an open view (02a24ff)
Code Refactoring
- workbench/router: remove
blank
prefix from navigation extras (446fa51) - workbench/router: remove option to close view via workbench router link (88d1704)
Dependencies
Features
- workbench/router: control workbench part to navigate views (0bf35a7)
- workbench/router: provide API to modify the workbench layout (46ea446)
- workbench/router: support navigation to children of the empty path route (da578a9), closes #487
- workbench: provide function to set up the SCION Workbench (1a506ef)
- workbench: support navigation of views in the initial layout (or perspective) (1ffd757), closes #445
BREAKING CHANGES
-
workbench/view: Interface and method for preventing closing of a view have changed.
To migrate, implement the
CanClose
instead of theWorkbenchViewPreDestroy
interface.Before migration:
class YourComponent implements WorkbenchViewPreDestroy { public async onWorkbenchViewPreDestroy(): Promise<boolean> { // return `true` to close the view, otherwise `false`. } }
After migration:
class YourComponent implements CanClose { public async canClose(): Promise<boolean> { // return `true` to close the view, otherwise `false`. } }
-
workbench/router: Property
blankInsertionIndex
inWorkbenchNavigationExtras
has been renamed.To migrate, update to the latest version of
@scion/workbench-client
and useWorkbenchNavigationExtras.position
instead ofWorkbenchNavigationExtras.blankInsertionIndex
. -
workbench/router: Property
blankPartId
inWorkbenchNavigationExtras
has been renamed.To migrate, use
WorkbenchNavigationExtras.partId
instead ofWorkbenchNavigationExtras.blankPartId
. -
workbench: Views in the initial layout (or perspective) must now be navigated.
Previously, no explicit navigation was required because views and routes were coupled via route outlet and view id.
Migrate the layout as follows:
Explicitly navigate views, passing an empty array of commands and the view id as navigation hint.
// Before Migration provideWorkbench({ layout: (factory: WorkbenchLayoutFactory) => factory .addPart(MAIN_AREA) .addPart('left', {relativeTo: MAIN_AREA, align: 'left'}) .addView('navigator', {partId: 'left', activateView: true}), }); // After Migration provideWorkbench({ layout: (factory: WorkbenchLayoutFactory) => factory .addPart(MAIN_AREA) .addPart('left', {relativeTo: MAIN_AREA, align: 'left'}) .addView('navigator', {partId: 'left', activateView: true}) // Navigate view, passing hint to match route. .navigateView('navigator', [], {hint: 'navigator'}), });
Migrate the routes as follows:
- Remove the
outlet
property; - Add
canMatchWorkbenchView
guard and initialize it with the hint passed to the navigation;
// Before Migration provideRouter([ { path: '', outlet: 'navigator', loadComponent: () => ..., }, ]); // After Migration provideRouter([ { path: '', // Match route only if navigated with specified hint. canMatch: [canMatchWorkbenchView('navigator')], loadComponent: () => ..., }, ]);
- Remove the
-
workbench: Changed type of view id from
string
toViewId
.If storing the view id in a variable, change its type from
string
toViewId
. -
workbench/router: Removed the option to close a view via the
wbRouterLink
directive.The router link can no longer be used to close a view. To close a view, use the
WorkbenchView
, theWorkbenchRouter
, or theWorkbenchService
instead.Examples:
// Closing a view via `WorkbenchView` handle inject(WorkbenchView).close(); // Closing view(s) via `WorkbenchRouter` inject(WorkbenchRouter).navigate(['path/*/view'], {close: true}); // Closing view(s) via `WorkbenchService` inject(WorkbenchService).closeViews('view.1', 'view.2');
-
workbench: SCION Workbench requires Angular version 17.0.6 or later to fix angular/angular#53239
1.0.0-beta.22 (@scion/workbench-client)
1.0.0-beta.22 (2024-05-07)
Bug Fixes
Refactor
- workbench-client/router: remove
blank
prefix from navigation extras (446fa51)
BREAKING CHANGES
-
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
.
17.0.0-beta.7 (@scion/workbench)
17.0.0-beta.7 (2024-03-29)
Bug Fixes
- workbench/view: do not overwrite CSS classes set in different scopes (02bc372), closes #394
- workbench/view: handle
undefined
keydown event key (66358dd) - workbench/view: render tab content when dragging view quickly into the window (73645d8)
Code Refactoring
- workbench/dialog: consolidate API for closing a dialog (40414c4)
- workbench/view: move navigational state from route data to view handle (3d6a5ca)
Features
- workbench/dialog: enable microfrontend display in a dialog (11d762b)
BREAKING CHANGES
-
workbench/dialog: The method
closeWithError
has been removed from theWorkbenchDialog
handle. Instead, pass anError
object to theclose
method.Before
import {WorkbenchDialog} from '@scion/workbench'; inject(WorkbenchDialog).closeWithError('some error');
After
import {WorkbenchDialog} from '@scion/workbench'; inject(WorkbenchDialog).close(new Error('some error'));
-
workbench/view: Removed
WorkbenchView.cssClasses
property for reading CSS classes. UseWorkbenchView.cssClass
for both reading and setting CSS class(es) instead. -
workbench/view: Moving navigational state to the view handle has introduced a breaking change.
To migrate, read the navigational view state from the view handle instead of the activated route data, as follows:
WorkbenchView.state
.