fix: omit redundant unmapped map heading

This commit is contained in:
Nico 2026-06-04 20:28:14 -07:00
parent 2af22f6bb2
commit 40776821a6
3 changed files with 7 additions and 12 deletions

View File

@ -238,8 +238,7 @@ export function UnmappedItemsPanel({
}) { }) {
if (visibleUnmappedItems.length === 0 && hasHiddenUnmappedItems) { if (visibleUnmappedItems.length === 0 && hasHiddenUnmappedItems) {
return ( return (
<div className="location-map-unmapped-list"> <div className="location-map-unmapped-list" aria-label="Unmapped items">
<strong>Unmapped Items</strong>
<div className="location-map-zone-empty"> <div className="location-map-zone-empty">
<InlineStateAction <InlineStateAction
label="Hidden" label="Hidden"
@ -257,8 +256,7 @@ export function UnmappedItemsPanel({
} }
return ( return (
<div className="location-map-unmapped-list"> <div className="location-map-unmapped-list" aria-label="Unmapped items">
<strong>Unmapped Items</strong>
<MapItemActionList <MapItemActionList
items={visibleUnmappedItems} items={visibleUnmappedItems}
onSelectItem={onSelectUnmappedItem} onSelectItem={onSelectUnmappedItem}

View File

@ -899,11 +899,6 @@
margin-top: 0.75rem; margin-top: 0.75rem;
} }
.location-map-unmapped-list strong {
display: block;
margin-bottom: 0.45rem;
}
.location-map-list-more { .location-map-list-more {
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;

View File

@ -3042,7 +3042,8 @@ test("viewer hides unrelated unmapped items while a zone is selected", async ({
await page.getByRole("button", { name: "Layers" }).click(); await page.getByRole("button", { name: "Layers" }).click();
await page.getByRole("button", { name: "Unmapped" }).click(); await page.getByRole("button", { name: "Unmapped" }).click();
await expect(page.locator(".location-map-display-panel")).toBeVisible(); await expect(page.locator(".location-map-display-panel")).toBeVisible();
await expect(page.getByText("Unmapped Items")).toBeVisible(); await expect(page.getByLabel("Unmapped items")).toBeVisible();
await expect(page.getByText("Unmapped Items")).toHaveCount(0);
await expect(page.getByText("loose batteries")).toBeVisible(); await expect(page.getByText("loose batteries")).toBeVisible();
await page.locator('[data-object-key="1531"]').locator("rect").first().click(); await page.locator('[data-object-key="1531"]').locator("rect").first().click();
@ -3050,12 +3051,13 @@ test("viewer hides unrelated unmapped items while a zone is selected", async ({
await expect(page.getByRole("button", { name: "Layers, 1 changed" })).toHaveAttribute("aria-expanded", "false"); await expect(page.getByRole("button", { name: "Layers, 1 changed" })).toHaveAttribute("aria-expanded", "false");
await expect(page.locator(".location-map-display-panel")).toHaveCount(0); await expect(page.locator(".location-map-display-panel")).toHaveCount(0);
await expect(page.getByText("french bread")).toBeVisible(); await expect(page.getByText("french bread")).toBeVisible();
await expect(page.getByText("Unmapped Items")).toHaveCount(0); await expect(page.getByLabel("Unmapped items")).toHaveCount(0);
await expect(page.getByText("loose batteries")).toHaveCount(0); await expect(page.getByText("loose batteries")).toHaveCount(0);
await page.locator(".location-map-background").click({ position: { x: 8, y: 8 } }); await page.locator(".location-map-background").click({ position: { x: 8, y: 8 } });
await expect(page.locator(".location-map-sheet-header strong")).toHaveText("Map Details"); await expect(page.locator(".location-map-sheet-header strong")).toHaveText("Map Details");
await expect(page.getByText("Unmapped Items")).toBeVisible(); await expect(page.getByLabel("Unmapped items")).toBeVisible();
await expect(page.getByText("Unmapped Items")).toHaveCount(0);
await expect(page.getByText("loose batteries")).toBeVisible(); await expect(page.getByText("loose batteries")).toBeVisible();
}); });