Browse Source

Improve column width distribution

pull/7832/head
Thomas Kaul 4 days ago
parent
commit
4ac634b36c
  1. 9
      apps/client/src/styles.scss
  2. 12
      libs/ui/src/lib/account-balances/account-balances.component.html
  3. 35
      libs/ui/src/lib/accounts-table/accounts-table.component.html
  4. 22
      libs/ui/src/lib/activities-table/activities-table.component.html
  5. 17
      libs/ui/src/lib/benchmark/benchmark.component.html
  6. 20
      libs/ui/src/lib/holdings-table/holdings-table.component.html
  7. 18
      libs/ui/src/lib/top-holdings/top-holdings.component.html

9
apps/client/src/styles.scss

@ -349,6 +349,11 @@ ngx-skeleton-loader {
cursor: pointer; cursor: pointer;
} }
.gf-fit-content {
white-space: nowrap;
width: 1%;
}
.gf-pointer-events-none { .gf-pointer-events-none {
pointer-events: none; pointer-events: none;
} }
@ -361,6 +366,10 @@ ngx-skeleton-loader {
@include table.gf-table; @include table.gf-table;
} }
.gf-table-column-fill {
width: 100%;
}
.gf-text-wrap-balance { .gf-text-wrap-balance {
text-wrap: balance; text-wrap: balance;
} }

12
libs/ui/src/lib/account-balances/account-balances.component.html

@ -61,8 +61,16 @@
</ng-container> </ng-container>
<ng-container matColumnDef="actions" stickyEnd> <ng-container matColumnDef="actions" stickyEnd>
<th *matHeaderCellDef class="px-1 text-center" mat-header-cell></th> <th
<td *matCellDef="let element" class="px-1 text-center" mat-cell> *matHeaderCellDef
class="gf-fit-content px-1 text-center"
mat-header-cell
></th>
<td
*matCellDef="let element"
class="gf-fit-content px-1 text-center"
mat-cell
>
@if (showActions()) { @if (showActions()) {
<button <button
class="mx-1 no-min-width px-2" class="mx-1 no-min-width px-2"

35
libs/ui/src/lib/accounts-table/accounts-table.component.html

@ -24,12 +24,12 @@
<ng-container matColumnDef="status"> <ng-container matColumnDef="status">
<th <th
*matHeaderCellDef *matHeaderCellDef
class="d-none d-lg-table-cell px-1" class="d-none d-lg-table-cell gf-fit-content px-1"
mat-header-cell mat-header-cell
></th> ></th>
<td <td
*matCellDef="let element" *matCellDef="let element"
class="d-none d-lg-table-cell px-1" class="d-none d-lg-table-cell gf-fit-content px-1"
mat-cell mat-cell
> >
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
@ -40,16 +40,25 @@
</td> </td>
<td <td
*matFooterCellDef *matFooterCellDef
class="d-none d-lg-table-cell px-1" class="d-none d-lg-table-cell gf-fit-content px-1"
mat-footer-cell mat-footer-cell
></td> ></td>
</ng-container> </ng-container>
<ng-container matColumnDef="account"> <ng-container matColumnDef="account">
<th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header="name"> <th
*matHeaderCellDef
class="gf-table-column-fill px-1"
mat-header-cell
mat-sort-header="name"
>
<ng-container i18n>Name</ng-container> <ng-container i18n>Name</ng-container>
</th> </th>
<td *matCellDef="let element" class="px-1 text-nowrap" mat-cell> <td
*matCellDef="let element"
class="gf-table-column-fill px-1 text-nowrap"
mat-cell
>
<gf-entity-logo <gf-entity-logo
class="d-inline d-sm-none mr-1" class="d-inline d-sm-none mr-1"
[hasPlaceholder]="true" [hasPlaceholder]="true"
@ -93,7 +102,7 @@
</th> </th>
<td <td
*matCellDef="let element" *matCellDef="let element"
class="d-none d-lg-table-cell px-1" class="d-none d-lg-table-cell px-1 text-nowrap"
mat-cell mat-cell
> >
<div class="d-flex"> <div class="d-flex">
@ -316,8 +325,16 @@
</ng-container> </ng-container>
<ng-container matColumnDef="actions" stickyEnd> <ng-container matColumnDef="actions" stickyEnd>
<th *matHeaderCellDef class="px-1 text-center" mat-header-cell></th> <th
<td *matCellDef="let element" class="px-1 text-center" mat-cell> *matHeaderCellDef
class="gf-fit-content px-1 text-center"
mat-header-cell
></th>
<td
*matCellDef="let element"
class="gf-fit-content px-1 text-center"
mat-cell
>
<button <button
class="mx-1 no-min-width px-2" class="mx-1 no-min-width px-2"
mat-button mat-button
@ -364,7 +381,7 @@
} }
</mat-menu> </mat-menu>
</td> </td>
<td *matFooterCellDef class="px-1" mat-footer-cell></td> <td *matFooterCellDef class="gf-fit-content px-1" mat-footer-cell></td>
</ng-container> </ng-container>
<tr *matHeaderRowDef="displayedColumns()" mat-header-row></tr> <tr *matHeaderRowDef="displayedColumns()" mat-header-row></tr>

22
libs/ui/src/lib/activities-table/activities-table.component.html

@ -167,8 +167,12 @@
</ng-container> </ng-container>
<ng-container matColumnDef="icon" sticky> <ng-container matColumnDef="icon" sticky>
<th *matHeaderCellDef class="px-1" mat-header-cell></th> <th *matHeaderCellDef class="gf-fit-content px-1" mat-header-cell></th>
<td *matCellDef="let element" class="px-1 text-center" mat-cell> <td
*matCellDef="let element"
class="gf-fit-content px-1 text-center"
mat-cell
>
<gf-entity-logo <gf-entity-logo
[dataSource]="element.assetProfile?.dataSource" [dataSource]="element.assetProfile?.dataSource"
[symbol]="element.assetProfile?.symbol" [symbol]="element.assetProfile?.symbol"
@ -178,10 +182,14 @@
</ng-container> </ng-container>
<ng-container matColumnDef="nameWithSymbol"> <ng-container matColumnDef="nameWithSymbol">
<th *matHeaderCellDef class="px-1" mat-header-cell> <th *matHeaderCellDef class="gf-table-column-fill px-1" mat-header-cell>
<ng-container i18n>Name</ng-container> <ng-container i18n>Name</ng-container>
</th> </th>
<td *matCellDef="let element" class="line-height-normal px-1" mat-cell> <td
*matCellDef="let element"
class="gf-table-column-fill line-height-normal px-1"
mat-cell
>
<div class="align-items-center d-flex text-nowrap"> <div class="align-items-center d-flex text-nowrap">
<span class="text-truncate">{{ element.assetProfile?.name }}</span> <span class="text-truncate">{{ element.assetProfile?.name }}</span>
@if (isDraftActivity(element)) { @if (isDraftActivity(element)) {
@ -402,7 +410,11 @@
</ng-container> </ng-container>
<ng-container matColumnDef="actions" stickyEnd> <ng-container matColumnDef="actions" stickyEnd>
<th *matHeaderCellDef class="px-1 text-center" mat-header-cell> <th
*matHeaderCellDef
class="gf-fit-content px-1 text-center"
mat-header-cell
>
@if ( @if (
!hasPermissionToImportActivities && hasPermissionToExportActivities !hasPermissionToImportActivities && hasPermissionToExportActivities
) { ) {

17
libs/ui/src/lib/benchmark/benchmark.component.html

@ -8,8 +8,12 @@
[dataSource]="dataSource" [dataSource]="dataSource"
> >
<ng-container matColumnDef="icon" sticky> <ng-container matColumnDef="icon" sticky>
<th *matHeaderCellDef class="px-1" mat-header-cell></th> <th *matHeaderCellDef class="gf-fit-content px-1" mat-header-cell></th>
<td *matCellDef="let element" class="px-1 text-center" mat-cell> <td
*matCellDef="let element"
class="gf-fit-content px-1 text-center"
mat-cell
>
<gf-entity-logo <gf-entity-logo
[dataSource]="element.dataSource" [dataSource]="element.dataSource"
[symbol]="element.symbol" [symbol]="element.symbol"
@ -19,12 +23,17 @@
</ng-container> </ng-container>
<ng-container matColumnDef="name"> <ng-container matColumnDef="name">
<th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header> <th
*matHeaderCellDef
class="gf-table-column-fill px-1"
mat-header-cell
mat-sort-header
>
<ng-container i18n>Name</ng-container> <ng-container i18n>Name</ng-container>
</th> </th>
<td <td
*matCellDef="let element" *matCellDef="let element"
class="line-height-normal px-1 text-nowrap" class="gf-table-column-fill line-height-normal px-1 text-nowrap"
mat-cell mat-cell
> >
<div class="text-truncate"> <div class="text-truncate">

20
libs/ui/src/lib/holdings-table/holdings-table.component.html

@ -8,8 +8,12 @@
[matSortDirection]="sortDirection()" [matSortDirection]="sortDirection()"
> >
<ng-container matColumnDef="icon" sticky> <ng-container matColumnDef="icon" sticky>
<th *matHeaderCellDef class="px-1" mat-header-cell></th> <th *matHeaderCellDef class="gf-fit-content px-1" mat-header-cell></th>
<td *matCellDef="let element" class="px-1 text-center" mat-cell> <td
*matCellDef="let element"
class="gf-fit-content px-1 text-center"
mat-cell
>
<gf-entity-logo <gf-entity-logo
[dataSource]="element.assetProfile.dataSource" [dataSource]="element.assetProfile.dataSource"
[symbol]="element.assetProfile.symbol" [symbol]="element.assetProfile.symbol"
@ -21,13 +25,17 @@
<ng-container matColumnDef="nameWithSymbol"> <ng-container matColumnDef="nameWithSymbol">
<th <th
*matHeaderCellDef *matHeaderCellDef
class="px-1" class="gf-table-column-fill px-1"
mat-header-cell mat-header-cell
mat-sort-header="assetProfile.name" mat-sort-header="assetProfile.name"
> >
<ng-container i18n>Name</ng-container> <ng-container i18n>Name</ng-container>
</th> </th>
<td *matCellDef="let element" class="line-height-normal px-1" mat-cell> <td
*matCellDef="let element"
class="gf-table-column-fill line-height-normal px-1"
mat-cell
>
<div class="text-truncate"> <div class="text-truncate">
{{ element.assetProfile.name }} {{ element.assetProfile.name }}
@if (element.assetProfile.name === element.assetProfile.symbol) { @if (element.assetProfile.name === element.assetProfile.symbol) {
@ -161,14 +169,14 @@
<ng-container matColumnDef="performanceInPercentage" stickyEnd> <ng-container matColumnDef="performanceInPercentage" stickyEnd>
<th <th
*matHeaderCellDef *matHeaderCellDef
class="justify-content-end px-1" class="gf-fit-content justify-content-end px-1"
mat-header-cell mat-header-cell
mat-sort-header="netPerformancePercentWithCurrencyEffect" mat-sort-header="netPerformancePercentWithCurrencyEffect"
> >
<span class="d-none d-sm-block" i18n>Performance</span> <span class="d-none d-sm-block" i18n>Performance</span>
<span class="d-block d-sm-none" i18n-title title="Performance">±</span> <span class="d-block d-sm-none" i18n-title title="Performance">±</span>
</th> </th>
<td *matCellDef="let element" class="px-1" mat-cell> <td *matCellDef="let element" class="gf-fit-content px-1" mat-cell>
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
<gf-value <gf-value
[colorizeSign]="true" [colorizeSign]="true"

18
libs/ui/src/lib/top-holdings/top-holdings.component.html

@ -5,17 +5,11 @@
multiTemplateDataRows multiTemplateDataRows
[dataSource]="dataSource" [dataSource]="dataSource"
> >
<colgroup>
<col class="w-100" />
<col />
<col />
</colgroup>
<ng-container matColumnDef="name"> <ng-container matColumnDef="name">
<th *matHeaderCellDef class="px-2" mat-header-cell> <th *matHeaderCellDef class="gf-table-column-fill px-2" mat-header-cell>
<ng-container i18n>Name</ng-container> <ng-container i18n>Name</ng-container>
</th> </th>
<td *matCellDef="let element" class="px-2" mat-cell> <td *matCellDef="let element" class="gf-table-column-fill px-2" mat-cell>
<div class="text-truncate">{{ prettifyAssetName(element?.name) }}</div> <div class="text-truncate">{{ prettifyAssetName(element?.name) }}</div>
</td> </td>
</ng-container> </ng-container>
@ -65,16 +59,10 @@
mat-table mat-table
[dataSource]="element.parents" [dataSource]="element.parents"
> >
<colgroup>
<col class="w-100" />
<col />
<col />
</colgroup>
<ng-container matColumnDef="name"> <ng-container matColumnDef="name">
<td <td
*matCellDef="let parentHolding" *matCellDef="let parentHolding"
class="line-height-normal px-2" class="gf-table-column-fill line-height-normal px-2"
mat-cell mat-cell
> >
<div class="text-truncate">{{ parentHolding?.name }}</div> <div class="text-truncate">{{ parentHolding?.name }}</div>

Loading…
Cancel
Save