Feature/improve empty state in benchmarks of markets overview (#3939)
* Improve empty state * Update changelog
This commit is contained in:
parent
d5fb32fb52
commit
7f30424792
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Improved the empty state in the benchmarks of the markets overview
|
||||||
- Disabled the text hover effect in the chart of the holdings tab on the home page (experimental)
|
- Disabled the text hover effect in the chart of the holdings tab on the home page (experimental)
|
||||||
- Improved the usability to customize the rule thresholds in the _X-ray_ section by introducing units (experimental)
|
- Improved the usability to customize the rule thresholds in the _X-ray_ section by introducing units (experimental)
|
||||||
- Switched to adjusted market prices (splits and dividends) in the get historical functionality of the _EOD Historical Data_ service
|
- Switched to adjusted market prices (splits and dividends) in the get historical functionality of the _EOD Historical Data_ service
|
||||||
|
@ -29,7 +29,6 @@ export class HomeMarketComponent implements OnDestroy, OnInit {
|
|||||||
public hasPermissionToAccessFearAndGreedIndex: boolean;
|
public hasPermissionToAccessFearAndGreedIndex: boolean;
|
||||||
public historicalDataItems: HistoricalDataItem[];
|
public historicalDataItems: HistoricalDataItem[];
|
||||||
public info: InfoItem;
|
public info: InfoItem;
|
||||||
public isLoading = true;
|
|
||||||
public readonly numberOfDays = 365;
|
public readonly numberOfDays = 365;
|
||||||
public user: User;
|
public user: User;
|
||||||
|
|
||||||
@ -43,7 +42,6 @@ export class HomeMarketComponent implements OnDestroy, OnInit {
|
|||||||
) {
|
) {
|
||||||
this.deviceType = this.deviceService.getDeviceInfo().deviceType;
|
this.deviceType = this.deviceService.getDeviceInfo().deviceType;
|
||||||
this.info = this.dataService.fetchInfo();
|
this.info = this.dataService.fetchInfo();
|
||||||
this.isLoading = true;
|
|
||||||
|
|
||||||
this.userService.stateChanged
|
this.userService.stateChanged
|
||||||
.pipe(takeUntil(this.unsubscribeSubject))
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
@ -89,7 +87,6 @@ export class HomeMarketComponent implements OnDestroy, OnInit {
|
|||||||
.pipe(takeUntil(this.unsubscribeSubject))
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
.subscribe(({ benchmarks }) => {
|
.subscribe(({ benchmarks }) => {
|
||||||
this.benchmarks = benchmarks;
|
this.benchmarks = benchmarks;
|
||||||
this.isLoading = false;
|
|
||||||
|
|
||||||
this.changeDetectorRef.markForCheck();
|
this.changeDetectorRef.markForCheck();
|
||||||
});
|
});
|
||||||
|
@ -36,16 +36,6 @@
|
|||||||
[locale]="user?.settings?.locale || undefined"
|
[locale]="user?.settings?.locale || undefined"
|
||||||
[user]="user"
|
[user]="user"
|
||||||
/>
|
/>
|
||||||
@if (isLoading) {
|
|
||||||
<ngx-skeleton-loader
|
|
||||||
animation="pulse"
|
|
||||||
class="px-2 py-3"
|
|
||||||
[theme]="{
|
|
||||||
height: '1.5rem',
|
|
||||||
width: '100%'
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,7 +4,6 @@ import { GfLineChartComponent } from '@ghostfolio/ui/line-chart';
|
|||||||
|
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||||
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
|
||||||
|
|
||||||
import { HomeMarketComponent } from './home-market.component';
|
import { HomeMarketComponent } from './home-market.component';
|
||||||
|
|
||||||
@ -15,8 +14,7 @@ import { HomeMarketComponent } from './home-market.component';
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
GfBenchmarkComponent,
|
GfBenchmarkComponent,
|
||||||
GfFearAndGreedIndexModule,
|
GfFearAndGreedIndexModule,
|
||||||
GfLineChartComponent,
|
GfLineChartComponent
|
||||||
NgxSkeletonLoaderModule
|
|
||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
})
|
})
|
||||||
|
@ -122,3 +122,18 @@
|
|||||||
"
|
"
|
||||||
></tr>
|
></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@if (isLoading) {
|
||||||
|
<ngx-skeleton-loader
|
||||||
|
animation="pulse"
|
||||||
|
class="px-4 py-3"
|
||||||
|
[theme]="{
|
||||||
|
height: '1.5rem',
|
||||||
|
width: '100%'
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
} @else if (benchmarks?.length === 0) {
|
||||||
|
<div class="p-3 text-center text-muted">
|
||||||
|
<small i18n>No data available</small>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
@ -49,6 +49,7 @@ export class GfBenchmarkComponent implements OnChanges, OnDestroy {
|
|||||||
@Input() user: User;
|
@Input() user: User;
|
||||||
|
|
||||||
public displayedColumns = ['name', 'date', 'change', 'marketCondition'];
|
public displayedColumns = ['name', 'date', 'change', 'marketCondition'];
|
||||||
|
public isLoading = true;
|
||||||
public resolveMarketCondition = resolveMarketCondition;
|
public resolveMarketCondition = resolveMarketCondition;
|
||||||
public translate = translate;
|
public translate = translate;
|
||||||
|
|
||||||
@ -76,6 +77,10 @@ export class GfBenchmarkComponent implements OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ngOnChanges() {
|
public ngOnChanges() {
|
||||||
|
if (this.benchmarks) {
|
||||||
|
this.isLoading = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.user?.settings?.isExperimentalFeatures) {
|
if (this.user?.settings?.isExperimentalFeatures) {
|
||||||
this.displayedColumns = [
|
this.displayedColumns = [
|
||||||
'name',
|
'name',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user