From a47f50bd062efb82b3dfe4da1855aabd634bec4d Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Thu, 16 Jul 2026 20:39:26 +0200 Subject: [PATCH] update weight slider UI --- .../persons-results.component.html | 2 +- .../weights-sliders.component.html | 36 +++++++++--------- .../weights-sliders.component.scss | 38 ++++++++++--------- 3 files changed, 41 insertions(+), 35 deletions(-) diff --git a/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.html b/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.html index 123b67ab..2f599994 100644 --- a/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.html +++ b/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.html @@ -52,7 +52,7 @@ [options]="weightOptions" [initialWeights]="defaultWeights" title="Personen-Gewichtung" - description="Werte zwischen 0 und 1. Summe wird normalisiert zu 1." + description="Bestimme die Relevanz der einzelnen Faktoren." resetLabel="Ausgewogen" applyLabel="Neu gewichten" normalizedTitle="Normalisiert" diff --git a/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.html b/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.html index 519dac93..5d3a69bc 100644 --- a/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.html +++ b/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.html @@ -27,23 +27,25 @@ {{ option.label }} - - - - -
- {{ formatRawWeightLabel(weightControl(option.key).value) }} +
+
+ unwichtig + neutral + wichtig +
+ + +
} diff --git a/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.scss b/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.scss index 592c7b7b..36f38516 100644 --- a/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.scss +++ b/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.scss @@ -55,11 +55,12 @@ $touch-target: 44px; .weight-row { display: grid; - grid-template-columns: 1fr 1fr 40px; + grid-template-columns: 1fr 2fr; align-items: center; - gap: 0.2rem; + gap: 0.5rem; min-height: 34px; font-size: 0.8rem; + margin-bottom: 0.4rem; } .weight-label { @@ -86,18 +87,25 @@ $touch-target: 44px; } } +.slider-container { + display: flex; + flex-direction: column; + width: 100%; +} + .weight-slider { width: 100%; - height: 20px; /* reduced from 24px */ + height: 20px; margin: 0; } -.weight-value { - font-size: 0.75rem; - font-weight: 650; +.slider-labels { + display: flex; + justify-content: space-between; + font-size: 0.65rem; color: var(--sg-text-secondary); - text-align: right; - font-variant-numeric: tabular-nums; + margin-bottom: -4px; + padding: 0 6px; } /* ============================================================ @@ -155,7 +163,7 @@ $touch-target: 44px; ============================================================ */ @media (max-width: $tablet) { .weight-row { - grid-template-columns: 1fr 40px; + grid-template-columns: 1fr; gap: 0.15rem; padding: 0.1rem 0; } @@ -165,12 +173,8 @@ $touch-target: 44px; font-size: 0.75rem; } - .weight-slider { - grid-column: 1 / 2; - } - - .weight-value { - grid-column: 2 / 3; + .slider-container { + grid-column: 1 / -1; } .weight-actions { @@ -204,8 +208,8 @@ $touch-target: 44px; height: 18px; } - .weight-value { - font-size: 0.7rem; + .slider-labels { + font-size: 0.6rem; } .weight-actions {