Skip to content

Commit d414cb9

Browse files
committed
fix all the TODOs created by CLI MDC migration
1 parent 66c409c commit d414cb9

15 files changed

Lines changed: 96 additions & 89 deletions

src/app/component/progress-slider/progress-slider.component.css

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
width: 100%;
66
}
77

8-
/* TODO(mdc-migration): The following rule targets internal classes of slider that may no longer apply for the MDC version. */
9-
.mat-slider-horizontal {
8+
.mat-mdc-slider {
109
min-width: 80px;
1110
}
1211

13-
/* TODO(mdc-migration): The following rule targets internal classes of slider that may no longer apply for the MDC version. */
14-
.mat-slider-track-fill {
15-
background-color: #66bb6a;
16-
height: 10px;
12+
:host ::ng-deep .mat-mdc-slider .mdc-slider__track--active_fill {
13+
border-color: #66bb6a;
1714
}
1815
.step-label {
1916
min-width: 80px;

src/app/component/progress-slider/progress-slider.component.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<div class="progress-container">
22
<!-- TODO: The 'tickInterval' property no longer exists -->
3-
<mat-slider
4-
[min]="0"
5-
[max]="steps.length - 1"
6-
[step]="1" #ngSlider><input matSliderThumb [value]="currentValue" (input)="onStepChange({source: ngSliderThumb, parent: ngSlider, value: ngSliderThumb.value}.value)" #ngSliderThumb="matSliderThumb" />
3+
<mat-slider [min]="0" [max]="steps.length - 1" [step]="1" #ngSlider
4+
><input
5+
matSliderThumb
6+
[value]="currentValue"
7+
(input)="
8+
onStepChange({ source: ngSliderThumb, parent: ngSlider, value: ngSliderThumb.value }.value)
9+
"
10+
#ngSliderThumb="matSliderThumb" />
711
</mat-slider>
812
<span class="step-label">{{ steps[currentValue] }} <!-- eslint-disable-line -->
913
<span *ngIf="currentValue > originalValue"> *</span>

src/app/component/report-config-modal/report-config-modal.component.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
background-color: var(--background-primary);
66
}
77

8-
/* TODO(mdc-migration): The following rule targets internal classes of dialog that may no longer apply for the MDC version. */
9-
mat-dialog-title{
8+
.mat-mdc-dialog-title {
109
font-size:20px;
1110
}
1211

@@ -130,7 +129,6 @@ mat-divider {
130129
}
131130

132131
/* buttons */
133-
/* TODO(mdc-migration): The following rule targets internal classes of button that may no longer apply for the MDC version. */
134132
.column-toggle .mat-button-toggle {
135133
border-radius: 999px;
136134
border: none;
@@ -140,7 +138,6 @@ mat-divider {
140138
}
141139

142140
/* selected */
143-
/* TODO(mdc-migration): The following rule targets internal classes of button that may no longer apply for the MDC version. */
144141
.column-toggle .mat-button-toggle-checked {
145142
background: var(--primary-color);
146143
color: var(--text-on-primary);

src/app/component/report-config-modal/report-config-modal.component.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,15 @@ <h3>Activity Attributes</h3>
166166
[max]="maxWordCap"
167167
step="5"
168168
thumbLabel
169-
[displayWith]="wordCapLabel" #ngSlider><input matSliderThumb [value]="config.descriptionWordCap" (input)="onWordCapChange({source: ngSliderThumb, parent: ngSlider, value: ngSliderThumb.value})" #ngSliderThumb="matSliderThumb" />
169+
[displayWith]="wordCapLabel"
170+
#ngSlider
171+
><input
172+
matSliderThumb
173+
[value]="config.descriptionWordCap"
174+
(input)="
175+
onWordCapChange({ source: ngSliderThumb, parent: ngSlider, value: ngSliderThumb.value })
176+
"
177+
#ngSliderThumb="matSliderThumb" />
170178
</mat-slider>
171179
</div>
172180
</div>

src/app/pages/circular-heatmap/circular-heatmap.component.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@
139139
app-progress-slider {
140140
width: 100%;
141141
}
142-
/* TODO(mdc-migration): The following rule targets internal classes of chips that may no longer apply for the MDC version. */
143-
.mat-chip-list {
142+
.mat-mdc-chip-listbox,
143+
.mat-mdc-chip-grid {
144144
display: flex;
145145
flex-direction: row;
146146
flex-wrap: wrap;
@@ -168,8 +168,8 @@ app-progress-slider {
168168
margin-right: 4px;
169169
}
170170

171-
/* TODO(mdc-migration): The following rule targets internal classes of chips that may no longer apply for the MDC version. */
172-
mat-chip {
171+
mat-chip-option,
172+
mat-chip-row {
173173
cursor: pointer;
174174
}
175175

@@ -218,8 +218,8 @@ button.filter-toggle {
218218
grid-row: 1;
219219
padding: 0.4rem;
220220
}
221-
/* TODO(mdc-migration): The following rule targets internal classes of chips that may no longer apply for the MDC version. */
222-
.mat-chip-list {
221+
.mat-mdc-chip-listbox,
222+
.mat-mdc-chip-grid {
223223
padding: 0.4rem;
224224
}
225225

src/app/pages/circular-heatmap/circular-heatmap.component.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ <h2>Nothing to show</h2>
3838
<mat-label>Team Group Filter</mat-label>
3939
<mat-chip-listbox selectable>
4040
<mat-chip-option
41-
#chip="matChip"
4241
*ngFor="let group of filtersTeamGroups | keyvalue : unsorted"
43-
(click)="toggleTeamGroupFilter(chip)"
42+
(selectionChange)="toggleTeamGroupFilter($event)"
4443
[selected]="filtersTeamGroups[group.key]">
4544
{{ group.key }}
4645
</mat-chip-option>
@@ -50,9 +49,8 @@ <h2>Nothing to show</h2>
5049
<mat-label>Team Filter</mat-label>
5150
<mat-chip-listbox selectable multiple>
5251
<mat-chip-option
53-
#chip="matChip"
5452
*ngFor="let team of filtersTeams | keyvalue"
55-
(click)="toggleTeamFilter(chip)"
53+
(selectionChange)="toggleTeamFilter($event)"
5654
[value]="team.key"
5755
[selected]="team.value">
5856
{{ team.key }}

src/app/pages/circular-heatmap/circular-heatmap.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { LoaderService } from 'src/app/service/loader/data-loader.service';
44
import * as d3 from 'd3';
55
import { Router, ActivatedRoute } from '@angular/router';
66
import { Location } from '@angular/common';
7-
import { MatChip } from '@angular/material/chips';
7+
import { MatChipOption, MatChipSelectionChange } from '@angular/material/chips';
88
import { Subject } from 'rxjs';
99
import { takeUntil, distinctUntilChanged } from 'rxjs/operators';
1010
import * as md from 'markdown-it';
@@ -218,7 +218,8 @@ export class CircularHeatmapComponent implements OnInit, OnDestroy {
218218
return filters;
219219
}
220220

221-
toggleTeamGroupFilter(chip: MatChip) {
221+
toggleTeamGroupFilter(event: MatChipSelectionChange) {
222+
let chip = event.source;
222223
let teamGroup = chip.value.trim();
223224
if (!chip.selected) {
224225
chip.toggleSelected();
@@ -240,7 +241,8 @@ export class CircularHeatmapComponent implements OnInit, OnDestroy {
240241
}
241242
}
242243

243-
toggleTeamFilter(chip: MatChip) {
244+
toggleTeamFilter(event: MatChipSelectionChange) {
245+
let chip = event.source;
244246
chip.toggleSelected();
245247
this.filtersTeams[chip.value.trim()] = chip.selected;
246248
console.log(`${perfNow()}: Heat: Chip flip Team '${chip.value}: ${chip.selected}`);

src/app/pages/mapping/mapping.component.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@
3737
font-weight: 500;
3838
}
3939

40-
/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
41-
.content ::ng-deep .mat-form-field-wrapper {
42-
padding-bottom: 0;
40+
.content ::ng-deep .mat-mdc-form-field-subscript-wrapper {
41+
display: none;
4342
}
4443

4544
.hide{

src/app/pages/mapping/mapping.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<mat-chip-grid #chipList aria-label="Search terms">
77
<mat-chip-row
88
*ngFor="let term of searchTerms"
9-
[selectable]="false"
109
[removable]="true"
1110
(removed)="removeSearchTerm(term)">
1211
{{ term }}

src/app/pages/matrix/matrix.component.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
<mat-label>Dimension Filter</mat-label>
55
<mat-chip-listbox #chipList selectable multiple>
66
<mat-chip-option
7-
#c="matChip"
87
*ngFor="let dim of filtersDim | keyvalue"
9-
(click)="toggleDimensionFilters(c)"
8+
(selectionChange)="toggleDimensionFilters($event)"
109
[value]="dim.key"
1110
[selected]="dim.value">
1211
{{ dim.key }}
@@ -17,9 +16,8 @@
1716
<mat-label>Activity Tag Filter</mat-label>
1817
<mat-chip-listbox selectable multiple>
1918
<mat-chip-option
20-
#c="matChip"
2119
*ngFor="let tag of filtersTag | keyvalue"
22-
(click)="toggleTagFilters(c)"
20+
(selectionChange)="toggleTagFilters($event)"
2321
[value]="tag.key"
2422
[selected]="tag.value">
2523
{{ tag.key }}

0 commit comments

Comments
 (0)