From d82b87355244878b4a25289c85a3fac83c50aa4c Mon Sep 17 00:00:00 2001 From: AI Assistant Date: Wed, 25 Mar 2026 11:06:48 +0200 Subject: [PATCH] fix(portal): mobile toolbar as fixed viewport element + layout fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Selection toolbar: - Moved OUTSIDE map container div to a fixed viewport position (bottom-4, z-[110]). iOS Safari clips absolute elements inside calc(100vh) containers — fixed positioning solves this. - Only shown when UAT selected and has data. Mobile top layout: - UAT card takes full width (right-2 not right-[140px]) - Basemap switcher at top-[52px] left-2 on mobile (below UAT card) - Desktop: unchanged (top-right offset from zoom controls) Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/(portal)/portal/page.tsx | 36 +++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/app/(portal)/portal/page.tsx b/src/app/(portal)/portal/page.tsx index 60f9452..59e091b 100644 --- a/src/app/(portal)/portal/page.tsx +++ b/src/app/(portal)/portal/page.tsx @@ -1528,7 +1528,7 @@ function HartaContent() { /> {/* Top-left: UAT info + change button (responsive) */} -
+

{selectedUat?.name}

@@ -1556,9 +1556,9 @@ function HartaContent() {
- {/* Top-right: basemap switcher + simple feature info (offset to avoid zoom controls) */} - {/* On mobile (< sm), drops below the UAT card via top-14 */} -
+ {/* Basemap switcher + feature info */} + {/* Mobile: below UAT card. Desktop: top-right offset from zoom controls */} +
{clickedFeature && selectionMode === "off" && (
@@ -1616,19 +1616,21 @@ function HartaContent() { )}
- {/* Bottom: selection toolbar — centered, above attribution */} -
- { - mapHandleRef.current?.clearSelection(); - setSelectedFeatures([]); - }} - /> -
+
+ )} + {/* Selection toolbar — FIXED at bottom of viewport (always visible when map shown) */} + {selectedSiruta && !hasNoData && ( +
+ { + mapHandleRef.current?.clearSelection(); + setSelectedFeatures([]); + }} + />
)}