diff --git a/frontend/src/components/maps/LocationMapBottomSheet.jsx b/frontend/src/components/maps/LocationMapBottomSheet.jsx index 222e8e3..0fa26dc 100644 --- a/frontend/src/components/maps/LocationMapBottomSheet.jsx +++ b/frontend/src/components/maps/LocationMapBottomSheet.jsx @@ -73,20 +73,24 @@ export default function LocationMapBottomSheet({ })); }; const editorActions = showEditorControls ? ( -
- - - - - - +
+
+ + +
+
+ + + + +
) : canManage && mapState?.published_map ? (
diff --git a/frontend/src/styles/pages/LocationMapManager.css b/frontend/src/styles/pages/LocationMapManager.css index c171418..56a4cd1 100644 --- a/frontend/src/styles/pages/LocationMapManager.css +++ b/frontend/src/styles/pages/LocationMapManager.css @@ -396,11 +396,25 @@ .location-map-editor-actions { flex-wrap: wrap; +} + +.location-map-editor-action-stack { + display: grid; + gap: 0.45rem; margin-bottom: 0.75rem; } .location-map-primary-actions button { - flex: 1 1 96px; + flex: 1 1 140px; +} + +.location-map-secondary-actions button { + flex: 1 1 82px; + min-height: 38px; + padding: 0.45rem 0.58rem; + background: rgba(21, 40, 59, 0.78); + color: #dbeafe; + font-size: 0.86rem; } .location-map-mobile-tool-switch { diff --git a/frontend/tests/location-map-manager.spec.ts b/frontend/tests/location-map-manager.spec.ts index 1493dc0..409afc7 100644 --- a/frontend/tests/location-map-manager.spec.ts +++ b/frontend/tests/location-map-manager.spec.ts @@ -882,6 +882,18 @@ test("mobile editor uses bottom sheet controls instead of desktop object toolbar await expect(page.getByLabel("Map controls")).toBeVisible(); await expect(page.locator(".location-map-tool-buttons")).toBeHidden(); await expect(page.locator(".location-map-mobile-tool-switch")).toBeVisible(); + const primaryActions = page.locator(".location-map-primary-actions"); + const secondaryActions = page.locator(".location-map-secondary-actions"); + await expect(primaryActions.getByRole("button", { name: "Save Draft" })).toBeVisible(); + await expect(primaryActions.getByRole("button", { name: "Publish" })).toBeVisible(); + await expect(secondaryActions.getByRole("button", { name: "Add Area" })).toBeVisible(); + await expect(secondaryActions.getByRole("button", { name: "Preview Draft" })).toBeVisible(); + const primaryActionBox = await primaryActions.boundingBox(); + const secondaryActionBox = await secondaryActions.boundingBox(); + expect(primaryActionBox).not.toBeNull(); + expect(secondaryActionBox).not.toBeNull(); + if (!primaryActionBox || !secondaryActionBox) throw new Error("Mobile action groups were not measurable"); + expect(primaryActionBox.y).toBeLessThan(secondaryActionBox.y); await expect(page.getByRole("button", { name: "Pan" })).toHaveClass(/active/); await expect(page.getByRole("button", { name: "Pan" })).toHaveClass(/is-pan/); await expect(page.getByRole("button", { name: "Objects" })).toHaveClass(/is-edit/);