Skip to content

18.0.0-beta.5 (@scion/workbench)

Compare
Choose a tag to compare
@github-actions github-actions released this 02 Sep 09:39
· 46 commits to master since this release

18.0.0-beta.5 (2024-09-02)

Bug Fixes

  • workbench/perspective: support browser back navigation after switching perspective (5777728), closes #579

BREAKING CHANGES

  • workbench/perspective: The active perspective is now set after navigation completes (previously before navigation), so it is unavailable during route resolution/activation. Route guards (like canMatch) should use the canMatchWorkbenchPerspective function instead of WorkbenchService or WorkbenchPerspective to determine the perspective’s activation state.

    Migration Example:

    Before:

    import {Route} from '@angular/router';
    import {inject} from '@angular/core';
    import {WorkbenchService} from '@scion/workbench';
    
    const route: Route = {
      canMatch: [() => inject(WorkbenchService).activePerspective()?.id === 'perspective'],
      // or
      canMatch: [() => inject(WorkbenchService).perspectives().find(perspective => perspective.id === 'perspective')?.active()],
    };

    After:

    import {Route} from '@angular/router';
    import {canMatchWorkbenchPerspective} from '@scion/workbench';
    
    const route: Route = {
      canMatch: [canMatchWorkbenchPerspective('perspective')],
    };