chore: Angular 18 to 20 migration#571
Conversation
ran command -- ng generate @angular/core:control-flow
…prevent infinite filter loops
…atest i.e, 8.62.1
Upgrade rxjs from 7.5.0 to 7.8.1 to support moduleResolution: bundler (rxjs 7.5.0 lacks an exports field in its package.json, which bundler resolution requires to resolve type declarations).
Run the official Angular schematic (ng generate @angular/core:inject) across the codebase to replace constructor parameter injection with the inject() function, per the @angular-eslint/prefer-inject rule.
| this.filtersTeamGroups = { ...this.filtersTeamGroups }; | ||
| this.hasTeamsFilter = selectedTeams.length > 0; | ||
| this.sectorService.setVisibleTeams(selectedTeams); | ||
|
|
There was a problem hiding this comment.
Group highlight uses an order-sensitive array comparison. this.filtersTeamGroups[group] = equalArray(selectedTeams, this.teamGroups[group]) compares event.value (chip/DOM order = alphabetical, since the team listbox uses keyvalue without a comparator) against the YAML declaration order; equalArray checks v === b[i] with no sorting.
Any group whose team list isn't already alphabetical in the YAML will never be highlighted, even when exactly its teams are selected. Sort both sides before comparing, or use a set-based comparison.
group should be sorted beforehand.
Determined with claude code and not tested
| console.log(`${perfNow()}: Matrix: Chip flip Tag '${value}: ${selected}`); | ||
| toggleTagFilters(event: MatChipListboxChange) { | ||
| const selectedValues: string[] = event.value || []; | ||
| console.log(`${perfNow()}: Matrix: Tag filter changed: [${selectedValues.join(', ')}]`); |
There was a problem hiding this comment.
if we would have a debug flag, this would be for debugging only
vbakke
left a comment
There was a problem hiding this comment.
I removed nodes_modules and did a fresh pnpm install. Quite a few warnings about deprecated libraries, and version not compatible with Angular 20.
Not so important for this pull request, but for the next upgrade, we need to ensure official compatibility on our sub packages.
Heatmap: Chips - Deselecting Team Group
It makes sense to be able to deselect any chip in DSOMM. But deselecting the Team Group filter does not. At least not the current behaviour, where the teams stay selected, but the Group name is deselected.
I'd suggest, either like the current behaviour at https://dsomm.owasp.org/, or if one can deselect a Team Group, it should revert to 'All teams', and de select any selected Team chip.
| "eslint-config-prettier": "9.1.0", | ||
| "eslint-plugin-prettier": "5.5.6", | ||
| "jasmine-core": "5.13.0", | ||
| "karma": "6.3.0", |
There was a problem hiding this comment.
| "karma": "6.4.0", |
| "@types/jasmine": "3.10.0", | ||
| "@types/js-yaml": "4.0.9", | ||
| "@types/markdown-it": "14.1.2", | ||
| "@types/node": "12.11.1", |
There was a problem hiding this comment.
| "@types/node": "12.11.1", | |
| "@types/node": "20.19.0", |
| "@angular/platform-browser": "20.3.25", | ||
| "@angular/platform-browser-dynamic": "20.3.25", | ||
| "@angular/router": "20.3.25", | ||
| "@grafana/faro-web-sdk": "1.12.2", |
There was a problem hiding this comment.
| "@grafana/faro-web-sdk": "1.12.2", |
Oops. I think Grafana ended up in the main branch by a mistake I did last year. I used Grafana to test my side development. I do not think it is used anywhere in the main project. Let's remove these two dependecies.
| "@angular/platform-browser-dynamic": "20.3.25", | ||
| "@angular/router": "20.3.25", | ||
| "@grafana/faro-web-sdk": "1.12.2", | ||
| "@grafana/faro-web-tracing": "1.12.2", |
There was a problem hiding this comment.
| "@grafana/faro-web-tracing": "1.12.2", |
description in doc