-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feature flag root table section basic setup * add constants --------- Co-authored-by: Zack Lee <[email protected]>
- Loading branch information
1 parent
42820e7
commit 6fa3ed8
Showing
17 changed files
with
371 additions
and
81 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
...flag-root-page/feature-flag-root-page-content/feature-flag-root-page-content.component.ts
This file contains 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
87 changes: 87 additions & 0 deletions
87
.../feature-flag-root-section-card-table/feature-flag-root-section-card-table.component.html
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<div class="flags-list-container"> | ||
<div scroll (scrolled)="fetchFlagsOnScroll()" class="flags-list-table-container" #tableContainer> | ||
<mat-progress-bar class="spinner" mode="indeterminate" *ngIf="isLoading$ | async"></mat-progress-bar> | ||
<table class="flags-list" mat-table [dataSource]="dataSource$" matSort (matSortChange)="changeSorting($event)"> | ||
<ng-container [matColumnDef]="FLAG_ROOT_COLUMN_NAMES.NAME"> | ||
<th class="ft-12-700" mat-header-cell *matHeaderCellDef mat-sort-header> | ||
<span [matTooltip]="FLAG_TRANSLATION_KEYS.NAME | translate" matTooltipPosition="above"> | ||
{{ FLAG_TRANSLATION_KEYS.NAME | translate | uppercase }} | ||
</span> | ||
</th> | ||
<td class="ft-12-600" mat-cell *matCellDef="let flag"> | ||
<span>{{ flag.name }}</span> | ||
<ng-template #flagNameEllipsis> | ||
<span | ||
[matTooltip]="flag.name" | ||
class="flag-name", | ||
matTooltipPosition="above" | ||
> | ||
{{ flag.name | truncate: 30 }} | ||
</span> | ||
</ng-template> | ||
<br /> | ||
<span class="flag-description ft-10-400" *ngIf="flag.description?.length < 30; else flagDescription"> | ||
{{ flag.description }} | ||
</span> | ||
<ng-template #flagDescription> | ||
<span class="flag-description ft-10-400" [matTooltip]="flag.description" matTooltipPosition="above"> | ||
{{ flag.description | truncate: 35 }} | ||
</span> | ||
</ng-template> | ||
</td> | ||
</ng-container> | ||
|
||
<ng-container [matColumnDef]="FLAG_ROOT_COLUMN_NAMES.STATUS"> | ||
<th class="ft-12-700" mat-header-cell *matHeaderCellDef mat-sort-header> | ||
<span [matTooltip]="FLAG_TRANSLATION_KEYS.STATUS | translate" matTooltipPosition="above">{{ FLAG_TRANSLATION_KEYS.STATUS | translate | uppercase }}</span> | ||
</th> | ||
<td class="ft-12-600" mat-cell *matCellDef="let flag">{{ flag.status }}</td> | ||
</ng-container> | ||
|
||
<ng-container [matColumnDef]="FLAG_ROOT_COLUMN_NAMES.UPDATED_AT"> | ||
<th class="ft-12-700" mat-header-cell *matHeaderCellDef mat-sort-header> | ||
<span [matTooltip]="FLAG_TRANSLATION_KEYS.UPDATED_AT | translate" matTooltipPosition="above"> | ||
{{ FLAG_TRANSLATION_KEYS.UPDATED_AT | translate | uppercase }} | ||
</span> | ||
</th> | ||
<td class="ft-12-600" mat-cell *matCellDef="let flag"> | ||
{{ flag.updatedAt }} | ||
</td> | ||
</ng-container> | ||
|
||
<ng-container [matColumnDef]="FLAG_ROOT_COLUMN_NAMES.APP_CONTEXT"> | ||
<th class="ft-12-700" mat-header-cell *matHeaderCellDef mat-sort-header> | ||
<span [matTooltip]="FLAG_TRANSLATION_KEYS.APP_CONTEXT | translate" matTooltipPosition="above"> | ||
{{ FLAG_TRANSLATION_KEYS.APP_CONTEXT | translate | uppercase }} | ||
</span> | ||
</th> | ||
<td class="ft-12-600" mat-cell *matCellDef="let flag"> | ||
{{ flag.context[0] }} | ||
</td> | ||
</ng-container> | ||
|
||
<ng-container [matColumnDef]="FLAG_ROOT_COLUMN_NAMES.TAGS"> | ||
<th class="ft-12-700" mat-header-cell *matHeaderCellDef mat-sort-header> | ||
<span [matTooltip]="FLAG_TRANSLATION_KEYS.TAGS | translate" matTooltipPosition="above">{{ FLAG_TRANSLATION_KEYS.TAGS | translate | uppercase }}</span> | ||
</th> | ||
<td class="ft-12-600" mat-cell *matCellDef="let flag"> | ||
<mat-chip *ngFor="let tag of flag.tags" class="tag">{{ tag }}</mat-chip> | ||
</td> | ||
</ng-container> | ||
|
||
<ng-container [matColumnDef]="FLAG_ROOT_COLUMN_NAMES.EXPOSURES"> | ||
<th class="ft-12-700" mat-header-cell *matHeaderCellDef mat-sort-header> | ||
<span [matTooltip]="FLAG_TRANSLATION_KEYS.EXPOSURES | translate" matTooltipPosition="above"> | ||
{{ FLAG_TRANSLATION_KEYS.EXPOSURES | translate | uppercase }} | ||
</span> | ||
</th> | ||
<td class="ft-12-600" mat-cell *matCellDef="let flag"> | ||
<span *ngFor="let exposure of flag.exposures" class="exposure">{{ exposure }}</span> | ||
</td> | ||
</ng-container> | ||
|
||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr> | ||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr> | ||
</table> | ||
</div> | ||
</div> |
57 changes: 57 additions & 0 deletions
57
.../feature-flag-root-section-card-table/feature-flag-root-section-card-table.component.scss
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
:host ::ng-deep .flags-list-container { | ||
height: 100%; | ||
width: 100%; | ||
|
||
.flags-list-table-container { | ||
position: relative; | ||
margin-top: 8px; | ||
padding: 0 2.25rem; | ||
overflow: auto; | ||
width: 100%; | ||
|
||
.spinner { | ||
position: sticky; | ||
top: 0; | ||
z-index: 1111; | ||
} | ||
} | ||
|
||
.flags-list { | ||
width: 100%; | ||
|
||
th { | ||
color: var(--grey-2); | ||
} | ||
|
||
tr.mat-mdc-footer-row, | ||
tr.mat-mdc-row { | ||
height: 55px; | ||
} | ||
|
||
.mat-mdc-cell, | ||
.mat-mdc-header-cell { | ||
padding: 10px 5px; | ||
width: 10%; | ||
word-break: break-word; | ||
} | ||
|
||
.mat-mdc-header-cell { | ||
padding-left: 5px; | ||
} | ||
|
||
.flag { | ||
&-name { | ||
text-decoration: underline; | ||
cursor: pointer; | ||
} | ||
|
||
&-description { | ||
color: var(--grey-3); | ||
} | ||
} | ||
|
||
.mat-mdc-form-field { | ||
width: 40%; | ||
} | ||
} | ||
} |
Oops, something went wrong.