From 21dd8d000c2d78d7f4e8e0aea35b01b87b7fa1e6 Mon Sep 17 00:00:00 2001 From: Willie Date: Mon, 9 Nov 2026 23:49:26 +0800 Subject: [PATCH] fix(ui): wrap page header actions below the title on narrow screens The page header kept the title and its action buttons on one row, and the buttons do not shrink. At phone width the buttons took most of the row, so the subtitle was squeezed to one character per line (the Skills page at 390px). The title now keeps at least 280px and the actions wrap below it when they do not fit; desktop layout is unchanged. The Hooks page's own flex-wrap override is no longer needed. --- ui/src/components.css | 5 +++-- ui/src/pages/HooksPage.tsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/src/components.css b/ui/src/components.css index 7dbd4cb05..f84ede203 100644 --- a/ui/src/components.css +++ b/ui/src/components.css @@ -76,8 +76,9 @@ svg.lucide { flex: none; stroke-width: var(--isw); } .ss-wrap the 28px flex gap already does it, and both together left a 56px hole. */ .ss-pgh { margin-bottom: 28px; } .ss-wrap > .ss-pgh { margin-bottom: 0; } -.ss-ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; } -.ss-ph .tt { display: flex; flex-direction: column; gap: 6px; } +/* The title keeps at least 280px; when the actions do not fit beside it they wrap below. */ +.ss-ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; } +.ss-ph .tt { display: flex; flex: 1 1 280px; flex-direction: column; gap: 6px; } .ss-ph p { color: var(--ink-2); } :root[data-theme="playful"] .ss-ph h1 span { background: linear-gradient(transparent 58%, var(--pa) 58%, var(--pa) 92%, transparent 92%); padding: 0 4px; margin: 0 -4px; } :root[data-theme="playful"].dark .ss-ph h1 span { background: linear-gradient(transparent 58%, rgba(232,168,76,.45) 58%, rgba(232,168,76,.45) 92%, transparent 92%); } diff --git a/ui/src/pages/HooksPage.tsx b/ui/src/pages/HooksPage.tsx index 4de30d57a..c41bd4ef5 100644 --- a/ui/src/pages/HooksPage.tsx +++ b/ui/src/pages/HooksPage.tsx @@ -12,7 +12,7 @@ export default function HooksPage() {
{error &&
{error.message}
} {data ? ( - } /> + } /> ) : ( )}