From 5848621c77dae6a9bbfbab1da33cbdb61e72e7df Mon Sep 17 00:00:00 2001 From: grabowski Date: Tue, 11 Aug 2026 16:39:53 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20UI/UX=20review=20round=201=20=E2=80=94?= =?UTF-8?q?=20mobile=20reachability,=20legend=20toggle,=20replay=20correct?= =?UTF-8?q?ness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From the multi-lens review (27 confirmed findings; this lands the quick high-impact set): - mobile: side-card cap 400px->70vh so the basin-stations expander is reachable; live-pill kept as a dot (title carries the label); replay button no longer wraps; legend returns behind a Legend toggle button (was display:none, which also removed the only rain toggle) - replay: auto-refresh skips while replaying (was clobbering state); Chiang Mai flow tile shows P.1 replay discharge instead of a basin-wide sum mislabelled as P.1 - history: placeholder text in the empty chart, dropdown flips to 'Custom range' when dates are hand-edited, controls hint when no station is selected - a11y/copy: aria-expanded/aria-controls on all three disclosure controls, sensor rows say 'of bank height' vs tile 'channel capacity', P.1 tile note deduped --- src/static/dashboard.html | 56 +++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/src/static/dashboard.html b/src/static/dashboard.html index 95e4110..2737e10 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -177,21 +177,33 @@ .popup-metric span { display: block; color: var(--muted); font-size: .62rem; } .popup-metric strong { display: block; margin-top: 2px; font-size: .86rem; } .popup-time { margin-top: 9px; color: var(--muted); font-size: .64rem; } + #legend-toggle { + display: none; pointer-events: auto; background: rgba(255,255,255,.93); border: 1px solid rgba(207,224,218,.9); + border-radius: 11px; padding: 8px 12px; font-size: .72rem; font-weight: 800; color: var(--ink); + box-shadow: 0 7px 20px rgba(22,58,68,.12); + } @media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } .workspace { grid-template-columns: 1fr; } - .side-card { max-height: 400px; } + /* No fixed cap: the sensors expander must stay reachable below the RID list */ + .side-card { max-height: 70vh; } + #river-flow { min-height: 160px; } } @media (max-width: 560px) { .shell { padding: 14px; } header { align-items: flex-start; } - .subtitle, .live-pill { display: none; } + .subtitle { display: none; } + .live-pill { padding: 8px; } + #live-pill-text { display: none; } /* dot stays: live vs replay/simulation signal */ + #replay-2024 { white-space: nowrap; padding: 9px 11px; font-size: .72rem; } .stats { gap: 8px; } .stat { min-height: 96px; padding: 14px; } .stat-value { font-size: 1.25rem; } #station-map { height: 540px; } .map-overlay { left: 46px; } + #legend-toggle { display: inline-flex; } .legend { display: none; } + .legend.open { display: block; max-height: 42vh; overflow-y: auto; } } @@ -224,7 +236,9 @@
Station flow mapRiver width, colour & dash speed follow live discharge
-
+
+ +
Flow status
Low < 25 m³/s
Moderate 25–100
@@ -241,6 +255,7 @@
Very heavy 90–150
Extreme > 150
+
Loading river conditions…
Map data could not be loaded.
@@ -252,7 +267,7 @@
-

Additional basin stations

Loading ThaiWater/HII stations…

+ @@ -279,13 +294,13 @@

Station history

Select a station to load the last 7 days

- +
-
+
Click any station on the map or in the list to see its history