From ea05691a6503948ef0ec31fda79a5f3a799469a1 Mon Sep 17 00:00:00 2001 From: Nico Date: Thu, 4 Jun 2026 07:38:49 -0700 Subject: [PATCH] fix: stabilize mobile map toolbar slots --- frontend/src/styles/pages/LocationMapManager.css | 6 +++--- frontend/tests/location-map-manager.spec.ts | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/styles/pages/LocationMapManager.css b/frontend/src/styles/pages/LocationMapManager.css index f5cc450..d7c11f7 100644 --- a/frontend/src/styles/pages/LocationMapManager.css +++ b/frontend/src/styles/pages/LocationMapManager.css @@ -851,16 +851,16 @@ .location-map-toolbar { display: grid; - grid-template-columns: minmax(0, 8.25rem) auto; + grid-template-columns: minmax(0, 8.25rem) minmax(0, 1fr); align-items: center; - justify-content: space-between; + justify-content: stretch; column-gap: 0.15rem; row-gap: 0.35rem; padding: 0.35rem 0.25rem; } .location-map-toolbar.has-history-slot { - grid-template-columns: minmax(0, 8.25rem) 5rem auto; + grid-template-columns: minmax(0, 8.25rem) 5rem minmax(0, 1fr); } .location-map-mode-group { diff --git a/frontend/tests/location-map-manager.spec.ts b/frontend/tests/location-map-manager.spec.ts index af49c87..a33f652 100644 --- a/frontend/tests/location-map-manager.spec.ts +++ b/frontend/tests/location-map-manager.spec.ts @@ -787,7 +787,9 @@ test("mobile keeps draft preview status compact in the topbar", async ({ page }) expect(toolbarBox.height).toBeLessThanOrEqual(64); expect(modeBox.width).toBeLessThanOrEqual(150); expect(reservedHistoryBox.width).toBeGreaterThanOrEqual(70); + expect(reservedHistoryBox.x).toBeGreaterThan(modeBox.x + modeBox.width - 1); expect(zoomBox.y).toBeLessThan(modeBox.y + modeBox.height); + expect(zoomBox.x).toBeGreaterThan(reservedHistoryBox.x + reservedHistoryBox.width - 1); expect(zoomBox.x + zoomBox.width).toBeLessThanOrEqual(toolbarBox.x + toolbarBox.width + 1); await page.getByRole("button", { name: "Edit Draft" }).click();