Skip to content

chore: migrate to Angular v21 and @fundamental-ngx UI5 web components#105

Merged
MariaIDineva merged 9 commits into
mainfrom
refactor/migrate-to-fundamental-ngx
Jun 2, 2026
Merged

chore: migrate to Angular v21 and @fundamental-ngx UI5 web components#105
MariaIDineva merged 9 commits into
mainfrom
refactor/migrate-to-fundamental-ngx

Conversation

@MariaIDineva
Copy link
Copy Markdown
Contributor

@MariaIDineva MariaIDineva commented May 29, 2026

Migrate to Angular v21 and @fundamental-ngx UI5 web components

Summary

  • Angular v16 → v21 — incremental upgrade through each major version using ng update. Automated codemods applied: provideHttpClient, standalone: false, @for/@if control flow syntax, and main.ts bootstrap changes.

  • @ui5/webcomponents-ngx@fundamental-ngx/ui5-webcomponents — the old wrapper package is deprecated and incompatible with Angular v20+. Replaced with @fundamental-ngx/ui5-webcomponents, /fiori, /base (and their peer deps @fundamental-ngx/core, /cdk, /i18n). All template bindings updated from kebab-case to camelCase ([title-text][titleText] etc.), ValueState enum values renamed (ErrorNegative, WarningCritical, SuccessPositive).

  • Theming@ui5/theming-ngx replaced with @fundamental-ngx/core/theming. SAP theming CSS and font assets added to angular.json in the required load order.

  • Translations@ui5/webcomponents-ngx/i18n replaced with a lightweight I18nService + Ui5I18nPipe that loads the existing JSON translation assets over HTTP. Language switching is restored via a root-scoped service shared across all pipe instances.

  • Bundle size — replaced AllIcons.js with 11 individual icon imports, eliminating two lazy chunks (~1.15 MB / 272 kB gzipped). Angular.json budgets tightened to reflect actual sizes.

  • CI/CD — added .nvmrc pinning Node.js 22 to satisfy Angular CLI v21's minimum Node requirement on Netlify. Migrated to the esbuild-based @angular/build:application builder, reducing build time from ~39s to ~5s locally and resolving an 18-minute Netlify CI timeout caused by Webpack processing the large @fundamental-ngx CSS files. Updated netlify.toml publish path to dist/mock-project/browser.

  • Layout fix — added fd-container--no-vertical-gap to nested <fd-layout-grid> elements in app.component.html. Without it, fundamental-styles stacked padding-block twice on columns inside nested grids, causing an 8px top misalignment between sibling cards.

  • Unsupported themes removed — Belize, Belize HCB, and Belize HCW are not available in @fundamental-ngx/core's standard theme set and have been removed from the theme picker.

Test plan

  • App builds without errors (ng build --configuration=production)
  • All 8 remaining themes switch correctly
  • Language switching works for English, Traditional Chinese, and Bulgarian
  • Seat chart, timeline, calendar, and all cards render correctly
  • No regressions in shellbar, dialogs, and progress indicators
  • Netlify build completes within the time limit
  • Cards in the main grid are top-aligned

- Upgrade Angular from v16 to v21 via incremental ng update steps
- Replace @ui5/webcomponents-ngx and @ui5/theming-ngx with
  @fundamental-ngx/ui5-webcomponents, /fiori, /base, /core, /cdk, /i18n
- Update angular.json: add SAP theming CSS files (correct load order)
  and asset globs for runtime theme switching
- Replace Ui5WebcomponentsModule with individual standalone component
  imports; ThemingModule.withConfig() replaces Ui5ThemingModule.forRoot()
- Add local Ui5I18nPipe wrapping existing JSON translation assets
- Fix all templates: camelCase input bindings, ValueState renames
  (Error→Negative, Warning→Critical, Success→Positive), remove
  unsupported attributes ([fixed], status on card-header)
- Add skipLibCheck to tsconfig to suppress transitive @UI5 type errors
Replace the blanket @ui5/webcomponents-icons/dist/AllIcons.js import with
the 11 icons actually used by the app. This eliminates the two lazy icon
chunks (759 kB + 395 kB) at the cost of ~20 kB inlined in main, saving
~1.15 MB uncompressed / ~272 kB gzipped.

Tighten angular.json production budgets to reflect actual sizes:
- initial error: 10 MB → 6 MB
- anyComponentStyle warning: 2 MB → 10 kB (Angular default)
- anyComponentStyle error: 4 MB → 20 kB (Angular default)
@netlify
Copy link
Copy Markdown

netlify Bot commented May 29, 2026

Deploy Preview for ui5-webcomponents-ngx-sample ready!

Name Link
🔨 Latest commit 6f1ef21
🔍 Latest deploy log https://app.netlify.com/projects/ui5-webcomponents-ngx-sample/deploys/6a1999b61aad940008eee0b7
😎 Deploy Preview https://deploy-preview-105--ui5-webcomponents-ngx-sample.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 30 (🟢 up 11 from production)
Accessibility: 90 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented May 29, 2026

CLA assistant check
All committers have signed the CLA.

@MariaIDineva MariaIDineva self-assigned this May 29, 2026
@MariaIDineva MariaIDineva added the dependencies Pull requests that update a dependency file label May 29, 2026
Switch from @angular-devkit/build-angular:browser (Webpack) to the
@angular/build:application (esbuild) builder. Build time drops from
~39s to ~5s locally, resolving the 18-minute Netlify CI timeout caused
by Webpack processing the large @fundamental-ngx CSS files.

Update netlify.toml publish path from dist/mock-project to
dist/mock-project/browser — the new builder adds a /browser subdir.
@MariaIDineva MariaIDineva merged commit 5fca044 into main Jun 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants