Improve timeline legend width

This commit is contained in:
2026-06-29 21:25:01 +02:00
parent 873e4bbbec
commit b69fe4e15c
2 changed files with 51 additions and 16 deletions
@@ -7,20 +7,6 @@
<span>(basierend auf Publikationen)</span>
</p>
<app-topic-legend
[groups]="topicLegendGroups"
[visible]="subfieldLegendVisible"
[expanded]="subfieldLegendExpanded"
[collapsedGroupLimit]="3"
[selectable]="true"
[activeFieldIds]="activeLegendFieldIds"
[activeSubfieldIds]="activeLegendSubfieldIds"
(fieldToggle)="onLegendFieldToggle($event)"
(subfieldToggle)="onLegendSubfieldToggle($event)"
(visibleChange)="onSubfieldLegendVisibleChange($event)"
(expandedChange)="onSubfieldLegendExpandedChange($event)">
</app-topic-legend>
<span
*ngIf="
earlierYearsLoadFailed &&
@@ -32,6 +18,21 @@
</span>
</div>
<app-topic-legend
class="timeline-legend"
[groups]="topicLegendGroups"
[visible]="subfieldLegendVisible"
[expanded]="subfieldLegendExpanded"
[collapsedGroupLimit]="3"
[selectable]="true"
[activeFieldIds]="activeLegendFieldIds"
[activeSubfieldIds]="activeLegendSubfieldIds"
(fieldToggle)="onLegendFieldToggle($event)"
(subfieldToggle)="onLegendSubfieldToggle($event)"
(visibleChange)="onSubfieldLegendVisibleChange($event)"
(expandedChange)="onSubfieldLegendExpandedChange($event)">
</app-topic-legend>
<div class="view-toggle" aria-label="Ansicht wechseln">
<button
type="button"
@@ -34,14 +34,18 @@
}
.timeline-header {
--year-filter-width: 285px;
--header-gap: 24px;
display: grid;
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
align-items: flex-start;
gap: 24px;
gap: 16px var(--header-gap);
margin-bottom: 28px;
}
.timeline-title {
grid-column: 1;
grid-row: 1;
min-width: 0;
h2 {
@@ -64,7 +68,23 @@
}
}
.timeline-legend {
grid-column: 1 / -1;
grid-row: 2;
min-width: 0;
// Spannt fast die volle Breite, endet aber kurz vor dem Zeitraum-Kasten
margin-right: calc(var(--year-filter-width) + var(--header-gap));
// Standard-Cap (760px) aufheben, damit die Fachgebiete die volle
// verfügbare Breite nutzen und weniger Zeilen umbrechen
::ng-deep .topic-legend {
width: 100%;
}
}
.view-toggle {
grid-column: 2;
grid-row: 1;
justify-self: center;
display: flex;
gap: 4px;
@@ -94,8 +114,10 @@
}
.year-filter {
grid-column: 3;
grid-row: 1 / span 2;
justify-self: end;
width: min(285px, 100%);
width: min(var(--year-filter-width), 100%);
padding: 8px 10px;
border: 1px solid #dbe5f6;
border-radius: 10px;
@@ -586,6 +608,18 @@ app-topic-chip.timeline-topic-chip {
grid-template-columns: 1fr;
}
.timeline-title,
.timeline-legend,
.view-toggle,
.year-filter {
grid-column: auto;
grid-row: auto;
}
.timeline-legend {
margin-right: 0;
}
.view-toggle {
justify-self: start;
}