Browse Source

Task/replace custom line height class with Bootstrap utility (#8194)

* Replaced custom line height class

* Replace line-height-normal with lh-normal
pull/8161/head
Siddheya Kulkarni 16 hours ago
committed by GitHub
parent
commit
4631281758
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      apps/client/src/app/components/admin-market-data/admin-market-data.html
  2. 2
      apps/client/src/app/components/admin-settings/admin-settings.component.html
  3. 2
      apps/client/src/app/components/footer/footer.component.html
  4. 2
      apps/client/src/app/components/markets/markets.html
  5. 2
      apps/client/src/app/pages/about/oss-friends/oss-friends-page.html
  6. 2
      apps/client/src/app/pages/blog/blog-page.html
  7. 2
      apps/client/src/app/pages/features/features-page.html
  8. 28
      apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
  9. 1
      apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html
  10. 6
      apps/client/src/app/pages/pricing/pricing-page.html
  11. 8
      apps/client/src/styles.scss
  12. 11
      apps/client/src/styles/bootstrap.scss
  13. 4
      libs/ui/src/lib/account-selector/account-selector.component.html
  14. 2
      libs/ui/src/lib/activities-table/activities-table.component.html
  15. 2
      libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.html
  16. 6
      libs/ui/src/lib/benchmark/benchmark.component.html
  17. 2
      libs/ui/src/lib/currency-selector/currency-selector.component.html
  18. 2
      libs/ui/src/lib/entity-logo/entity-logo.component.html
  19. 2
      libs/ui/src/lib/holdings-table/holdings-table.component.html
  20. 2
      libs/ui/src/lib/page-tabs/page-tabs.component.html
  21. 2
      libs/ui/src/lib/portfolio-filter-form/portfolio-filter-form.component.html
  22. 5
      libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.html
  23. 2
      libs/ui/src/lib/top-holdings/top-holdings.component.html

12
apps/client/src/app/components/admin-market-data/admin-market-data.html

@ -87,11 +87,7 @@
> >
<ng-container i18n>Name</ng-container> <ng-container i18n>Name</ng-container>
</th> </th>
<td <td *matCellDef="let element" class="lh-normal px-1" mat-cell>
*matCellDef="let element"
class="line-height-normal px-1"
mat-cell
>
<div class="text-truncate">{{ element.name }}</div> <div class="text-truncate">{{ element.name }}</div>
@if (!isUUID(element.symbol)) { @if (!isUUID(element.symbol)) {
<div> <div>
@ -110,7 +106,7 @@
</th> </th>
<td <td
*matCellDef="let element" *matCellDef="let element"
class="line-height-normal px-1 text-nowrap" class="lh-normal px-1 text-nowrap"
mat-cell mat-cell
> >
<div> <div>
@ -132,7 +128,7 @@
</th> </th>
<td <td
*matCellDef="let element" *matCellDef="let element"
class="line-height-normal px-1 text-nowrap" class="lh-normal px-1 text-nowrap"
mat-cell mat-cell
> >
<div>{{ translate(element.assetClass) }}</div> <div>{{ translate(element.assetClass) }}</div>
@ -152,7 +148,7 @@
</th> </th>
<td <td
*matCellDef="let element" *matCellDef="let element"
class="line-height-normal px-1 text-nowrap" class="lh-normal px-1 text-nowrap"
mat-cell mat-cell
> >
<div>{{ translate(element.assetSubClass) }}</div> <div>{{ translate(element.assetSubClass) }}</div>

2
apps/client/src/app/components/admin-settings/admin-settings.component.html

@ -90,7 +90,7 @@
} }
</a> </a>
@if (isGhostfolioApiKeyValid === true) { @if (isGhostfolioApiKeyValid === true) {
<div class="line-height-1"> <div class="lh-1">
<small class="text-body-secondary"> <small class="text-body-secondary">
<ng-container i18n>Valid until</ng-container> <ng-container i18n>Valid until</ng-container>
{{ {{

2
apps/client/src/app/components/footer/footer.component.html

@ -192,6 +192,6 @@
</div> </div>
<div class="container d-none d-md-block mt-5"> <div class="container d-none d-md-block mt-5">
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
<div class="fw-bold line-height-1 logotype">Ghostfolio</div> <div class="fw-bold lh-1 logotype">Ghostfolio</div>
</div> </div>
</div> </div>

2
apps/client/src/app/components/markets/markets.html

@ -58,7 +58,7 @@
/> />
@if (benchmarks()?.length) { @if (benchmarks()?.length) {
<div <div
class="gf-text-wrap-balance line-height-1 mt-3 text-body-secondary text-center" class="gf-text-wrap-balance lh-1 mt-3 text-body-secondary text-center"
> >
<small i18n> <small i18n>
Calculations are based on delayed market data and may not be Calculations are based on delayed market data and may not be

2
apps/client/src/app/pages/about/oss-friends/oss-friends-page.html

@ -1,7 +1,7 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<h1 class="h3 line-height-1 mb-4 text-center"> <h1 class="h3 lh-1 mb-4 text-center">
<span class="d-none d-sm-block" <span class="d-none d-sm-block"
><ng-container i18n>Our</ng-container> OSS Friends</span ><ng-container i18n>Our</ng-container> OSS Friends</span
> >

2
apps/client/src/app/pages/blog/blog-page.html

@ -1,7 +1,7 @@
<div class="container"> <div class="container">
<div class="mb-5 row"> <div class="mb-5 row">
<div class="col"> <div class="col">
<h1 class="h3 line-height-1 mb-4 text-center"> <h1 class="h3 lh-1 mb-4 text-center">
<span class="d-none d-sm-block" i18n>Blog</span> <span class="d-none d-sm-block" i18n>Blog</span>
<small class="text-body-secondary" i18n <small class="text-body-secondary" i18n
>Discover the latest Ghostfolio updates and insights on personal >Discover the latest Ghostfolio updates and insights on personal

2
apps/client/src/app/pages/features/features-page.html

@ -1,7 +1,7 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<h1 class="h3 line-height-1 mb-4 text-center"> <h1 class="h3 lh-1 mb-4 text-center">
<span class="d-none d-sm-block" i18n>Features</span> <span class="d-none d-sm-block" i18n>Features</span>
<small class="text-body-secondary" i18n> <small class="text-body-secondary" i18n>
Check out the numerous features of Ghostfolio to manage your wealth Check out the numerous features of Ghostfolio to manage your wealth

28
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html

@ -21,9 +21,7 @@
<span <span
><b>{{ typesTranslationMap['BUY'] }}</b></span ><b>{{ typesTranslationMap['BUY'] }}</b></span
> >
<small <small class="d-block lh-1 text-body-secondary text-nowrap" i18n
class="d-block line-height-1 text-body-secondary text-nowrap"
i18n
>Stocks, ETFs, bonds, cryptocurrencies, commodities</small >Stocks, ETFs, bonds, cryptocurrencies, commodities</small
> >
</mat-option> </mat-option>
@ -31,9 +29,7 @@
<span <span
><b>{{ typesTranslationMap['FEE'] }}</b></span ><b>{{ typesTranslationMap['FEE'] }}</b></span
> >
<small <small class="d-block lh-1 text-body-secondary text-nowrap" i18n
class="d-block line-height-1 text-body-secondary text-nowrap"
i18n
>One-time fee, annual account fees</small >One-time fee, annual account fees</small
> >
</mat-option> </mat-option>
@ -41,9 +37,7 @@
<span <span
><b>{{ typesTranslationMap['DIVIDEND'] }}</b></span ><b>{{ typesTranslationMap['DIVIDEND'] }}</b></span
> >
<small <small class="d-block lh-1 text-body-secondary text-nowrap" i18n
class="d-block line-height-1 text-body-secondary text-nowrap"
i18n
>Distribution of corporate earnings</small >Distribution of corporate earnings</small
> >
</mat-option> </mat-option>
@ -51,9 +45,7 @@
<span <span
><b>{{ typesTranslationMap['INTEREST'] }}</b></span ><b>{{ typesTranslationMap['INTEREST'] }}</b></span
> >
<small <small class="d-block lh-1 text-body-secondary text-nowrap" i18n
class="d-block line-height-1 text-body-secondary text-nowrap"
i18n
>Revenue for lending out money</small >Revenue for lending out money</small
> >
</mat-option> </mat-option>
@ -61,9 +53,7 @@
<span <span
><b>{{ typesTranslationMap['LIABILITY'] }}</b></span ><b>{{ typesTranslationMap['LIABILITY'] }}</b></span
> >
<small <small class="d-block lh-1 text-body-secondary text-nowrap" i18n
class="d-block line-height-1 text-body-secondary text-nowrap"
i18n
>Mortgages, personal loans, credit cards</small >Mortgages, personal loans, credit cards</small
> >
</mat-option> </mat-option>
@ -71,9 +61,7 @@
<span <span
><b>{{ typesTranslationMap['SELL'] }}</b></span ><b>{{ typesTranslationMap['SELL'] }}</b></span
> >
<small <small class="d-block lh-1 text-body-secondary text-nowrap" i18n
class="d-block line-height-1 text-body-secondary text-nowrap"
i18n
>Stocks, ETFs, bonds, cryptocurrencies, commodities</small >Stocks, ETFs, bonds, cryptocurrencies, commodities</small
> >
</mat-option> </mat-option>
@ -81,9 +69,7 @@
<span <span
><b>{{ typesTranslationMap['VALUABLE'] }}</b></span ><b>{{ typesTranslationMap['VALUABLE'] }}</b></span
> >
<small <small class="d-block lh-1 text-body-secondary text-nowrap" i18n
class="d-block line-height-1 text-body-secondary text-nowrap"
i18n
>Luxury items, real estate, private companies</small >Luxury items, real estate, private companies</small
> >
</mat-option> </mat-option>

1
apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html

@ -38,7 +38,6 @@
}}</mat-select-trigger> }}</mat-select-trigger>
@for (holding of holdings; track holding) { @for (holding of holdings; track holding) {
<mat-option <mat-option
class="line-height-1"
[value]="{ [value]="{
assetProfile: { assetProfile: {
dataSource: holding.assetProfile.dataSource, dataSource: holding.assetProfile.dataSource,

6
apps/client/src/app/pages/pricing/pricing-page.html

@ -236,7 +236,7 @@
<ion-icon name="information-circle-outline" /> <ion-icon name="information-circle-outline" />
</span> </span>
</li> </li>
<li class="align-items-center d-flex line-height-1 mb-1"> <li class="align-items-center d-flex lh-1 mb-1">
<ion-icon <ion-icon
class="invisible me-1" class="invisible me-1"
name="checkmark-circle-outline" name="checkmark-circle-outline"
@ -300,9 +300,7 @@
} }
@if (durationExtension) { @if (durationExtension) {
<div class="mt-3"> <div class="mt-3">
<div <div class="badge bg-warning fw-normal p-3 text-dark w-100">
class="badge bg-warning fw-normal line-height-1 p-3 text-dark w-100"
>
<strong i18n>Limited Offer!</strong> <strong i18n>Limited Offer!</strong>
<ng-container>&nbsp;</ng-container> <ng-container>&nbsp;</ng-container>
<ng-container i18n <ng-container i18n

8
apps/client/src/styles.scss

@ -372,14 +372,6 @@ ngx-skeleton-loader {
font-weight: unset; font-weight: unset;
} }
.line-height-1 {
line-height: 1;
}
.line-height-normal {
line-height: normal !important;
}
.mat-mdc-button-base { .mat-mdc-button-base {
.mdc-button__label { .mdc-button__label {
align-items: center; align-items: center;

11
apps/client/src/styles/bootstrap.scss

@ -67,7 +67,6 @@ $unused-utilities: (
'font-style', 'font-style',
'gap', 'gap',
'gradient', 'gradient',
'line-height',
'link-offset', 'link-offset',
'link-opacity', 'link-opacity',
'link-underline', 'link-underline',
@ -106,6 +105,16 @@ $unused-utilities: (
$utilities: map.remove($utilities, $unused-utilities...); $utilities: map.remove($utilities, $unused-utilities...);
$utilities: map.set(
$utilities,
'line-height',
'values',
(
1: 1,
normal: normal
)
);
// Layout & components // Layout & components
@import 'bootstrap/scss/root'; @import 'bootstrap/scss/root';
@import 'bootstrap/scss/reboot'; @import 'bootstrap/scss/reboot';

4
libs/ui/src/lib/account-selector/account-selector.component.html

@ -11,7 +11,7 @@
(closed)="onPanelClosed()" (closed)="onPanelClosed()"
> >
<mat-select-trigger> <mat-select-trigger>
<div class="align-items-center align-middle d-inline-flex line-height-1"> <div class="align-items-center align-middle d-inline-flex lh-1">
@if (selectedAccount()?.platform?.url) { @if (selectedAccount()?.platform?.url) {
<gf-entity-logo <gf-entity-logo
class="me-1" class="me-1"
@ -36,7 +36,7 @@
[tooltip]="account.platform?.name ?? ''" [tooltip]="account.platform?.name ?? ''"
[url]="account.platform?.url ?? ''" [url]="account.platform?.url ?? ''"
/> />
<div class="line-height-1"> <div class="lh-1">
<span>{{ account.name }}</span> <span>{{ account.name }}</span>
<br /> <br />
<small class="text-body-secondary"> <small class="text-body-secondary">

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

@ -184,7 +184,7 @@
<th *matHeaderCellDef class="px-1" mat-header-cell> <th *matHeaderCellDef class="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="lh-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)) {

2
libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.html

@ -1,6 +1,6 @@
<a <a
#link #link
class="d-block line-height-1 px-3 py-1 text-truncate" class="d-block lh-1 px-3 py-1 text-truncate"
[queryParams]="queryParams" [queryParams]="queryParams"
[routerLink]="routerLink" [routerLink]="routerLink"
(click)="onClick()" (click)="onClick()"

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

@ -22,11 +22,7 @@
<th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header> <th *matHeaderCellDef class="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" class="lh-normal px-1 text-nowrap" mat-cell>
*matCellDef="let element"
class="line-height-normal px-1 text-nowrap"
mat-cell
>
<div class="text-truncate"> <div class="text-truncate">
{{ element?.name }} {{ element?.name }}
</div> </div>

2
libs/ui/src/lib/currency-selector/currency-selector.component.html

@ -20,7 +20,7 @@
(optionSelected)="onUpdateCurrency($event)" (optionSelected)="onUpdateCurrency($event)"
> >
@for (currency of filteredCurrencies; track currency) { @for (currency of filteredCurrencies; track currency) {
<mat-option class="line-height-1" [value]="currency"> <mat-option [value]="currency">
<span class="align-items-center d-flex"> <span class="align-items-center d-flex">
<gf-entity-logo <gf-entity-logo
class="me-1" class="me-1"

2
libs/ui/src/lib/entity-logo/entity-logo.component.html

@ -8,7 +8,7 @@
> >
<span <span
aria-hidden="true" aria-hidden="true"
class="align-items-center d-flex emoji justify-content-center line-height-1 position-absolute" class="align-items-center d-flex emoji justify-content-center lh-1 position-absolute"
> >
{{ emojiFlag }} {{ emojiFlag }}
</span> </span>

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

@ -36,7 +36,7 @@
</th> </th>
<td <td
*matCellDef="let element" *matCellDef="let element"
class="line-height-normal px-1" class="lh-normal px-1"
mat-cell mat-cell
[class.w-100]="mode() === 'simple'" [class.w-100]="mode() === 'simple'"
> >

2
libs/ui/src/lib/page-tabs/page-tabs.component.html

@ -54,7 +54,7 @@
[size]="deviceType === 'mobile' ? 'large' : 'small'" [size]="deviceType === 'mobile' ? 'large' : 'small'"
/> />
<span <span
class="d-none d-sm-block line-height-normal ms-1 overflow-hidden p-0 text-truncate" class="d-none d-sm-block lh-normal ms-1 overflow-hidden p-0 text-truncate"
[innerHTML]="tab.label" [innerHTML]="tab.label"
></span> ></span>
</span> </span>

2
libs/ui/src/lib/portfolio-filter-form/portfolio-filter-form.component.html

@ -21,7 +21,7 @@
<mat-option [value]="null" /> <mat-option [value]="null" />
@for (holding of holdings(); track holding.assetProfile.name) { @for (holding of holdings(); track holding.assetProfile.name) {
<mat-option [value]="holding"> <mat-option [value]="holding">
<div class="line-height-1 text-truncate"> <div class="lh-1 text-truncate">
<span>{{ holding.assetProfile.name }}</span> <span>{{ holding.assetProfile.name }}</span>
<br /> <br />
<small class="text-body-secondary" <small class="text-body-secondary"

5
libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.html

@ -15,11 +15,10 @@
@if (!isLoading) { @if (!isLoading) {
@for (lookupItem of lookupItems; track lookupItem) { @for (lookupItem of lookupItems; track lookupItem) {
<mat-option <mat-option
class="line-height-1"
[disabled]="lookupItem.dataProviderInfo.isPremium" [disabled]="lookupItem.dataProviderInfo.isPremium"
[value]="lookupItem" [value]="lookupItem"
> >
<span class="align-items-center d-flex line-height-1" <span class="align-items-center d-flex lh-1"
><span>{{ lookupItem.name }}</span> ><span>{{ lookupItem.name }}</span>
@if (lookupItem.dataProviderInfo.isPremium) { @if (lookupItem.dataProviderInfo.isPremium) {
<gf-premium-indicator class="ms-1" [enableLink]="false" /> <gf-premium-indicator class="ms-1" [enableLink]="false" />
@ -40,7 +39,7 @@
</mat-option> </mat-option>
} @empty { } @empty {
@if (control.value?.length > 1) { @if (control.value?.length > 1) {
<mat-option class="line-height-1" disabled="true" i18n <mat-option disabled="true" i18n
>Oops! Could not find any assets.</mat-option >Oops! Could not find any assets.</mat-option
> >
} }

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

@ -74,7 +74,7 @@
<ng-container matColumnDef="name"> <ng-container matColumnDef="name">
<td <td
*matCellDef="let parentHolding" *matCellDef="let parentHolding"
class="line-height-normal px-2" class="lh-normal px-2"
mat-cell mat-cell
> >
<div class="text-truncate">{{ parentHolding?.name }}</div> <div class="text-truncate">{{ parentHolding?.name }}</div>

Loading…
Cancel
Save