From de709732960dd5125aab718301ebb6d033184dd6 Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Fri, 24 Jul 2026 09:39:43 +0200 Subject: [PATCH] enhance metadata display and integrate chip component --- .../compare-authors.component.html | 52 +++++++++++-------- .../compare-authors.component.scss | 51 ++++++++---------- .../compare-authors.component.ts | 7 +++ 3 files changed, 61 insertions(+), 49 deletions(-) diff --git a/webapp/src/app/modules/compare-authors/compare-authors.component.html b/webapp/src/app/modules/compare-authors/compare-authors.component.html index 6dad5c9d..de385536 100644 --- a/webapp/src/app/modules/compare-authors/compare-authors.component.html +++ b/webapp/src/app/modules/compare-authors/compare-authors.component.html @@ -4,31 +4,41 @@
@if (keywords().length > 0) { - - topic - {{ keywords().join(', ') }} - +
+ Betrachtete Topics: +
+ @for (keyword of keywords(); track keyword) { + + topic + {{ keyword }} + + } +
+ Verknüpfungsoperator: {{ operatorLabel() }} +
} @if (timespan(); as span) { - - date_range - {{ span.from }}–{{ span.to }} - +
+ Betrachteter Zeitraum: + + date_range + {{ span.from }}–{{ span.to }} + +
+ } + @if (hasData()) { +
+ Betrachtete Personen: +
+ @for (author of summary(); track author.authorId) { + {{ author.name }} + } +
+
}
- - @if (hasData()) { - - } @if (loading()) { diff --git a/webapp/src/app/modules/compare-authors/compare-authors.component.scss b/webapp/src/app/modules/compare-authors/compare-authors.component.scss index 6e1ac55d..a4deedf6 100644 --- a/webapp/src/app/modules/compare-authors/compare-authors.component.scss +++ b/webapp/src/app/modules/compare-authors/compare-authors.component.scss @@ -24,45 +24,40 @@ .compare-meta { display: flex; + flex-direction: column; + gap: 8px; +} + +.meta-row { + display: flex; + align-items: center; flex-wrap: wrap; gap: 8px; } -.meta-chip { - display: inline-flex; - align-items: center; - gap: 6px; - padding: 4px 12px; - border-radius: 999px; - background: var(--sg-surface-muted, #f7f9ff); - border: 1px solid var(--sg-border, #dde5f2); - color: var(--sg-text-muted, #64708f); +.meta-label { font-size: 13px; - - mat-icon { - font-size: 16px; - width: 16px; - height: 16px; - color: var(--sg-text-soft, #8a95b3); - } + font-weight: 600; + color: var(--sg-text-muted, #64708f); } -.author-legend { - list-style: none; - margin: 0; - padding: 0; +.meta-operator { + font-size: 13px; + font-weight: 600; + color: var(--sg-text-muted, #64708f); +} + +.meta-chip-group { display: flex; flex-wrap: wrap; - gap: 8px 18px; + gap: 8px; } -.legend-item { - display: inline-flex; - align-items: center; - gap: 8px; - font-size: 14px; - font-weight: 600; - color: var(--sg-text, #101a3d); +app-chip mat-icon { + font-size: 16px; + width: 16px; + height: 16px; + vertical-align: text-bottom; } .legend-swatch { diff --git a/webapp/src/app/modules/compare-authors/compare-authors.component.ts b/webapp/src/app/modules/compare-authors/compare-authors.component.ts index 24729c8b..8600afb4 100644 --- a/webapp/src/app/modules/compare-authors/compare-authors.component.ts +++ b/webapp/src/app/modules/compare-authors/compare-authors.component.ts @@ -16,6 +16,7 @@ import { TopicTreemapComponent, TreemapNode, } from '../../shared/ui/topic-treemap/topic-treemap.component'; +import { ChipComponent } from '../../shared/ui/chip/chip.component'; const AUTHOR_COLORS = ['#1565c0', '#e6550d', '#2ca02c', '#9467bd']; const SUBFIELD_COLORS = [ @@ -119,6 +120,7 @@ interface SegmentDef { MatIconModule, NgxEchartsDirective, TopicTreemapComponent, + ChipComponent, ], templateUrl: './compare-authors.component.html', styleUrl: './compare-authors.component.scss', @@ -128,6 +130,10 @@ export class CompareAuthorsComponent implements OnInit { private readonly rankingService = inject(RankingService); readonly keywords = signal([]); + readonly operator = signal<'and' | 'or'>('or'); + readonly operatorLabel = computed(() => + this.operator() === 'and' ? 'UND' : 'ODER', + ); readonly timespan = signal<{ from: number; to: number } | null>(null); // full OpenAlex ids in the requested order — the source of truth for colour + order readonly authorIds = signal([]); @@ -692,6 +698,7 @@ export class CompareAuthorsComponent implements OnInit { } const operator = rawOperator === 'and' ? 'and' : 'or'; + this.operator.set(operator); const publication_types = rawPubType ? this.parseList(rawPubType) : undefined;