Skip to content

Commit

Permalink
PLAN-1778: New mat tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
LALuis committed Dec 23, 2024
1 parent 20b229b commit c58254a
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 25 deletions.
16 changes: 9 additions & 7 deletions src/interface/src/app/map/map.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
class="draw-area-button"
[ngClass]="{
selected: selectedAreaCreationAction === AreaCreationAction.DRAW,
deselected: selectedAreaCreationAction === AreaCreationAction.UPLOAD
deselected:

Check failure on line 40 in src/interface/src/app/map/map.component.html

View workflow job for this annotation

GitHub Actions / lint-frontend (18.x)

Replace `⏎··············selectedAreaCreationAction·===·AreaCreationAction.UPLOAD,` with `·selectedAreaCreationAction·===·AreaCreationAction.UPLOAD`
selectedAreaCreationAction === AreaCreationAction.UPLOAD,
}"
(click)="onAreaCreationActionChange(AreaCreationAction.DRAW)">
<mat-icon>draw</mat-icon>
Expand All @@ -54,7 +55,8 @@
[ngClass]="{
selected:
selectedAreaCreationAction === AreaCreationAction.UPLOAD,
deselected: selectedAreaCreationAction === AreaCreationAction.DRAW
deselected:

Check failure on line 58 in src/interface/src/app/map/map.component.html

View workflow job for this annotation

GitHub Actions / lint-frontend (18.x)

Replace `⏎················selectedAreaCreationAction·===·AreaCreationAction.DRAW,` with `·selectedAreaCreationAction·===·AreaCreationAction.DRAW`
selectedAreaCreationAction === AreaCreationAction.DRAW,
}"
(click)="onAreaCreationActionChange(AreaCreationAction.UPLOAD)">
<mat-icon>upload_file</mat-icon>
Expand Down Expand Up @@ -103,12 +105,12 @@
<div
class="map-grid"
[ngClass]="{
'one-column': mapViewOptions$.getValue().numVisibleMaps === 1
'one-column': mapViewOptions$.getValue().numVisibleMaps === 1,

Check failure on line 108 in src/interface/src/app/map/map.component.html

View workflow job for this annotation

GitHub Actions / lint-frontend (18.x)

Delete `,`
}">
<div
class="map-box"
[ngClass]="{
selected: (mapViewOptions$ | async)?.selectedMapIndex === 0
selected: (mapViewOptions$ | async)?.selectedMapIndex === 0,

Check failure on line 113 in src/interface/src/app/map/map.component.html

View workflow job for this annotation

GitHub Actions / lint-frontend (18.x)

Delete `,`
}"
[hidden]="!isMapVisible(0)"
data-testid="map1">
Expand All @@ -121,7 +123,7 @@
<div
class="map-box"
[ngClass]="{
selected: (mapViewOptions$ | async)?.selectedMapIndex === 1
selected: (mapViewOptions$ | async)?.selectedMapIndex === 1,

Check failure on line 126 in src/interface/src/app/map/map.component.html

View workflow job for this annotation

GitHub Actions / lint-frontend (18.x)

Delete `,`
}"
[hidden]="!isMapVisible(1)"
data-testid="map2">
Expand All @@ -135,7 +137,7 @@
<div
class="map-box"
[ngClass]="{
selected: (mapViewOptions$ | async)?.selectedMapIndex === 2
selected: (mapViewOptions$ | async)?.selectedMapIndex === 2,

Check failure on line 140 in src/interface/src/app/map/map.component.html

View workflow job for this annotation

GitHub Actions / lint-frontend (18.x)

Delete `,`
}"
[hidden]="!isMapVisible(2)"
data-testid="map3">
Expand All @@ -148,7 +150,7 @@
<div
class="map-box"
[ngClass]="{
selected: (mapViewOptions$ | async)?.selectedMapIndex === 3
selected: (mapViewOptions$ | async)?.selectedMapIndex === 3,

Check failure on line 153 in src/interface/src/app/map/map.component.html

View workflow job for this annotation

GitHub Actions / lint-frontend (18.x)

Delete `,`
}"
[hidden]="!isMapVisible(3)"
data-testid="map4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
*ngIf="focusedSelection === 'maxCost'"
[ngClass]="{
error:
constraintsForm.hasError('notEnoughBudget') && maxCost?.touched
constraintsForm.hasError('notEnoughBudget') && maxCost?.touched,

Check failure on line 63 in src/interface/src/app/plan/create-scenarios/constraints-panel/constraints-panel.component.html

View workflow job for this annotation

GitHub Actions / lint-frontend (18.x)

Delete `,`
}">
Budget needs to be at least
{{ calculateMinBudget() | currency: 'USD' : 'symbol' : '1.0-0' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
[isLoading]="loading"
[hasData]="totalScenarios > 0"
[ngClass]="{
'margin-top': totalScenarios === 0
'margin-top': totalScenarios === 0,

Check failure on line 28 in src/interface/src/app/plan/plan-summary/saved-scenarios/saved-scenarios.component.html

View workflow job for this annotation

GitHub Actions / lint-frontend (18.x)

Delete `,`
}"
emptyStateTitle="No scenarios yet"
[emptyStateContent]="
Expand Down Expand Up @@ -155,7 +155,7 @@ <h4 class="scenarios-title">Scenarios</h4>
[isLoading]="loading"
[hasData]="totalScenarios > 0"
[ngClass]="{
'margin-top': totalScenarios === 0
'margin-top': totalScenarios === 0,

Check failure on line 158 in src/interface/src/app/plan/plan-summary/saved-scenarios/saved-scenarios.component.html

View workflow job for this annotation

GitHub Actions / lint-frontend (18.x)

Delete `,`
}"
emptyStateTitle="No scenarios yet"
[emptyStateContent]="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,6 @@ app-section-loader {
flex: 1;
}

:host ::ng-deep .mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab {
.custom-tab-group ::ng-deep .mat-mdc-tab-header .mat-mdc-tab-label-container .mat-mdc-tab {
flex-grow: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
mat-row
[ngClass]="{
'scenario-row': highlightedScenarioRow?.id !== row.id,
highlight: highlightedScenarioRow?.id === row.id
highlight: highlightedScenarioRow?.id === row.id,
}"
*matRowDef="let row; columns: displayedColumns"
(click)="highlightScenario(row)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h3 class="title">Metrics per Project area</h3>
mat-button
(click)="toggleMapLayer(i)"
[ngClass]="{
' selected': chart.metric_layer === (mapConditionLayer$ | async)
' selected': chart.metric_layer === (mapConditionLayer$ | async),
}">
<mat-icon>map</mat-icon>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div
*ngFor="let step of steps; index as i"
[ngStyle]="{
'--square-color': SLOT_PALETTES[activeSlot][i]
'--square-color': SLOT_PALETTES[activeSlot][i],
}">
{{ step }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h4 class="title">Direct Treatment Impacts</h4>
[paddedContent]="false"
[buttons]="[
{ icon: 'layers', actionName: 'layers' },
{ icon: 'open_in_full', actionName: 'expand' }
{ icon: 'open_in_full', actionName: 'expand' },
]"
(clickedButton)="expandMaps()">
<div panelTitle>{{ mapPanelTitle$ | async }}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
type="button"
*ngIf="userCanEditStands"
[ngClass]="{
active: (standSelectionEnabled$ | async)
active: (standSelectionEnabled$ | async),
}"
(click)="toggleRxSelection()"
matTooltip="RX Selection Tool"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
'case',
['==', ['get', 'id'], hoveredProjectAreaFromFeatures?.properties?.['id']],
hoveredFillColor,
fillColor
fillColor,
],
'fill-opacity': visible && withFill ? 0.5 : 0
'fill-opacity': visible && withFill ? 0.5 : 0,
}"></mgl-layer>

<mgl-layer
Expand All @@ -32,7 +32,7 @@
[sourceLayer]="layers.projectAreasOutline.sourceLayer"
[paint]="{
'line-color': visible ? layers.projectAreasOutline.color : 'transparent',
'line-width': 2
'line-width': 2,
}"></mgl-layer>

<mgl-layer
Expand All @@ -46,7 +46,7 @@
'text-field': ['get', 'name'],
'text-size': textSize,
'text-anchor': 'center',
'text-justify': 'center'
'text-justify': 'center',
}"
[paint]="layers.projectAreaLabels.paint"></mgl-layer>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
[source]="sourceName"
[paint]="{
'line-color': '#007dff',
'line-width': 1
'line-width': 1,
}"></mgl-layer>
<mgl-layer
id="selection-rectangle-fill"
type="fill"
[source]="sourceName"
[paint]="{
'fill-color': '#007dff',
'fill-opacity': 0.1
'fill-opacity': 0.1,
}"></mgl-layer>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[source]="sourceName"
[paint]="{
'line-color': 'black',
'line-width': 2
'line-width': 2,
}">
</mgl-layer>
<mgl-layer
Expand All @@ -16,6 +16,6 @@
[source]="sourceName"
[paint]="{
'fill-color': '#e9eded',
'fill-opacity': 0.1
'fill-opacity': 0.1,
}">
</mgl-layer>
2 changes: 1 addition & 1 deletion src/interface/src/styleguide/modal/modal.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
class="modal-body"
[ngClass]="{
scrollable: scrollableContent,
padded: padBody
padded: padBody,
}">
<ng-content select="[modalBodyContent]"></ng-content>
</main>
Expand Down

0 comments on commit c58254a

Please sign in to comment.