From 6dc7b9268aa4b8bc6c0fd349aec33f0b40ca891a Mon Sep 17 00:00:00 2001 From: npeter83 Date: Mon, 20 Jul 2026 23:48:50 +0200 Subject: [PATCH] fix(playlists): the table overflowed the page scroller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A truncate cell is white-space:nowrap, so its min-content width is the whole title — under table-layout:auto the Title column grew until Length and the remove button hung off the scroller (measured: table 1059px inside an 855px wrapper, main.scrollWidth 1074 vs clientWidth 887). Fixed layout with a declared width on every column but Title, which absorbs the rest. --- frontend/src/components/Playlists.tsx | 5 ++++- frontend/src/components/playlistColumns.tsx | 12 ++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Playlists.tsx b/frontend/src/components/Playlists.tsx index 2d6dee92..595def0a 100644 --- a/frontend/src/components/Playlists.tsx +++ b/frontend/src/components/Playlists.tsx @@ -706,7 +706,10 @@ export default function Playlists() { > {/* Not clipped, so the header's filter popovers can overflow the table box. */}
- + {/* table-fixed, not auto: every column but the title has a declared width, so the + title absorbs the rest and its `truncate` works. Auto layout sizes columns from + min-content, and a nowrap title cell's min-content is the entire title. */} +
v.title ?? "", filter: { kind: "text", get: (v) => v.title ?? "" }, @@ -60,7 +65,7 @@ export function playlistColumns({ ), @@ -68,17 +73,20 @@ export function playlistColumns({ { key: "channel", header: t("playlists.colChannel"), + width: "12rem", + nowrap: true, sortable: true, sortValue: (v) => v.channel_title ?? "", filter: { kind: "text", get: (v) => v.channel_title ?? "" }, render: (v) => ( - {v.channel_title} + {v.channel_title} ), }, { key: "duration", header: t("playlists.colDuration"), align: "right", + width: "5rem", nowrap: true, sortable: true, // Nulls (live/upcoming, or not yet enriched) sort last in BOTH directions in the old