Skip to content

Commit

Permalink
Added senario for empty feature flag table (#1587)
Browse files Browse the repository at this point in the history
* added senario for empty feature flag table and style changes for table

* added color to table header

---------

Co-authored-by: danoswaltCL <[email protected]>
  • Loading branch information
Yagnik56 and danoswaltCL authored May 29, 2024
1 parent 47856ec commit 4d2ac33
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{{ 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>
Expand All @@ -88,6 +88,11 @@

<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
<tr *matNoDataRow>
<td class="no-data-row" [attr.colspan]="displayedColumns.length">
{{ 'feature-flags.no-flags-in-table.text' | translate }}
</td>
</tr>
</table>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
.mat-mdc-cell,
.mat-mdc-header-cell {
padding: 10px 5px;
padding-left: 20px;
width: 10%;
word-break: break-word;
}

.mat-mdc-header-cell {
padding-left: 5px;
background-color: var(--zircon);
margin-bottom: 10px;
}

.flag {
Expand All @@ -54,4 +56,11 @@
width: 40%;
}
}

.no-data-row {
text-align: center;
font-size: 16px;
color: var(--dark-grey);
padding: 16px;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.full-width {
width: 100%; // TODO try not to set here, should be in the common parent...
padding: 10px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
display: flex;
flex-direction: column;
width: 100%;
padding: 20px;
margin: 0;
}

Expand Down
1 change: 1 addition & 0 deletions frontend/projects/upgrade/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@
"feature-flags.subtitle.text": "Create and manage feature flags",
"feature-flags.link.text": "featureflags",
"feature-flags.no-flags.text": "Welcome! <br> Let's start by creating a new flag!",
"feature-flags.no-flags-in-table.text": "No feature flags is defined. Create a new feature flag.",
"feature-flags.delete-flag.message.text": "Type the name of feature flag to confirm deletion:",
"feature-flags.delete-flag.input-placeholder.text": "Feature flag name",
"feature-flags.add-flag.text": "ADD FLAG",
Expand Down

0 comments on commit 4d2ac33

Please sign in to comment.