feat(dashboard): improve filters, tooltips and treemap state
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
- add detailed tooltips to dashboard statistic cards - show author details on hover in top-10 person analyses - align patent icon with the sidebar - resize and right-align the dashboard period slider - persist DFG, EU and Bund treemap selections in URL parameters
This commit is contained in:
@@ -40,7 +40,9 @@
|
||||
[attr.aria-disabled]="!institutionRouteId()"
|
||||
[attr.aria-label]="
|
||||
'Publikationen von ' + organizationName() + ' anzeigen'
|
||||
">
|
||||
"
|
||||
matTooltip="Anzahl der Publikationen im ausgewählten Zeitraum"
|
||||
matTooltipPosition="above">
|
||||
<div class="statistics-icon statistics-icon--publications">
|
||||
<mat-icon>menu_book</mat-icon>
|
||||
</div>
|
||||
@@ -60,7 +62,9 @@
|
||||
class="statistics-card"
|
||||
routerLink="/persons"
|
||||
[queryParams]="personListQueryParams()"
|
||||
[attr.aria-label]="'Personen von ' + organizationName() + ' anzeigen'">
|
||||
[attr.aria-label]="'Personen von ' + organizationName() + ' anzeigen'"
|
||||
matTooltip="Anzahl der Personen im ausgewählten Zeitraum"
|
||||
matTooltipPosition="above">
|
||||
<div class="statistics-icon statistics-icon--persons">
|
||||
<mat-icon>groups</mat-icon>
|
||||
</div>
|
||||
@@ -81,9 +85,11 @@
|
||||
[routerLink]="['/institution', institutionRouteId(), 'patents']"
|
||||
[class.disabled]="!institutionRouteId()"
|
||||
[attr.aria-disabled]="!institutionRouteId()"
|
||||
[attr.aria-label]="'Patente von ' + organizationName() + ' anzeigen'">
|
||||
[attr.aria-label]="'Patente von ' + organizationName() + ' anzeigen'"
|
||||
matTooltip="Anzahl der Patente im ausgewählten Zeitraum"
|
||||
matTooltipPosition="above">
|
||||
<div class="statistics-icon statistics-icon--patents">
|
||||
<mat-icon>description</mat-icon>
|
||||
<mat-icon>{{ patentIcon }}</mat-icon>
|
||||
</div>
|
||||
<div>
|
||||
<span>Patente</span>
|
||||
@@ -101,7 +107,9 @@
|
||||
class="statistics-card"
|
||||
routerLink="/projects"
|
||||
[queryParams]="{ selected_project_types: 'eu' }"
|
||||
aria-label="EU-Projekte anzeigen">
|
||||
aria-label="EU-Projekte anzeigen"
|
||||
matTooltip="Anzahl der laufenden, abgeschlossenen und kommenden EU-Projekte im ausgewählten Zeitraum"
|
||||
matTooltipPosition="above">
|
||||
<div class="statistics-icon statistics-icon--eu-projects">
|
||||
<mat-icon>public</mat-icon>
|
||||
</div>
|
||||
@@ -121,7 +129,9 @@
|
||||
class="statistics-card"
|
||||
routerLink="/projects"
|
||||
[queryParams]="{ selected_project_types: 'bund' }"
|
||||
aria-label="Bund-Projekte anzeigen">
|
||||
aria-label="Bund-Projekte anzeigen"
|
||||
matTooltip="Anzahl der laufenden, abgeschlossenen und kommenden Bund-Projekte im ausgewählten Zeitraum"
|
||||
matTooltipPosition="above">
|
||||
<div class="statistics-icon statistics-icon--bund-projects">
|
||||
<mat-icon>account_balance</mat-icon>
|
||||
</div>
|
||||
@@ -141,7 +151,9 @@
|
||||
class="statistics-card"
|
||||
routerLink="/projects"
|
||||
[queryParams]="{ selected_project_types: 'dfg' }"
|
||||
aria-label="DFG-Projekte anzeigen">
|
||||
aria-label="DFG-Projekte anzeigen"
|
||||
matTooltip="Anzahl der laufenden, abgeschlossenen und kommenden DFG-Projekte im ausgewählten Zeitraum"
|
||||
matTooltipPosition="above">
|
||||
<div class="statistics-icon statistics-icon--dfg-projects">
|
||||
<mat-icon>science</mat-icon>
|
||||
</div>
|
||||
@@ -441,6 +453,8 @@
|
||||
class="author-name author-link"
|
||||
[routerLink]="authorLink(dataset, entry)"
|
||||
[queryParams]="authorQueryParams(dataset, entry)"
|
||||
[appComponentTooltip]="AuthorTooltipComponent"
|
||||
[tooltipInputs]="{ authorId: entry.id }"
|
||||
[title]="authorDisplayName(dataset, entry)">
|
||||
{{ authorDisplayName(dataset, entry) }}
|
||||
</a>
|
||||
|
||||
@@ -39,7 +39,16 @@
|
||||
}
|
||||
|
||||
.dashboard-period-slider {
|
||||
width: min(100%, 34rem);
|
||||
width: 280px;
|
||||
max-width: 100%;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.dashboard-period-slider {
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.statistics-grid {
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { DecimalPipe } from '@angular/common';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { Observable, finalize } from 'rxjs';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ComponentTooltipDirective } from '../../directives/component-tooltip.directive';
|
||||
import { AppAuthorTooltipComponent } from '../../shared/ui/app-author-tooltip/app-author-tooltip.component';
|
||||
import { PATENT_ICON } from '../../shared/ui/icons';
|
||||
import { EuProjectStatusChartComponent } from './eu-project-status-chart/eu-project-status-chart.component';
|
||||
import { YearRangeSliderComponent } from '../../shared/ui/year-range-slider/year-range-slider.component';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
@@ -58,6 +62,8 @@ type DashboardPeriodMode =
|
||||
imports: [
|
||||
DecimalPipe,
|
||||
MatIconModule,
|
||||
MatTooltipModule,
|
||||
ComponentTooltipDirective,
|
||||
RouterLink,
|
||||
LoadingComponent,
|
||||
EuProjectStatusChartComponent,
|
||||
@@ -68,6 +74,8 @@ type DashboardPeriodMode =
|
||||
styleUrl: './dashboard.component.scss',
|
||||
})
|
||||
export class DashboardComponent implements OnInit {
|
||||
readonly AuthorTooltipComponent = AppAuthorTooltipComponent;
|
||||
readonly patentIcon = PATENT_ICON;
|
||||
statistics?: Partial<DashboardStatistics>;
|
||||
statisticsLoading = false;
|
||||
statisticsError = false;
|
||||
@@ -370,6 +378,7 @@ export class DashboardComponent implements OnInit {
|
||||
|
||||
onDfgTopicTreemapNodeChange(nodeId: string | undefined): void {
|
||||
this.selectedDfgTopicTreemapNode = nodeId;
|
||||
this.updateDashboardPeriodUrl();
|
||||
}
|
||||
|
||||
onDfgTopicTreemapTopicSelect(topic: TopicTreemapTopicSelect): void {
|
||||
@@ -398,6 +407,7 @@ export class DashboardComponent implements OnInit {
|
||||
|
||||
onEuTopicTreemapNodeChange(nodeId: string | undefined): void {
|
||||
this.selectedEuTopicTreemapNode = nodeId;
|
||||
this.updateDashboardPeriodUrl();
|
||||
}
|
||||
|
||||
onEuTopicTreemapTopicSelect(topic: TopicTreemapTopicSelect): void {
|
||||
@@ -426,6 +436,7 @@ export class DashboardComponent implements OnInit {
|
||||
|
||||
onBundTopicTreemapNodeChange(nodeId: string | undefined): void {
|
||||
this.selectedBundTopicTreemapNode = nodeId;
|
||||
this.updateDashboardPeriodUrl();
|
||||
}
|
||||
|
||||
onBundTopicTreemapTopicSelect(topic: TopicTreemapTopicSelect): void {
|
||||
@@ -494,6 +505,12 @@ export class DashboardComponent implements OnInit {
|
||||
this.dashboardFromYear = this.dashboardToYear;
|
||||
}
|
||||
this.selectedTopicTreemapNode = params.get('treemapNode') ?? undefined;
|
||||
this.selectedDfgTopicTreemapNode =
|
||||
params.get('dfgTreemapNode') ?? undefined;
|
||||
this.selectedEuTopicTreemapNode =
|
||||
params.get('euTreemapNode') ?? undefined;
|
||||
this.selectedBundTopicTreemapNode =
|
||||
params.get('bundTreemapNode') ?? undefined;
|
||||
}
|
||||
|
||||
private applyPresetPeriod(): void {
|
||||
@@ -519,6 +536,9 @@ export class DashboardComponent implements OnInit {
|
||||
fromYear: period.fromYear ?? null,
|
||||
toYear: period.toYear ?? null,
|
||||
treemapNode: this.selectedTopicTreemapNode ?? null,
|
||||
dfgTreemapNode: this.selectedDfgTopicTreemapNode ?? null,
|
||||
euTreemapNode: this.selectedEuTopicTreemapNode ?? null,
|
||||
bundTreemapNode: this.selectedBundTopicTreemapNode ?? null,
|
||||
},
|
||||
queryParamsHandling: 'merge',
|
||||
replaceUrl: true,
|
||||
|
||||
Reference in New Issue
Block a user