From c1bf6516f520138d256055c23ef0b0ef8599725c Mon Sep 17 00:00:00 2001 From: SkateSpots Date: Thu, 1 Oct 2026 12:31:30 +0700 Subject: [PATCH] fix(map): welcome banner no longer sits under the floating search toolbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'New here?' banner was a later sibling of the absolute toolbar inside the same map container, so it became the first in-flow child at y=0 and the floating toolbar painted over it — the search bar covered the banner. Move the banner to be the container's first child (above the toolbar) and have the toolbar drop into flow when the banner is shown, so it can't cover it while still floating over the map otherwise. Desktop is unchanged (md:static). Docs: AGENTS.md map-layout note. --- AGENTS.md | 7 ++++ src/pages/MapPage.tsx | 86 ++++++++++++++++++++++++------------------- 2 files changed, 55 insertions(+), 38 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 83f2f1d..5b11e4f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -710,6 +710,13 @@ session with **no other memory of this project**. So: re-add a stacked toolbar or the footer subtraction. The "New here?" welcome banner (logged-out only) still occupies ~69px *in flow* on first visit — it's dismissible and the dismissal is persisted (`skatespots_welcome_dismissed`). + ⚠️ **The banner MUST be the first child of the map container, ABOVE the + toolbar** (fixed 2026-10-01). The toolbar is `absolute top-0` inside the same + container, so as a later sibling the banner sat at the container's top and the + floating toolbar **painted over it** (owner screenshot: search bar covering the + banner). Now the banner is first and the toolbar **drops into flow** + (`showWelcomeBanner ? 'relative border-b bg-black/95' : 'absolute …gradient'`) + so it can't cover it; `md:static` is unchanged on desktop. ⚠️ The floating toolbar sits over Leaflet's default **top-left zoom control**, so `MapPage` passes `className="h-full ss-map-floating-toolbar"` and `index.css` offsets `.leaflet-top.leaflet-left` by `4.25rem` **only under diff --git a/src/pages/MapPage.tsx b/src/pages/MapPage.tsx index bcab143..794c7ca 100644 --- a/src/pages/MapPage.tsx +++ b/src/pages/MapPage.tsx @@ -1051,11 +1051,57 @@ export default function MapPage() { {/* Full-height map container: subtract header + bottom nav on mobile, header only on desktop */} {/* 100dvh handles iOS Safari URL bar shrink correctly */}
+ {/* Welcome Banner — shown once to logged-out visitors. It lives ABOVE + the toolbar (both in flow) because the toolbar floats over the map: + as a later sibling the banner would sit at the container's top and + the floating toolbar would paint over it. */} + {showWelcomeBanner && ( +
+
+ 🛹 +
+

New here?

+

Discover skate spots, events & the community.

+
+ {/* Desktop-only: grab the mobile app via Zapstore */} + + + Get on Zapstore + + + Get Started + + +
+
+ )} + {/* ── Toolbar ── Mobile: floats OVER the map (absolute) so the map fills the whole screen; the gradient fades into the map and the transparent wrapper - passes touches through to it. Desktop keeps the in-flow bar. */} -
+ passes touches through to it. Desktop keeps the in-flow bar. With the + welcome banner present it drops into flow so it can't cover it. */} +
{/* Single row: search pill + view toggle + filter button */}
@@ -1581,42 +1627,6 @@ export default function MapPage() {
- {/* Welcome Banner — shown once to logged-out visitors */} - {showWelcomeBanner && ( -
-
- 🛹 -
-

New here?

-

Discover skate spots, events & the community.

-
- {/* Desktop-only: grab the mobile app via Zapstore */} - - - Get on Zapstore - - - Get Started - - -
-
- )} - {/* Main Content */} {/* `isolate` creates a stacking context so the map's internal z-indexes (Leaflet panes, our overlays up to z-[2000]) stay INSIDE the map. Without