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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user