diff --git a/webapp/src/app/modules/person-interesting/person-interesting.component.html b/webapp/src/app/modules/person-interesting/person-interesting.component.html
index bc015605..18999c00 100644
--- a/webapp/src/app/modules/person-interesting/person-interesting.component.html
+++ b/webapp/src/app/modules/person-interesting/person-interesting.component.html
@@ -11,10 +11,15 @@
@@ -29,6 +34,7 @@
[domainName]="tag.domainName"
[color]="tag.color"
[disabled]="!tag.id"
+ [active]="isTagActive(tag)"
countIcon="article"
descriptionTooltipTarget="button"
(chipClick)="onTagClick(tag)">
diff --git a/webapp/src/app/modules/person-interesting/person-interesting.component.ts b/webapp/src/app/modules/person-interesting/person-interesting.component.ts
index b4b67654..ced9f9d0 100644
--- a/webapp/src/app/modules/person-interesting/person-interesting.component.ts
+++ b/webapp/src/app/modules/person-interesting/person-interesting.component.ts
@@ -17,7 +17,14 @@ import { TopicCount } from '../../api';
import { TopicChipComponent } from '../../shared/ui/topic-chip/topic-chip.component';
import { TopicLegendComponent } from '../../shared/ui/topic-legend/topic-legend.component';
import { topicHierarchyColor } from '../../shared/utils/topic-colors';
-import { buildTopicLegendGroups } from '../../shared/utils/topic-legend';
+import {
+ buildTopicLegendGroups,
+ getTopicLegendFieldId,
+ getTopicLegendSubfieldId,
+ TopicLegendGroup,
+ TopicLegendSubfieldSelection,
+ toggleTopicLegendSelection,
+} from '../../shared/utils/topic-legend';
interface InterestTag {
id: string;
@@ -59,6 +66,8 @@ export class PersonInterestingComponent implements OnInit {
readonly topics = input(null);
readonly legendExpanded = signal(false);
+ readonly activeLegendFieldIds = signal>(new Set());
+ readonly activeLegendSubfieldIds = signal>(new Set());
readonly tagClick = output<{ id: string; name: string }>();
@@ -144,6 +153,38 @@ export class PersonInterestingComponent implements OnInit {
});
}
+ onLegendFieldToggle(group: TopicLegendGroup): void {
+ this.activeLegendFieldIds.set(
+ toggleTopicLegendSelection(this.activeLegendFieldIds(), group.id),
+ );
+ }
+
+ onLegendSubfieldToggle(selection: TopicLegendSubfieldSelection): void {
+ this.activeLegendSubfieldIds.set(
+ toggleTopicLegendSelection(
+ this.activeLegendSubfieldIds(),
+ selection.item.id,
+ ),
+ );
+ }
+
+ isTagActive(tag: InterestTag): boolean {
+ const fieldLegendId = getTopicLegendFieldId({
+ field_id: tag.fieldId,
+ field_name: tag.fieldName,
+ });
+ const subfieldLegendId = getTopicLegendSubfieldId({
+ subfield_id: tag.subfieldId,
+ subfield_name: tag.subfieldName,
+ });
+
+ return (
+ this.activeLegendFieldIds().has(fieldLegendId) ||
+ (subfieldLegendId.length > 0 &&
+ this.activeLegendSubfieldIds().has(subfieldLegendId))
+ );
+ }
+
private parseBooleanQueryParam(
value: string | null,
fallback: boolean,
diff --git a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html
index fb4d9f42..55f0d938 100644
--- a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html
+++ b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html
@@ -12,6 +12,11 @@
[visible]="subfieldLegendVisible"
[expanded]="subfieldLegendExpanded"
[collapsedGroupLimit]="3"
+ [selectable]="true"
+ [activeFieldIds]="activeLegendFieldIds"
+ [activeSubfieldIds]="activeLegendSubfieldIds"
+ (fieldToggle)="onLegendFieldToggle($event)"
+ (subfieldToggle)="onLegendSubfieldToggle($event)"
(visibleChange)="onSubfieldLegendVisibleChange($event)"
(expandedChange)="onSubfieldLegendExpandedChange($event)">
@@ -254,6 +259,7 @@
[countTooltip]="getYearTopicCountTooltip(topic, item)"
[color]="getTopicColor(topic)"
[disabled]="!topic.id"
+ [active]="isTopicActiveByLegend(topic)"
(chipClick)="selectTopic(topic, [item.year])">
@@ -354,6 +360,7 @@
[countTooltip]="getPhaseTopicCountTooltip(topic, phase)"
[color]="getTopicColor(topic)"
[disabled]="!topic.id"
+ [active]="isTopicActiveByLegend(topic)"
(chipClick)="selectTopic(topic, getPhaseYears(phase))">
@@ -431,6 +438,7 @@
[countTooltip]="getYearTopicCountTooltip(topic, year)"
[color]="getTopicColor(topic)"
[disabled]="!topic.id"
+ [active]="isTopicActiveByLegend(topic)"
(chipClick)="selectTopic(topic, [year.year])">
diff --git a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.ts b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.ts
index 9d88ff2d..09392acc 100644
--- a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.ts
+++ b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.ts
@@ -17,7 +17,11 @@ import { TopicLegendComponent } from '../../../../shared/ui/topic-legend/topic-l
import { topicHierarchyColor } from '../../../../shared/utils/topic-colors';
import {
buildTopicLegendGroups,
+ getTopicLegendFieldId,
+ getTopicLegendSubfieldId,
TopicLegendGroup,
+ TopicLegendSubfieldSelection,
+ toggleTopicLegendSelection,
} from '../../../../shared/utils/topic-legend';
import { buildTopicHierarchyTooltip } from '../../../../shared/utils/topic-tooltip';
@@ -130,6 +134,8 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
private readonly displayedPhaseTopicLimit = 4;
private readonly scrollRestoreThreshold = 24;
private readonly expandedPhaseIds = new Set();
+ activeLegendFieldIds: ReadonlySet = new Set();
+ activeLegendSubfieldIds: ReadonlySet = new Set();
private pendingTimelineScrollAnchor: TimelineScrollAnchor | undefined;
@@ -423,6 +429,31 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
this.subfieldLegendVisibleChange.emit(this.subfieldLegendVisible);
}
+ onLegendFieldToggle(group: TopicLegendGroup): void {
+ this.activeLegendFieldIds = toggleTopicLegendSelection(
+ this.activeLegendFieldIds,
+ group.id,
+ );
+ }
+
+ onLegendSubfieldToggle(selection: TopicLegendSubfieldSelection): void {
+ this.activeLegendSubfieldIds = toggleTopicLegendSelection(
+ this.activeLegendSubfieldIds,
+ selection.item.id,
+ );
+ }
+
+ isTopicActiveByLegend(topic: TopicTimelineTopic): boolean {
+ const fieldLegendId = getTopicLegendFieldId(topic);
+ const subfieldLegendId = getTopicLegendSubfieldId(topic);
+
+ return (
+ this.activeLegendFieldIds.has(fieldLegendId) ||
+ (subfieldLegendId.length > 0 &&
+ this.activeLegendSubfieldIds.has(subfieldLegendId))
+ );
+ }
+
trackByYear(_: number, item: TopicTimelineElement): number {
return item.year;
}
@@ -558,7 +589,6 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
return `im Zeitraum ${this.getPhaseYearLabel(phase)}`;
}
-
private get earlierYearsColumnCount(): number {
return this.showEarlierYearsControl ? 1 : 0;
}
diff --git a/webapp/src/app/shared/ui/topic-chip/topic-chip.component.scss b/webapp/src/app/shared/ui/topic-chip/topic-chip.component.scss
index fb757f9d..7a9dffe9 100644
--- a/webapp/src/app/shared/ui/topic-chip/topic-chip.component.scss
+++ b/webapp/src/app/shared/ui/topic-chip/topic-chip.component.scss
@@ -61,13 +61,38 @@
:host(.topic-chip--active.topic-chip--normal) .topic-chip__button {
border-color: var(--topic-color);
- box-shadow: 0 0 0 2px color-mix(in srgb, var(--topic-color) 26%, transparent);
+ background: color-mix(in srgb, var(--topic-color) 27%, #ffffff);
+ color: color-mix(in srgb, var(--topic-color) 40%, #07163d);
+ box-shadow:
+ inset 0 0 0 1px var(--topic-color),
+ 0 0 0 2px #ffffff,
+ 0 0 0 4px color-mix(in srgb, var(--topic-color) 48%, transparent),
+ 0 5px 12px rgba(15, 23, 42, 0.16);
+
+ &:hover:not(:disabled) {
+ box-shadow:
+ inset 0 0 0 1px var(--topic-color),
+ 0 0 0 2px #ffffff,
+ 0 0 0 4px color-mix(in srgb, var(--topic-color) 56%, transparent),
+ 0 7px 14px rgba(15, 23, 42, 0.18);
+ }
}
:host(.topic-chip--active.topic-chip--mini) .topic-chip__button {
- background: color-mix(in srgb, var(--topic-color) 24%, #ffffff);
- color: var(--topic-text);
- box-shadow: 0 0 0 1.5px var(--topic-color);
+ background: color-mix(in srgb, var(--topic-color) 32%, #ffffff);
+ color: color-mix(in srgb, var(--topic-color) 42%, #07163d);
+ box-shadow:
+ 0 0 0 1px #ffffff,
+ 0 0 0 3px color-mix(in srgb, var(--topic-color) 72%, transparent);
+ font-weight: 800;
+}
+
+:host(.topic-chip--active.topic-chip--normal) .topic-chip__count {
+ background: #ffffff;
+ color: color-mix(in srgb, var(--topic-color) 46%, #07163d);
+ box-shadow:
+ inset 0 0 0 1px color-mix(in srgb, var(--topic-color) 72%, transparent),
+ 0 1px 4px rgba(15, 23, 42, 0.18);
}
.topic-chip__label {
diff --git a/webapp/src/app/shared/ui/topic-legend/topic-legend.component.html b/webapp/src/app/shared/ui/topic-legend/topic-legend.component.html
index 34c724d1..115a8e3a 100644
--- a/webapp/src/app/shared/ui/topic-legend/topic-legend.component.html
+++ b/webapp/src/app/shared/ui/topic-legend/topic-legend.component.html
@@ -3,6 +3,7 @@
class="topic-legend"
[class.topic-legend-compact]="variant === 'compact'"
[class.topic-legend-expanded]="expanded"
+ [class.topic-legend-selectable]="selectable"
aria-label="Aktuell sichtbare Themenbereiche">