Skip to content

Update Angular from 20 to 21#417

Merged
kyasbal merged 5 commits into
GoogleCloudPlatform:mainfrom
kyasbal:epic/angular-update
Dec 21, 2025
Merged

Update Angular from 20 to 21#417
kyasbal merged 5 commits into
GoogleCloudPlatform:mainfrom
kyasbal:epic/angular-update

Conversation

@kyasbal

@kyasbal kyasbal commented Dec 21, 2025

Copy link
Copy Markdown
Member

This PR updates the frontend dependency from Angular 20 to 21.

NOTE: All of the changes except listed below are made by the automatic code updator run by ng update @angular/core@21 @angular/cli@21.

Manually changed files:

  • ./scripts/generate-angular-json.sh: Removed unused property after updating the angular build system
    (https://angular.jp/tools/cli/build-system-migration)
  • web/src/app/services/data-loader.service.ts: Changed type notation in method to fix the compilation error after the type changes on Angular side.

@kyasbal kyasbal added dependencies Pull requests that update a dependency file frontend labels Dec 21, 2025
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @kyasbal, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a significant upgrade of the frontend application's Angular framework from version 20 to 21. This update brings the project in line with the latest Angular standards, incorporating new features and performance improvements. The bulk of the changes are automated, reflecting the smooth migration path provided by the Angular CLI, complemented by targeted manual fixes to ensure full compatibility and leverage new syntax.

Highlights

  • Angular Version Upgrade: The primary change is an upgrade of the Angular framework from version 20 to 21, along with corresponding updates to related Angular packages and dependencies.
  • Automated Code Updates: Most of the changes in this pull request were automatically generated by the Angular CLI's ng update @angular/core@21 @angular/cli@21 command, ensuring compatibility with the new Angular version.
  • Manual Adjustments for Compatibility: Specific manual changes were made to address breaking changes, including removing an unused property in a shell script (scripts/generate-angular-json.sh) and fixing a type notation in web/src/app/services/data-loader.service.ts.
  • Migration to New Control Flow Syntax: Angular template files have been updated to use the new built-in control flow syntax (@if, @for) instead of the older structural directives (*ngIf, *ngFor), improving readability and performance.
  • Build System and Test Environment Updates: The Angular build builder was migrated from @angular-devkit/build-angular:browser to @angular/build:application, and test environment setups were adjusted to include provideZoneChangeDetection for better testing practices.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates Angular from version 20 to 21. The majority of the changes are automated migrations performed by ng update, which include updating dependencies, build configurations, and adopting the new control flow syntax in templates. These automated changes appear to be correct. I've added a few comments: one high-severity comment regarding a manual type change that seems incorrect, and several medium-severity comments about misplaced imports in test files, likely an artifact of the update tool. Overall, the update is well-executed, pending the resolution of the noted issues.

Comment thread web/src/app/services/data-loader.service.ts Outdated
Comment thread web/src/app/dialogs/new-inspection/components/file-parameter.component.spec.ts Outdated
Comment thread web/src/app/dialogs/new-inspection/components/group-parameter.component.spec.ts Outdated
Comment thread web/src/app/dialogs/new-inspection/components/parameter-header.component.spec.ts Outdated
Comment thread web/src/app/dialogs/new-inspection/components/parameter-hint.component.spec.ts Outdated
Comment thread web/src/app/dialogs/new-inspection/components/text-parameter.component.spec.ts Outdated
Comment thread web/src/app/utils/observable-util.spec.ts Outdated
@kyasbal

kyasbal commented Dec 21, 2025

Copy link
Copy Markdown
Member Author

Closes #406

@kyasbal kyasbal marked this pull request as ready for review December 21, 2025 07:40
@kyasbal kyasbal merged commit 8ee2787 into GoogleCloudPlatform:main Dec 21, 2025
8 of 9 checks passed
@kyasbal kyasbal deleted the epic/angular-update branch December 21, 2025 22:02
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 frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants