From 15324c25f25aba5c04b1b80bb7d555f5d9b00c7f Mon Sep 17 00:00:00 2001 From: Nico Date: Thu, 4 Jun 2026 19:03:43 -0700 Subject: [PATCH] fix: compact map preview topbar --- .../src/styles/pages/LocationMapManager.css | 30 ++++++++++++++++--- frontend/tests/location-map-manager.spec.ts | 4 ++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/frontend/src/styles/pages/LocationMapManager.css b/frontend/src/styles/pages/LocationMapManager.css index 077192d..173b361 100644 --- a/frontend/src/styles/pages/LocationMapManager.css +++ b/frontend/src/styles/pages/LocationMapManager.css @@ -1017,8 +1017,28 @@ .location-map-topbar { grid-template-columns: auto minmax(0, 1fr) auto; - gap: 0.5rem; - padding: 0.55rem 0.65rem; + gap: 0.45rem; + padding: 0.42rem 0.55rem; + } + + .location-map-title { + display: flex; + align-items: baseline; + gap: 0.35rem; + } + + .location-map-title h1 { + flex: 0 1 auto; + min-width: 0; + font-size: 0.98rem; + } + + .location-map-title span { + display: inline; + flex: 1 1 auto; + min-width: 0; + margin-top: 0; + font-size: 0.78rem; } .location-map-back { @@ -1027,9 +1047,11 @@ .location-map-status { min-width: 0; - max-width: 104px; + max-width: 90px; justify-self: end; - padding: 0.28rem 0.45rem; + padding: 0.22rem 0.38rem; + font-size: 0.68rem; + line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; diff --git a/frontend/tests/location-map-manager.spec.ts b/frontend/tests/location-map-manager.spec.ts index a6d4af6..e26d887 100644 --- a/frontend/tests/location-map-manager.spec.ts +++ b/frontend/tests/location-map-manager.spec.ts @@ -1383,8 +1383,10 @@ test("mobile keeps draft preview status compact in the topbar", async ({ page }) ) { throw new Error("Mobile map controls layout was not measurable"); } - expect(topbarBox.height).toBeLessThanOrEqual(66); + expect(topbarBox.height).toBeLessThanOrEqual(56); expect(backButtonBox.width).toBeLessThanOrEqual(42); + expect(titleBox.height).toBeLessThanOrEqual(24); + expect(statusBox.height).toBeLessThanOrEqual(24); expect(statusBox.y).toBeLessThan(titleBox.y + titleBox.height); expect(statusBox.x).toBeGreaterThan(titleBox.x); expect(toolbarBox.height).toBeLessThanOrEqual(64);