Skip to content

feat: migrate from Angular 19 to Angular 20#290

Open
francischabot wants to merge 1 commit intoVilledeMontreal:masterfrom
francischabot:feature/angular-20
Open

feat: migrate from Angular 19 to Angular 20#290
francischabot wants to merge 1 commit intoVilledeMontreal:masterfrom
francischabot:feature/angular-20

Conversation

@francischabot
Copy link

@francischabot francischabot commented Mar 4, 2026

Upgrades the library from Angular 19 to Angular 20.

Angular 20 migration

  • All @angular/* and @angular/cdk packages bumped to ~20.x
  • @angular-devkit/build-angular, @angular/cli bumped to ~20.x
  • @angular-eslint/* packages bumped to ~20.x
  • ng-packagr bumped to ~20.x
  • Library version bumped to 20.0.0 with peer deps >=20.0.0 <21.0.0

Breaking change fixes

  • Replaced removed PortalInjector with Injector.create() in snack-bar service
  • Added try-catch around focusInitialElementWhenReady() in modal container (Angular 20 rethrows errors from listeners that were previously silent)
  • Adjusted modal mobile width test threshold for CDK 20 overlay changes

Test fixes

  • Added afterEach cleanup in modal tests to properly close modals
  • Fixed button test import path (dist/angular-ui → relative import)

Storybook fix

  • Added standalone: false to all Storybook example components (Angular 20 changed the standalone default to true)

Tests

TOTAL: 111 SUCCESS

- Update all @angular/* packages from 19.x to 20.x
- Update @angular/cdk from 19.x to 20.x
- Update @angular-devkit/build-angular, @angular/cli to 20.x
- Update @angular-eslint/* packages to 20.x
- Update ng-packagr from 19.x to 20.x
- Replace removed PortalInjector with Injector.create() in snack-bar service
- Add try-catch around focusInitialElementWhenReady() in modal container
  to handle CDK focus trap errors during test teardown (Angular 20 now
  rethrows errors from listeners that were previously silent)
- Add afterEach cleanup in modal tests to properly close modals
- Fix button test import path (dist/angular-ui -> relative import)
- Adjust modal mobile width test threshold for CDK 20 overlay changes
- Add standalone: false to all storybook example components
  (Angular 20 changed standalone default to true)
- Bump library version to 20.0.0 with peer deps >=20.0.0 <21.0.0

Signed-off-by: Francis Chabot <francis.chabot@montreal.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant