fix(web): wrap long paths in Discard Changes dialog (#620)

Long file paths could overflow the AlertDialog horizontally, pushing
the action buttons outside the visible area. Add break-words on the
description and overflow-wrap:anywhere on the filename span so paths
wrap mid-string instead of forcing the dialog wider than its max-w.
This commit is contained in:
José Almeida
2026-04-18 10:32:24 +01:00
committed by GitHub
parent 74d4d5b77b
commit f63a9d5dc5
@@ -55,11 +55,12 @@ export function DiscardDialog({
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Discard changes?</AlertDialogTitle>
<AlertDialogDescription>
<AlertDialogDescription className="break-words">
{description ?? (
<>
This will permanently discard all changes to{" "}
<span className="font-semibold">{displayFile}</span>. This action cannot be undone.
<span className="font-semibold [overflow-wrap:anywhere]">{displayFile}</span>. This
action cannot be undone.
</>
)}
</AlertDialogDescription>