review: record why make-directory is wider than rename
Some checks are pending
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run

Acting on the review of #628.  No bugs; one suggestion and one nit, and the
suggestion is answered with a measurement rather than a change.

The review asked whether MakeDirectoryModal should drop back to `small`, on the
grounds that its body -- a path, one field and a button -- is the same shape as
RenameModal's, which is `small`.  The shapes are the same; the content is not.
Rename shows a RELATIVE path, make-directory shows the absolute one including the
media directory, and a bare `<pre>` is `white-space: pre`, so it scrolls out of
sight rather than wrapping.

Measured in the browser at both widths: 440px holds 42 characters, 620px holds 61.
`/media/wrolpi/videos/Practical Engineering/Season 2024/` is 55.  So an ordinary
channel-and-season path is unreadable at 440 and fits at 620, which is exactly
the condition the review set for keeping it.  The dev tree hides this -- its
paths are around 22 characters and fit either way.

Both `large` call sites now carry the audit comment the other three had, which
was the nit.  Make-directory's records the measurement, because it does read like
an inconsistency beside rename and the next person to notice should see the
numbers before narrowing it back.

1134 jest / 64 suites (--maxWorkers=2; see the previous commit), clean build.
This commit is contained in:
Roland 2026-08-02 19:46:41 -06:00 • committed by lrnselfreliance
parent ee3c08dfe8
commit a65c55e463

View file

@ -711,6 +711,11 @@ export function MoveModal({open, paths, onClose, onSubmit}) {
{destination ? fileCell(destination + '/' + pathName(i)) : fileCell(pathName(i))}
</Table.Row>);
/*
* Audited: `large` (620px). This dialog holds a DirectorySearch and a two-column
* Source/Destination table of every path being moved, which is the densest content
* of the five FileBrowser modals.
*/
return <Modal size='large'
onClose={onClose}
open={open}
@ -814,6 +819,18 @@ export function MakeDirectoryModal({open, onClose, parent, onSubmit}) {
}
}
/*
* Audited: `large` (620px), deliberately wider than RenameModal's `small` even though
* the form is the same shape -- one field and a button. The difference is the path
* above it: rename shows a RELATIVE path, this shows the absolute one including the
* media directory, and a bare `<pre>` is `white-space: pre`, so it scrolls rather
* than wraps. Measured in the browser: 440px holds 42 characters and 620px holds
* 61. `/media/wrolpi/videos/Practical Engineering/Season 2024/` is 55, so an
* ordinary channel-and-season path scrolls out of sight at 440 and fits at 620.
*
* Written out because it reads like an inconsistency next to rename, and the next
* person to notice that should see the measurement before narrowing it back.
*/
return <Modal size='large' open={open} onClose={onClose}>
<Modal.Header>Make Directory</Modal.Header>
<Modal.Content>