-
Notifications
You must be signed in to change notification settings - Fork 3
Upgrade Angular to v16 #431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
omkar-ethz
commented
May 6, 2025
•
edited
Loading
edited
- Upgrade Angular, and Angular Material (and some other dependencies to v16. Tests pass and the UI looks like before --> Not migrated Material Legacy components to MDC components yet, will do so in separate PR as part of v17 migration.
- Fix appearance of toolbar (the API seems to have changed and color needs to be passed as a property rather than CSS attribute)
There was a problem hiding this 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 updates the linting toolchain and upgrades Angular and Angular Material to version 16, while also fixing the toolbar appearance by updating its API usage.
- Migrated from TSLint to ESLint following the guide.
- Upgraded Angular and Angular Material to v16.
- Adjusted the toolbar component to use the new API by passing the color as a property.
Reviewed Changes
Copilot reviewed 3 out of 8 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
scilog/src/app/logbook/core/navigation-guard-service.ts | Removed the implementation of the CanDeactivate interface; review whether this change aligns with intended route guard behavior. |
scilog/src/app/core/toolbar/toolbar.component.html | Updated the toolbar component to include a color property as required by Angular Material v16. |
Files not reviewed (5)
- scilog/.eslintrc.json: Language not supported
- scilog/angular.json: Language not supported
- scilog/package.json: Language not supported
- scilog/src/app/core/toolbar/toolbar.component.scss: Language not supported
- scilog/tslint.json: Language not supported
@@ -7,7 +7,7 @@ export interface ComponentCanDeactivate { | |||
} | |||
|
|||
@Injectable() | |||
export class NavigationGuardService implements CanDeactivate<ComponentCanDeactivate> { | |||
export class NavigationGuardService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of the 'CanDeactivate' interface implementation might bypass Angular's type safety for route guards. If the intention is to maintain the guard's contract for the router, consider re-adding 'implements CanDeactivate'.
Copilot uses AI. Check for mistakes.
thanks! would you mind keeping the ESLINT change to another PR that we will merge before this? has the look changed already anywhere (a part from the toolbar fix)? |
There was a problem hiding this 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 upgrades Angular and Angular Material to v16 and adds linting while fixing the toolbar appearance by adapting to the updated API.
- Upgraded Angular dependencies to v16.
- Adjusted toolbar component to use the new 'color' property for .
- Modified the NavigationGuardService, notably removing the explicit CanDeactivate implementation.
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
File | Description |
---|---|
scilog/src/app/logbook/core/navigation-guard-service.ts | Removed interface implementation from NavigationGuardService which may affect Angular route guard behavior. |
scilog/src/app/core/toolbar/toolbar.component.html | Updated with a "color" property to meet the new API requirements. |
Files not reviewed (2)
- scilog/package.json: Language not supported
- scilog/src/app/core/toolbar/toolbar.component.scss: Language not supported
Comments suppressed due to low confidence (1)
scilog/src/app/logbook/core/navigation-guard-service.ts:10
- Removing the 'CanDeactivate' interface from NavigationGuardService may impact its role as an Angular route guard. Please confirm that this change is intentional and that the guard behavior is maintained with Angular v16.
export class NavigationGuardService {
@minottic thank you for having a look! The look hasn't changed at all as far as I can tell. Updated this PR's base branch as the eslint branch, as the ng update command updates eslint from 15 to 16 as well. |
…ustom-webpack@16 ngx-cookie-service@16 angular-gridster2@16
a6d9016
to
ea45af2
Compare
ea45af2
to
863c966
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! Is the copilot warning relevant?
It is kind of relevant -- thanks! Angular recommends moving to functional guards, so had deprecated the class based |