-
Notifications
You must be signed in to change notification settings - Fork 2
Divyanshu | Design improvement #513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| @if (loading$ | async; as loading) { | ||
| <div class="flex flex-col"> | ||
| <div class="flex flex-col h-full"> | ||
| @if (loading.dataLoading && (hasSomeFeatures$ | async) === null) { <proxy-loader></proxy-loader> } | ||
|
|
||
| <!-- Action Bar --> | ||
|
|
@@ -41,128 +41,116 @@ <h4 class="my-0 text-secondary mat-body-1 font-semibold">Blocks</h4> | |
| resource allocation, and a user-friendly dashboard for easy configuration. | ||
| </p> | ||
| } @if ((hasSomeFeatures$ | async) === true) { | ||
| <mat-card class="p-0 outline-card responsive-card grow"> | ||
| <mat-card-content> | ||
| <div class="table-scroll"> | ||
| <table | ||
| mat-table | ||
| [dataSource]=" | ||
| (feature$ | async)?.data?.length | ||
| ? (feature$ | async)?.data | ||
| : loading.dataLoading | ||
| ? [1, 2, 3, 4, 5] | ||
| : [] | ||
| " | ||
| class="default-table responsive-table" | ||
| > | ||
| <!-- Name Column --> | ||
| <ng-container matColumnDef="name"> | ||
| <th mat-header-cell *matHeaderCellDef mat-sort-header class="width-md-300">Name</th> | ||
| <td mat-cell *matCellDef="let element" data-label="Name"> | ||
| @if (!loading.dataLoading) { | ||
| <span>{{ element.name }}</span> | ||
| } @else { | ||
| <ng-container [ngTemplateOutlet]="loadingRef"></ng-container> | ||
| } | ||
| </td> | ||
| </ng-container> | ||
| <div class="table-scroll"> | ||
| <table | ||
| mat-table | ||
| [dataSource]=" | ||
| (feature$ | async)?.data?.length ? (feature$ | async)?.data : loading.dataLoading ? [1, 2, 3, 4, 5] : [] | ||
| " | ||
| class="default-table responsive-table" | ||
| > | ||
| <!-- Name Column --> | ||
| <ng-container matColumnDef="name"> | ||
| <th mat-header-cell *matHeaderCellDef mat-sort-header class="width-md-300">Name</th> | ||
| <td mat-cell *matCellDef="let element" data-label="Name"> | ||
| @if (!loading.dataLoading) { | ||
| <span>{{ element.name }}</span> | ||
| } @else { | ||
| <ng-container [ngTemplateOutlet]="loadingRef"></ng-container> | ||
| } | ||
| </td> | ||
| </ng-container> | ||
|
|
||
| <!-- reference_id Column --> | ||
| <ng-container matColumnDef="reference_id"> | ||
| <th mat-header-cell *matHeaderCellDef mat-sort-header class="width-md-300">Reference Id</th> | ||
| <td mat-cell *matCellDef="let element" data-label="Reference Id"> | ||
| @if (!loading.dataLoading) { | ||
| <div class="flex items-center gap-2"> | ||
| <span | ||
| [matTooltip]="element.reference_id" | ||
| matTooltipPosition="above" | ||
| class="cursor-default" | ||
| > | ||
| {{ | ||
| element.reference_id?.length > 15 | ||
| ? (element.reference_id | slice: 0:10) + | ||
| '...' + | ||
| (element.reference_id | slice: -5) | ||
| : element.reference_id | ||
| }} | ||
| </span> | ||
| <proxy-copy-button | ||
| [copyData]="element.reference_id" | ||
| tooltip="Copy Reference Id" | ||
| ></proxy-copy-button> | ||
| </div> | ||
| } @else { | ||
| <ng-container [ngTemplateOutlet]="loadingRef"></ng-container> | ||
| } | ||
| </td> | ||
| </ng-container> | ||
| <!-- reference_id Column --> | ||
| <ng-container matColumnDef="reference_id"> | ||
| <th mat-header-cell *matHeaderCellDef mat-sort-header class="width-md-300">Reference Id</th> | ||
| <td mat-cell *matCellDef="let element" data-label="Reference Id"> | ||
| @if (!loading.dataLoading) { | ||
| <div class="flex items-center gap-2 max-md:flex-col max-md:items-end"> | ||
| <span | ||
| [matTooltip]="element.reference_id" | ||
| matTooltipPosition="above" | ||
| class="cursor-pointer font-mono text-xs px-2 py-0.5 rounded-4 min-w-[150px]" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reference_id span has been changed from |
||
| > | ||
| {{ | ||
| element.reference_id?.length > 15 | ||
| ? (element.reference_id | slice: 0:10) + '...' + (element.reference_id | slice: -5) | ||
| : element.reference_id | ||
| }} | ||
| </span> | ||
| <proxy-copy-button | ||
| [copyData]="element.reference_id" | ||
| tooltip="Copy Reference Id" | ||
| ></proxy-copy-button> | ||
| </div> | ||
| } @else { | ||
| <ng-container [ngTemplateOutlet]="loadingRef"></ng-container> | ||
| } | ||
| </td> | ||
| </ng-container> | ||
|
|
||
| <!-- Method Column --> | ||
| <ng-container matColumnDef="method"> | ||
| <th mat-header-cell *matHeaderCellDef mat-sort-header class="width-md-200">Method</th> | ||
| <td mat-cell *matCellDef="let element" data-label="Method"> | ||
| @if (!loading.dataLoading) { @if (element.method?.name) { | ||
| {{ element.method?.name }} | ||
| } } @else { | ||
| <ng-container [ngTemplateOutlet]="loadingRef"></ng-container> | ||
| } | ||
| </td> | ||
| </ng-container> | ||
| <!-- Method Column --> | ||
| <ng-container matColumnDef="method"> | ||
| <th mat-header-cell *matHeaderCellDef mat-sort-header class="width-md-200">Method</th> | ||
| <td mat-cell *matCellDef="let element" data-label="Method"> | ||
| @if (!loading.dataLoading) { @if (element.method?.name) { | ||
| {{ element.method?.name }} | ||
| } } @else { | ||
| <ng-container [ngTemplateOutlet]="loadingRef"></ng-container> | ||
| } | ||
| </td> | ||
| </ng-container> | ||
|
|
||
| <!-- Type Column --> | ||
| <ng-container matColumnDef="type"> | ||
| <th mat-header-cell *matHeaderCellDef mat-sort-header class="width-md-200">Type</th> | ||
| <td mat-cell *matCellDef="let element" data-label="Type"> | ||
| @if (!loading.dataLoading) { @if (element.feature?.name) { | ||
| {{ element.feature?.name }} | ||
| } } @else { | ||
| <ng-container [ngTemplateOutlet]="loadingRef"></ng-container> | ||
| } | ||
| </td> | ||
| </ng-container> | ||
| <!-- Type Column --> | ||
| <ng-container matColumnDef="type"> | ||
| <th mat-header-cell *matHeaderCellDef mat-sort-header class="width-md-200">Type</th> | ||
| <td mat-cell *matCellDef="let element" data-label="Type"> | ||
| @if (!loading.dataLoading) { @if (element.feature?.name) { | ||
| {{ element.feature?.name }} | ||
| } } @else { | ||
| <ng-container [ngTemplateOutlet]="loadingRef"></ng-container> | ||
| } | ||
| </td> | ||
| </ng-container> | ||
|
|
||
| <!-- Manage Column --> | ||
| <ng-container matColumnDef="manage"> | ||
| <th mat-header-cell *matHeaderCellDef></th> | ||
| <td mat-cell *matCellDef="let element" data-label="Manage"> | ||
| @if (!loading.dataLoading) { | ||
| <div class="actions flex justify-end pr-3"> | ||
| <button matButton="outlined" [routerLink]="['manage', element.id]" class="mat-btn-md"> | ||
| <mat-icon class="material-icons-outlined mat-icon-18 mat-icon-prefix" | ||
| >settings</mat-icon | ||
| > | ||
| Manage | ||
| </button> | ||
| </div> | ||
| } | ||
| </td> | ||
| </ng-container> | ||
| <!-- Manage Column --> | ||
| <ng-container matColumnDef="manage"> | ||
| <th mat-header-cell *matHeaderCellDef></th> | ||
| <td mat-cell *matCellDef="let element" data-label="Manage"> | ||
| @if (!loading.dataLoading) { | ||
| <div class="actions flex justify-end pr-3"> | ||
| <button matButton="outlined" [routerLink]="['manage', element.id]" class="mat-btn-md"> | ||
| <mat-icon class="material-icons-outlined mat-icon-18 mat-icon-prefix">settings</mat-icon> | ||
| Manage | ||
| </button> | ||
| </div> | ||
| } | ||
| </td> | ||
| </ng-container> | ||
|
|
||
| <tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr> | ||
| <tr | ||
| mat-row | ||
| *matRowDef="let row; columns: displayedColumns; let i = index" | ||
| class="hover-action" | ||
| [class.last-child]="i + 1 === pageSizeOptions[0]" | ||
| ></tr> | ||
| <tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr> | ||
| <tr | ||
| mat-row | ||
| *matRowDef="let row; columns: displayedColumns; let i = index" | ||
| class="hover-action" | ||
| [class.last-child]="i + 1 === pageSizeOptions[0]" | ||
| ></tr> | ||
|
|
||
| <tr *matNoDataRow> | ||
| <td class="mat-cell border-0" [attr.colspan]="displayedColumns.length"> | ||
| <proxy-no-record-found [title]="'blocks'" [showBtn]="false"></proxy-no-record-found> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
| </div> | ||
| <mat-paginator-goto | ||
| [length]="(feature$ | async)?.totalEntityCount" | ||
| [pageSize]="(feature$ | async)?.itemsPerPage || 25" | ||
| [pageSizeOptions]="pageSizeOptions" | ||
| (page)="pageChange($event)" | ||
| [pageIndex]="(feature$ | async)?.pageNumber - 1" | ||
| class="box-shadow-none" | ||
| ></mat-paginator-goto> | ||
| </mat-card-content> | ||
| </mat-card> | ||
| <tr *matNoDataRow> | ||
| <td class="mat-cell border-0" [attr.colspan]="displayedColumns.length"> | ||
| <proxy-no-record-found [title]="'blocks'" [showBtn]="false"></proxy-no-record-found> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
| </div> | ||
| <mat-paginator-goto | ||
| [length]="(feature$ | async)?.totalEntityCount" | ||
| [pageSize]="(feature$ | async)?.itemsPerPage || 25" | ||
| [pageSizeOptions]="pageSizeOptions" | ||
| (page)="pageChange($event)" | ||
| [pageIndex]="(feature$ | async)?.pageNumber - 1" | ||
| class="box-shadow-none" | ||
| ></mat-paginator-goto> | ||
| } | ||
| </div> | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| :host { | ||
| display: block; | ||
| height: 100%; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The responsive design for reference_id has been improved with
max-md:flex-colandmax-md:items-end, but this could cause the copy button to appear disconnected from the ID it's copying on mobile devices. Consider adding a visual indicator to maintain the relationship between the ID and its copy button when stacked vertically.