diff --git a/packages/ui/src/blocks/navigation-panel.tsx b/packages/ui/src/blocks/navigation-panel.tsx index b61a3ad..7c88c2f 100644 --- a/packages/ui/src/blocks/navigation-panel.tsx +++ b/packages/ui/src/blocks/navigation-panel.tsx @@ -710,8 +710,8 @@ function NavigationPanelNav({ )} style={{ top: "var(--navigation-outline-top, 0px)", - left: "0px", - width: "100%", + left: "var(--navigation-outline-left, 0px)", + width: "var(--navigation-outline-width, 0px)", height: "var(--navigation-outline-height, 0px)", }} /> @@ -939,7 +939,7 @@ function NavigationPanelNav({ className={cn( "group relative grid min-h-11 w-full grid-cols-[2rem_minmax(0,1fr)] items-center rounded-lg border border-transparent pr-8 text-left text-sm transition-colors max-lg:w-auto max-lg:min-w-max", childActive - ? "bg-nextide-tide/[0.07] text-foreground" + ? "text-foreground max-lg:bg-nextide-tide/[0.07]" : "text-muted-foreground hover:bg-nextide-panel-strong/70 hover:text-foreground" )} aria-current={childActive ? "page" : undefined} diff --git a/tests/e2e/qualification.spec.ts b/tests/e2e/qualification.spec.ts index 6a44c4e..33f14cd 100644 --- a/tests/e2e/qualification.spec.ts +++ b/tests/e2e/qualification.spec.ts @@ -541,6 +541,23 @@ test("navigation branches keep destinations and create actions distinct", async ).toBeVisible() await report.click() await expect(report).toHaveAttribute("aria-current", "page") + await expect(report).toHaveCSS("background-color", "rgba(0, 0, 0, 0)") + const selection = navigation.locator('[data-slot="navigation-panel-selection"]') + await expect + .poll(async () => { + const [reportBox, selectionBox] = await Promise.all([ + report.boundingBox(), + selection.boundingBox(), + ]) + if (!reportBox || !selectionBox) return 100 + return Math.max( + Math.abs(reportBox.x - selectionBox.x), + Math.abs(reportBox.y - selectionBox.y), + Math.abs(reportBox.width - selectionBox.width), + Math.abs(reportBox.height - selectionBox.height) + ) + }) + .toBeLessThan(1) await navigation.getByRole("button", { name: "Create campaign" }).click() await expect( @@ -575,6 +592,7 @@ test("navigation branches keep destinations and create actions distinct", async await expect(report).toHaveAttribute("aria-current", "page") await page.setViewportSize({ width: 390, height: 900 }) + await expect(report).not.toHaveCSS("background-color", "rgba(0, 0, 0, 0)") const action = navigation.getByRole("button", { name: "Create campaign" }) const disclosure = navigation.getByRole("button", { name: "Collapse Campaigns",