From f4d8fe464683ac6b36d7eb71bd77705526d956f8 Mon Sep 17 00:00:00 2001 From: Quick104 <31828688+Quick104@users.noreply.github.com> Date: Fri, 20 Nov 2026 21:27:50 -0500 Subject: [PATCH] fix(web): wrap long folder paths in settings and restore status lines A settings or restore status line whose text held a word with no break opportunity, such as a folder path, ran past its panel on a phone, and the admin layout's clip cut off the end of the path. The status is an inline-flex box, so its text is a flex item that could not shrink below its longest word. wrap-anywhere lets that text shrink and break inside a word that does not fit, on every page that uses SettingFieldStatus. The restore details line that repeats the missing folder paths gets the same class. Text that fits lays out as before. Co-Authored-By: Claude Opus 5.5 --- web/src/pages/admin-backups/RestoreRows.tsx | 2 +- web/src/pages/admin-settings/SettingField.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/pages/admin-backups/RestoreRows.tsx b/web/src/pages/admin-backups/RestoreRows.tsx index 7a43178aa8..0dbaffdb52 100644 --- a/web/src/pages/admin-backups/RestoreRows.tsx +++ b/web/src/pages/admin-backups/RestoreRows.tsx @@ -212,7 +212,7 @@ function itemDetails(t: Translate, item: RestoreItem): ReactNode { ) : null, missingPaths.length > 0 ? ( -

+

{t("web.admin.backups.restore.rows.cantOpen", { paths: missingPaths.join(", ") })}

) : null, diff --git a/web/src/pages/admin-settings/SettingField.tsx b/web/src/pages/admin-settings/SettingField.tsx index 6591c4a97f..3377ed1eb5 100644 --- a/web/src/pages/admin-settings/SettingField.tsx +++ b/web/src/pages/admin-settings/SettingField.tsx @@ -48,7 +48,9 @@ export const SETTINGS_NUMBER_WIDTH = "w-full sm:w-[var(--settings-control-w-num) * The text may wrap. Items align to the top, and each direct `svg` child (a * `size-3.5` icon) is offset to center on the first line. When the icon is * taller than a line, as with a large browser font size, the top padding lowers - * the text instead, so the icon stays inside the status. + * the text instead, so the icon stays inside the status. A word wider than the + * line, such as a folder path, breaks inside the word: `wrap-anywhere`, unlike + * `break-words`, lets the text (a flex item) shrink below its longest word. */ export function SettingFieldStatus({ tone = "ok", @@ -61,7 +63,7 @@ export function SettingFieldStatus({ return ( svg]:pt-[max(0px,calc((0.875rem-1lh)/2))] [&>svg]:mt-[calc((1lh-0.875rem)/2)]", + "inline-flex items-start gap-1.5 text-[13px] leading-snug wrap-anywhere has-[>svg]:pt-[max(0px,calc((0.875rem-1lh)/2))] [&>svg]:mt-[calc((1lh-0.875rem)/2)]", tone === "ok" && "text-green-600 dark:text-green-400", tone === "warn" && "text-amber-600 dark:text-amber-400", tone === "muted" && "text-muted-foreground",