diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba9bd99..b3fc381d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## v2.4.1 (March 10, 2023) + +### Fixed + +- Fixed representative pie chart legend not being circles. +- Fixed monitored and large rep table sortation. + ## v2.4.0 (March 7, 2023) ### Added diff --git a/package.json b/package.json index 279e6dd1..94bfab27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yellow-spyglass-client", - "version": "2.4.0", + "version": "2.4.1", "scripts": { "ng": "ng", "start": "ng serve -c development --open --host 0.0.0.0", diff --git a/src/app/pages/representatives/display/large-rep-table/large-rep-table.component.ts b/src/app/pages/representatives/display/large-rep-table/large-rep-table.component.ts index a199b7bf..1bae72aa 100644 --- a/src/app/pages/representatives/display/large-rep-table/large-rep-table.component.ts +++ b/src/app/pages/representatives/display/large-rep-table/large-rep-table.component.ts @@ -28,7 +28,7 @@ import { APP_NAV_ITEMS } from '../../../../navigation/nav-items'; - Representative + Representative
@@ -105,7 +105,7 @@ import { APP_NAV_ITEMS } from '../../../../navigation/nav-items'; {{ numberWithCommas(element.fundedDelegatorsCount) }} - +
Uptime @@ -147,7 +147,7 @@ export class LargeRepTableComponent implements OnChanges { 'weight', 'percentWeight', 'fundedDelegatorsCount', - 'uptimeStats.uptimePercentages.month', + 'uptime', ]; largeRepsDisplayColumnsMd = ['position', 'address', 'online', 'score', 'weight', 'percentWeight']; @@ -169,6 +169,16 @@ export class LargeRepTableComponent implements OnChanges { this.largeRepsDataSource = new MatTableDataSource(this.shownReps); this._ref.detectChanges(); this.largeRepsDataSource.sort = this.sortAll; + this.largeRepsDataSource.sortingDataAccessor = (item, property) => { + switch (property) { + case 'uptime': { + return item.uptimePercentages?.month; + } + default: { + return item[property]; + } + } + }; } formatBanWeight(weight: number): string { diff --git a/src/app/pages/representatives/display/monitored-rep-table/monitored-rep-table.component.ts b/src/app/pages/representatives/display/monitored-rep-table/monitored-rep-table.component.ts index c4e00578..cd632a88 100644 --- a/src/app/pages/representatives/display/monitored-rep-table/monitored-rep-table.component.ts +++ b/src/app/pages/representatives/display/monitored-rep-table/monitored-rep-table.component.ts @@ -71,7 +71,7 @@ import { APP_NAV_ITEMS } from '../../../../navigation/nav-items'; - % + Weight {{ formatWeightPercent(element.weight) }}% @@ -193,17 +193,23 @@ export class MonitoredRepTableComponent implements OnChanges { this.monitoredRepsDataSource.sort = this.sortMonitored; this.monitoredRepsDataSource.sortingDataAccessor = (item, property) => { switch (property) { + case 'name': { + return item.name?.toLowerCase(); + } case 'isPrincipal': { - return item['weight']; + return item.weight; } case 'weightBan': { - return item['weight']; + return item.weight; } case 'weightPercent': { - return item['weight']; + return item.weight; + } + case 'location': { + return item.location?.toLowerCase(); } case 'uptime': { - return this.monitoredRepMap.get(item['address'])?.uptimePercentages.semiAnnual; + return item.uptimePercentages?.month; } default: { return item[property]; diff --git a/src/app/pages/representatives/display/weight-chart/weight-chart.component.scss b/src/app/pages/representatives/display/weight-chart/weight-chart.component.scss index c2d91c4d..87baca8d 100644 --- a/src/app/pages/representatives/display/weight-chart/weight-chart.component.scss +++ b/src/app/pages/representatives/display/weight-chart/weight-chart.component.scss @@ -35,8 +35,11 @@ align-items: center; } .representatives-legend-color { - width: 12px; - height: 12px; + $size: 12px; + min-width: $size; + width: $size; + height: $size; + min-height: $size; border-radius: 100%; margin-right: 16px; }