fix: declutter map setup state

This commit is contained in:
Nico 2026-06-03 12:27:37 -07:00
parent 023aef10ec
commit d370e23529
2 changed files with 16 additions and 13 deletions

View File

@ -434,6 +434,7 @@ export default function LocationMapManager() {
<LocationMapTopbar location={location} status={status} onBack={handleBack} />
<main className="location-map-workspace">
{hasAnyMap && mode !== "setup" ? (
<LocationMapToolbar
mode={mode}
editorTool={editorTool}
@ -447,6 +448,7 @@ export default function LocationMapManager() {
onPanMode={() => setEditorTool("pan")}
onEditObjects={() => setEditorTool("edit")}
/>
) : null}
{!hasAnyMap || (mode === "setup" && mapState?.draft_map && !mapState?.published_map) ? (
<LocationMapSetupPanel

View File

@ -263,6 +263,7 @@ test("admin creates a map from zones, saves a draft, and publishes it", async ({
await expect(page.getByText("Eastvale")).toBeVisible();
await expect(page.getByRole("heading", { name: "No Map" })).toBeVisible();
await expect(page.getByRole("button", { name: "Create Map From Existing Zones" })).toBeVisible();
await expect(page.getByLabel("Map controls")).toHaveCount(0);
await page.getByRole("button", { name: "Create Map From Existing Zones" }).click();
await expect(page.getByText("Bakery")).toBeVisible();