ui: size the five modals that had never been sized

These five carried no `size` at all, so they rendered at Mantine's 440px default
-- a width nobody had chosen, inherited from the library rather than decided.
Roland audited them:

  FileBrowser rename        small  (440, unchanged)
  FileBrowser move          large  (620)
  FileBrowser ignore        small  (440, unchanged)
  FileBrowser make directory large (620)
  Files filter              small  (440, unchanged)

The three "unchanged" ones are written down rather than left implicit, so the
decision lives in the source and a future change to Mantine's default cannot
move them.

Roland asked for `medium` on the ignore dialog and there is no such modal size:
the vocabulary is mini/tiny/small/large/fullscreen, and Mantine has no token
between 440 and 620.  An unknown name would have passed through untranslated,
rendered at 440 anyway, and left the source claiming otherwise -- which is what
the size guard in ui.test.js was added to catch.  Asked rather than guessed;
`small` was the answer, and the guard would have failed the build either way.

Verified in the browser rather than from the props: move 620, make directory 620,
ignore 440, rename 440.  Move and ignore need a selection before they can be
opened, so a directory was selected first.

1134 jest / 64 suites, clean npm run build.  The full suite needs
`--maxWorkers=2` on this machine at the moment: at load average 38 four unrelated
suites (ControllerPage, CollectionReorganizeModal, CollectionTagModal, Flasher)
time out and the run takes 183s instead of 5s.  They pass in isolation and with
reduced parallelism; nothing in this change touches them.
This commit is contained in:
Roland 2026-08-02 19:21:49 -06:00
parent a642c2e981
commit 9b1daba07a
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
2 changed files with 8 additions and 5 deletions

View file

@ -643,7 +643,8 @@ export function RenameModal({open, onClose, path, onSubmit, onPending}) {
setValue(pathName(path));
}, [path]);
return <Modal
// Audited: unchanged at `small` (440px), written down so the default cannot move it.
return <Modal size='small'
open={open}
onClose={onClose}
>
@ -710,7 +711,7 @@ export function MoveModal({open, paths, onClose, onSubmit}) {
{destination ? fileCell(destination + '/' + pathName(i)) : fileCell(pathName(i))}
</Table.Row>);
return <Modal
return <Modal size='large'
onClose={onClose}
open={open}
>
@ -775,7 +776,8 @@ export function IgnoreDirectoryModal({open, onClose, onSubmit, directory, ignore
onClick={handleIgnore}
>{ignored ? 'Un-ignore' : 'Ignore'}</Button>;
return <Modal open={open} onClose={onClose}>
// Audited: `small` (440px), which is the width it already had.
return <Modal size='small' open={open} onClose={onClose}>
<Modal.Header>{header}</Modal.Header>
<Modal.Content>
{content}
@ -812,7 +814,7 @@ export function MakeDirectoryModal({open, onClose, parent, onSubmit}) {
}
}
return <Modal open={open} onClose={onClose}>
return <Modal size='large' open={open} onClose={onClose}>
<Modal.Header>Make Directory</Modal.Header>
<Modal.Content>
<form onSubmit={handleSubmit}>

View file

@ -398,7 +398,8 @@ export function SearchFilter({filters = [], modalHeader, size = 'medium'}) {
if (filters && filters.length > 0) {
return <>
<Modal open={open} onClose={() => setOpen(false)} closeIcon>
{/* Audited: unchanged at `small` (440px), recorded so the default cannot move it. */}
<Modal size='small' open={open} onClose={() => setOpen(false)} closeIcon>
{modalHeader || <Modal.Header>Filter</Modal.Header>}
<Modal.Content>
<Stack gap='xs'>