From a3421b2656a5df7ad92becadf6eb4e0581a1f2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 18 Sep 2026 04:18:17 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=93=B1=20sweep=20the=20last=20shri?= =?UTF-8?q?nk-0=20action=20row=20into=20the=20same=20pattern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PageHeader's actions row carried the same `flex shrink-0 flex-wrap` class string the table and section hosts had, so the class was three hosts wide and one of them was left behind: a wide action row there could push the document past a narrow viewport the same way. min-w-0 lets the box shrink below its max-content width while flex-wrap keeps the children wrapping. The shrink guard in data-table.test.tsx now renders all three hosts, so the spelling cannot drift again (it fails on the old PageHeader row and passes on the new one). --- src/components/layout/page-header.tsx | 2 +- src/components/ui/data-table.test.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/layout/page-header.tsx b/src/components/layout/page-header.tsx index 081001c..c1f64ab 100644 --- a/src/components/layout/page-header.tsx +++ b/src/components/layout/page-header.tsx @@ -55,7 +55,7 @@ export function PageHeader( {props.children} -
{props.actions}
+
{props.actions}
diff --git a/src/components/ui/data-table.test.tsx b/src/components/ui/data-table.test.tsx index 19d91de..2fbe7f9 100644 --- a/src/components/ui/data-table.test.tsx +++ b/src/components/ui/data-table.test.tsx @@ -2,6 +2,7 @@ import { fireEvent, render, screen } from "@solidjs/testing-library"; import type { ColumnDef } from "@tanstack/solid-table"; import { DataTable } from "@/components/ui/data-table"; import { DataSection } from "@/components/ui/data-section"; +import { PageHeader } from "@/components/layout/page-header"; import { PreferencesProvider } from "@/stores/preferences-context"; type Row = { name: string; role?: string }; @@ -136,11 +137,12 @@ test("the header action toolbar of every shared host can shrink below its max-co /> Export} /> + Export} /> )); const toolbars = screen.getAllByText("Export").map((action) => action.parentElement as HTMLElement); - expect(toolbars).toHaveLength(2); + expect(toolbars).toHaveLength(3); for (const toolbar of toolbars) { expect(toolbar.classList).toContain("flex-wrap"); expect(toolbar.classList).toContain("min-w-0");