Align application panel header heights

This commit is contained in:
2026-08-05 16:32:56 +02:00
parent 9b7b2f3c2e
commit f1c730d007
4 changed files with 10 additions and 3 deletions
+1
View File
@@ -39,6 +39,7 @@ This project replaces the Excel/VBA workflow named `Catalog maker - 20` with a N
- Whenever possible, use Tailwind UI / Tailwind Plus application components and patterns for shells, multi-column layouts, sidebars, drawers, dialogs, navigation and forms; adapt them to this project's dense catalog workflow instead of inventing a separate visual pattern.
- Multi-column panels must use a shared collapse pattern: collapsing a panel removes its grid track, lets the adjacent workspace expand, preserves an accessible expand/collapse control, and stacks predictably on mobile.
- When the left sidebar is closed on desktop, its open control keeps a dedicated narrow rail; it must not be positioned inside the secondary product-details panel. On mobile, the rail collapses and the control may overlay the stacked layout.
- Top headers for the sidebar, secondary panel and main workspace must use one shared fixed height so the columns align visually across the application.
- Use Playwright to inspect the rendered result after every visual change at desktop and narrow viewport sizes.
## TypeScript workflow
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -46,7 +46,7 @@
.catalog-screen.secondary-collapsed { --secondary-track: 44px; }
.catalog-screen.workspace-collapsed { --workspace-track: 44px; }
.sidebar-drawer { @apply fixed inset-y-0 left-0 z-40 flex w-72 min-h-screen flex-col gap-1.5 overflow-y-auto bg-slate-900 p-1.5 text-[11px] text-slate-200 shadow-xl transition-transform duration-200 ease-out; }
.sidebar-drawer-header { @apply flex items-center justify-between border-b border-slate-700 pb-1; }
.sidebar-drawer-header { @apply box-border flex h-7 min-h-7 items-center justify-between border-b border-slate-700 py-0; }
.sidebar-drawer-title { @apply px-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400; }
.sidebar-close-button, .sidebar-open-button { @apply inline-flex h-7 w-7 items-center justify-center rounded border border-slate-700 bg-slate-800 text-slate-200 shadow-sm transition hover:border-slate-500 hover:bg-slate-700; }
.sidebar-close-button .sidebar-icon, .sidebar-open-button .sidebar-icon { @apply h-4 w-4; }
@@ -114,7 +114,7 @@
.mapping-source-status.is-bad { @apply bg-red-100 text-red-700; }
.mapping-source-status.is-muted { @apply bg-slate-200 text-slate-600; }
.secondary-panel { @apply min-w-0 border-r border-slate-400 bg-slate-300; }
.column-header { @apply flex h-7 items-center justify-between gap-1 border-b border-slate-400 px-1 text-[10px] font-semibold uppercase tracking-wide text-slate-600; }
.column-header { @apply box-border flex h-7 min-h-7 items-center justify-between gap-1 border-b border-slate-400 px-1 text-[10px] font-semibold uppercase tracking-wide text-slate-600; }
.column-toggle { @apply inline-flex h-5 w-5 items-center justify-center rounded border border-slate-400 bg-white text-sm leading-none text-slate-700 hover:bg-slate-200; }
.secondary-panel .field-grid { @apply overflow-hidden; }
.secondary-collapsed .secondary-panel .column-header { @apply h-full flex-col justify-start py-1; writing-mode: vertical-rl; }
+6
View File
@@ -75,6 +75,12 @@ test("workspace columns collapse and expand without leaving a gap", async ({ pag
await expect(page.locator(".catalog-screen")).not.toHaveClass(/workspace-collapsed/);
});
test("uses one shared height for the top panel headers", async ({ page }) => {
await page.goto("/");
const heights = await page.locator("#sidebarDrawer .sidebar-drawer-header, .secondary-panel .column-header, .main-workspace .column-header").evaluateAll((elements) => elements.map((element) => Math.round(element.getBoundingClientRect().height)));
expect(new Set(heights).size).toBe(1);
});
test("theme toggle switches and persists dark mode", async ({ page }) => {
await page.goto("/");
await page.evaluate(() => localStorage.clear());