Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.96 KB

CHANGELOG_WORKBENCH_LATEST.md

File metadata and controls

50 lines (34 loc) · 1.96 KB

18.0.0-beta.9 (2024-11-25)

Bug Fixes

  • workbench/view: invoke CanClose guard in view injection context (07ba936), closes #578
  • workbench/view: prevent CanClose guard from blocking workbench navigation (12e9e91), closes #558
  • workbench/view: prevent closing views with a pending CanClose guard (4326a63)

Features

  • workbench/view: add functional CanClose guard, deprecate class-based guard (c2ee531)

Deprecations

  • workbench/view: The class-based CanClose guard has been deprecated in favor of a functional guard that can be registered on WorkbenchView.canClose.

    Migrate by registering a callback on WorkbenchView.canClose instead of implementing the CanClose interface.

    Before migration:

    import {CanClose} from '@scion/workbench';
    import {Component} from '@angular/core';
    
    @Component({})
    export class ViewComponent implements CanClose {
    
      public canClose(): boolean {
        return true;
      }
    }

    After migration:

    import {Component, inject} from '@angular/core';
    import {WorkbenchView} from '@scion/workbench';
    
    @Component({})
    export class ViewComponent {
    
      constructor() {
        inject(WorkbenchView).canClose(() => {
          return true;
        });
      }
    }