Skip to content

[#13484] Migrate frontend to use control flow syntax#13485

Closed
samuelfangjw wants to merge 10 commits intoTEAMMATES:masterfrom
samuelfangjw:control-flow-syntax
Closed

[#13484] Migrate frontend to use control flow syntax#13485
samuelfangjw wants to merge 10 commits intoTEAMMATES:masterfrom
samuelfangjw:control-flow-syntax

Conversation

@samuelfangjw
Copy link
Member

@samuelfangjw samuelfangjw commented Feb 1, 2026

Fixes #13484

Outline of Solution

  1. Some errors after the migration process. These were due to existing issues in the codebase (wrong types mainly). See 5f43837 for full list of fixes.
  2. For some reason the migration schematic missed out account-request-table. This was migrated manually.
  3. The test snapshots have changes in whitespace, these are non-consequential as trailing and leading whitespace are stripped in html.
  4. I've made a best effort attempt to clean up the control flow syntax (appropriate control flow blocks, appropriate key in for block if available).

@samuelfangjw
Copy link
Member Author

samuelfangjw commented Feb 1, 2026

Keeping this PR draft until I have reviewed it myself but it's largely good to go already.

@samuelfangjw samuelfangjw requested a review from Copilot February 1, 2026 20:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the Angular frontend codebase from using structural directives (*ngIf, *ngFor) to Angular's new control flow syntax (@if, @for, @else). This is a major refactoring that modernizes the codebase to use Angular's built-in control flow features introduced in recent versions.

Changes:

  • Replaced all *ngIf directives with @if blocks
  • Replaced all *ngFor directives with @for loops using track expressions
  • Removed imports of NgIf, NgFor, and NgTemplateOutlet from components that no longer need them
  • Updated tracking functions to use inline $index instead of custom trackBy functions
  • Updated comment in collapse-anim.ts to reflect the new syntax

Reviewed changes

Copilot reviewed 290 out of 345 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Multiple .component.ts files Removed unused Angular common module imports (NgIf, NgFor)
Multiple .component.html files Converted structural directives to control flow syntax
collapse-anim.ts Updated comment to reference conditional rendering instead of *ngIf
Multiple component files Removed custom trackBy functions now handled by inline track expressions
instructor-role-name.pipe.ts Added support for undefined role parameter
Various type definition files Updated type definitions for better type safety
Test snapshot files Whitespace changes in test snapshots (non-consequential)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@samuelfangjw samuelfangjw marked this pull request as ready for review February 2, 2026 15:19
@samuelfangjw
Copy link
Member Author

This will have significant conflicts with #13491 that will have to be de-conflicted.

@samuelfangjw samuelfangjw added the s.DoNotMerge The pull request may be ready to merge but should not be, pending some event label Feb 2, 2026
@samuelfangjw samuelfangjw removed the request for review from wkurniawan07 February 2, 2026 17:51
@samuelfangjw samuelfangjw marked this pull request as draft February 3, 2026 11:27
@samuelfangjw samuelfangjw marked this pull request as ready for review February 4, 2026 18:27
@samuelfangjw samuelfangjw removed the s.DoNotMerge The pull request may be ready to merge but should not be, pending some event label Feb 6, 2026
@samuelfangjw samuelfangjw removed the request for review from wkurniawan07 February 16, 2026 08:49
@samuelfangjw samuelfangjw added the s.OnHold The issue/PR's validity has been put on hold pending some other event label Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s.OnHold The issue/PR's validity has been put on hold pending some other event

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate frontend to use control flow syntax

2 participants