From ae70dd5ea833d5f43bfaf8cb3c6c56d81039eda4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sun, 30 Aug 2026 22:40:57 +0100 Subject: [PATCH] the download dialog stops growing to fit its titles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A long video title pushed the modal wider than itself and ran out of the card. The title had `truncate` and its parents had `min-w-0 flex-1`, and none of it bit. DialogContent is a GRID. A grid item defaults to `min-width: auto` — it refuses to shrink below its content — so the list container expanded past the dialog's own `max-w-lg`, the card grew with it, and `truncate` never had a width to truncate against. Every constraint below that point was measured against a box that had already given up. `82d24a8f` made the card a column, which was a real fix for a real half of this: the title, thumbnail and button used to share a line and the title won. But a column still cannot be narrower than the widest thing the grid above it will allow, so the fix held only until a title long enough came along. Worth knowing beyond this dialog: every DialogContent in the app is that same grid, so any dialog holding unbreakable content has the same trap waiting. Fixed here rather than in the shared component, because changing the layout of every dialog in the platform to fix one modal is not a change to make without asking. Co-Authored-By: Claude Opus 5 (1M context) --- .../components/VideoDownloadDialog.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/VideoDownloadDialog.tsx b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/VideoDownloadDialog.tsx index 4b98e687..11741802 100644 --- a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/VideoDownloadDialog.tsx +++ b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/VideoDownloadDialog.tsx @@ -248,7 +248,19 @@ export const VideoDownloadDialog = ({ fileBrowserManager }: VideoDownloadDialogP )} -
+ {/* + `min-w-0` is the one that makes `truncate` work, three levels down. + + DialogContent is a GRID, and a grid item defaults to `min-width: auto` — it refuses to + shrink below its content. So a long title pushed this container wider than the dialog's + own `max-w-lg`, the card grew with it, and the `truncate` on the title never had a width + to truncate against. The text simply ran out of the modal. + + Making the card a column fixed a different half of this and was not enough: a column still + cannot be narrower than the widest thing a grid will let it be. The constraint has to come + from above, and this is the highest point where it was missing. + */} +
{entries.map((e, i) => (