18.0.0-beta.5 (@scion/workbench)
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 thecanMatchWorkbenchPerspective
function instead ofWorkbenchService
orWorkbenchPerspective
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')], };