[#13484] Migrate frontend to use control flow syntax#13485
Closed
samuelfangjw wants to merge 10 commits intoTEAMMATES:masterfrom
Closed
[#13484] Migrate frontend to use control flow syntax#13485samuelfangjw wants to merge 10 commits intoTEAMMATES:masterfrom
samuelfangjw wants to merge 10 commits intoTEAMMATES:masterfrom
Conversation
Member
Author
|
Keeping this PR draft until I have reviewed it myself but it's largely good to go already. |
There was a problem hiding this comment.
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
*ngIfdirectives with@ifblocks - Replaced all
*ngFordirectives with@forloops usingtrackexpressions - Removed imports of
NgIf,NgFor, andNgTemplateOutletfrom components that no longer need them - Updated tracking functions to use inline
$indexinstead of customtrackByfunctions - Updated comment in
collapse-anim.tsto 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.
...onents/question-types/question-edit-details-form/msq-question-edit-details-form.component.ts
Outdated
Show resolved
Hide resolved
...onents/question-types/question-edit-details-form/mcq-question-edit-details-form.component.ts
Show resolved
Hide resolved
...es-admin/admin-notifications-page/notification-edit-form/notification-edit-form.component.ts
Outdated
Show resolved
Hide resolved
400eeeb to
d3992b8
Compare
Member
Author
|
This will have significant conflicts with #13491 that will have to be de-conflicted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13484
Outline of Solution
account-request-table. This was migrated manually.