Skip to content

Releases: SchweizerischeBundesbahnen/scion-workbench

17.0.0-beta.9 (@scion/workbench)

22 May 09:18
Compare
Choose a tag to compare

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)

22 May 05:10
Compare
Choose a tag to compare

1.0.0-beta.23 (2024-05-21)

Features

  • workbench-client/message-box: enable microfrontend display in a message box (3e9d88d), closes #488

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'},
    });

17.0.0-beta.8 (@scion/workbench)

07 May 10:20
Compare
Choose a tag to compare

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

  • workbench: require Angular version 17.0.6 or later to fix angular/angular#53239 (dd78d07)

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 the WorkbenchViewPreDestroy 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 in WorkbenchNavigationExtras has been renamed.

    To migrate, update to the latest version of @scion/workbench-client and use WorkbenchNavigationExtras.position instead of WorkbenchNavigationExtras.blankInsertionIndex.

  • workbench/router: Property blankPartId in WorkbenchNavigationExtras has been renamed.

    To migrate, use WorkbenchNavigationExtras.partId instead of WorkbenchNavigationExtras.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: () => ...,
      },
    ]);
  • workbench: Changed type of view id from string to ViewId.

    If storing the view id in a variable, change its type from string to ViewId.

  • 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, the WorkbenchRouter, or the WorkbenchService 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)

07 May 09:47
Compare
Choose a tag to compare

1.0.0-beta.22 (2024-05-07)

Bug Fixes

  • workbench-client/view: fix issues to prevent a view from closing (a280af9), closes #27 #344

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 the ViewClosingListener 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 in WorkbenchNavigationExtras has been renamed.

    Use WorkbenchNavigationExtras.position instead of WorkbenchNavigationExtras.blankInsertionIndex.

  • workbench-client/view: Changed type of view id from string to ViewId.

    If storing the view id in a variable, change its type from string to ViewId.

17.0.0-beta.7 (@scion/workbench)

29 Mar 09:45
Compare
Choose a tag to compare

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 the WorkbenchDialog handle. Instead, pass an Error object to the close 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. Use WorkbenchView.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.

1.0.0-beta.21 (@scion/workbench-client)

29 Mar 09:16
Compare
Choose a tag to compare

1.0.0-beta.21 (2024-03-29)

Bug Fixes

  • workbench-client/view: remove qualifier from microfrontend URL and params (57cfd9e)

Features

  • workbench-client/dialog: enable microfrontend display in a dialog (11d762b)

BREAKING CHANGES

  • 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.

17.0.0-beta.6 (@scion/workbench)

14 Mar 16:27
Compare
Choose a tag to compare

17.0.0-beta.6 (2024-03-14)

Bug Fixes

  • workbench: avoid Angular change detection cycle on keyboard event (e99b9a6)
  • workbench: fix moving view to empty main area (3bbe5ca)

17.0.0-beta.5 (@scion/workbench)

29 Feb 14:18
Compare
Choose a tag to compare

17.0.0-beta.5 (2024-02-29)

Bug Fixes

  • workbench/router: support moving empty-path view to new window (acebd4c)
  • workbench/view: display arrow cursor when hovering over context menu items (5f41151)
  • workbench/view: ensure sci-router-outlet of inactive microfrontend view has correct attributes in the DOM (3e6be3f)
  • workbench/view: open view moved via drag & drop after the active view (78dc249)

Features

  • workbench/view: enable dependency injection in context menu action callback (7d8d041)
  • workbench/view: support moving view to different workbench window (408f634)

BREAKING CHANGES

  • workbench/view: Support for programmatically moving view to different workbench window has introduced a breaking change.

    The signature of WorkbenchView#move has changed.

    To migrate:

    • Specify the target part as the first argument, optionally defining the region via options object.
    • Pass new-window instead of blank-window to move the view to a new window.
    • To move a view to a specific workbench window, pass the target workbench id via options object. The target workbench id is available via WORKBENCH_ID DI token in the target application.
    • Note that the built-in view context menu has been renamed from moveBlank to moveToNewWindow, breaking if overriding defaults such as text or accelerators.

17.0.0-beta.4 (@scion/workbench)

26 Jan 18:57
Compare
Choose a tag to compare

17.0.0-beta.4 (2024-01-26)

Bug Fixes

  • workbench/dialog: ensure letters of dialog title are not clipped (b877d55)
  • workbench/dialog: prevent resizing blocked dialog (9561166)
  • workbench/dialog: prevent user interaction when opening a blocked dialog (b433cde)
  • workbench/message-box: align message on the left, not in the center (d5950ce)
  • workbench/message-box: increase padding for better aesthetics (3fef14c)
  • workbench/message-box: wrap title if too long (4bb5b89)

17.0.0-beta.3 (@scion/workbench)

23 Jan 18:13
Compare
Choose a tag to compare

17.0.0-beta.3 (2024-01-23)

Bug Fixes

  • workbench/dialog: consider minimum size in resizing constraints (408676c)
  • workbench/dialog: do not block dialogs of other views (0c1b88e)
  • workbench/dialog: propagate view context (c22222f)
  • workbench/popup: propagate view context (31e9700)
  • workbench/message-box: open message box in a dialog (bdcd02b), closes #438
  • workbench: throw error for objects not available for dependency injection (a36ae5e)

Features

  • workbench/dialog: support custom header and footer (5c6a4d6)

BREAKING CHANGES

  • workbench/message-box: Consolidation of the MessageBox API has introduced a breaking change.

    Refer to the documentation for migration examples: https://github.com/SchweizerischeBundesbahnen/scion-workbench/blob/master/docs/site/howto/how-to-open-message-box.md

    To migrate:

    • MessageBoxService is now WorkbenchMessageBoxService.
    • MessageBoxConfig is now WorkbenchMessageBoxOptions.
    • Signature of WorkbenchMessageBoxService#open method has changed. Pass the message (text or component) as the first argument, not via options object.
    • injector option has been moved to a top-level property (previously MessageBoxConfig#componentConstructOptions).
    • viewContainerRef option has been removed (no replacement).
    • componentInput option has been renamed to inputs with the type changed to a dictionary. Inputs are now available as input properties in the component, previously via MessageBox#input handle.
    • MessageBox handle has been removed. Configure the message box when opening the message box.
    • Registration of custom action handlers has been removed (no replacement).
    • Pressing the Escape key no longer closes the message box for an action with the 'close' key.
  • workbench/dialog: Support for custom header and footer has introduced a breaking change.

    To migrate:

    • Type of WorkbenchDialog.padding is now boolean. Set to false to remove the padding, or set the CSS variable --sci-workbench-dialog-padding for a custom padding.
    • --sci-workbench-dialog-header-divider-color CSS variable has been removed (no replacement).