ui: FileBrowser.js and FilePreview.js off Semantic

Migrated both files onto the token-driven ./ui component library: Table,
Modal, Button/IconButton, Checkbox, Header, Panel, Progress, Placeholder,
Skeleton, ActionInput/TextInput, IconStack, Menu/ButtonGroup for the slicer
split-button, and native <img>/<form> in place of Semantic's Image/Form.

Notable adaptations:
- Semantic's per-row `disabled` styling (no visual equivalent in the new
  Table) is reproduced with inline opacity/pointer-events instead.
- DirectorySearch's autoFocus now passes straight through as a prop instead
  of a nested `input={{autoFocus}}` object, matching SearchBox's API.
- The responsive icon+label footer buttons keep a single Button and toggle
  children instead of swapping component type.
- FileBrowser.test.js: two upload-button assertions keyed off a literal
  Semantic `.green` class; broadened to also match on the icon, mirroring
  the sibling assertion already using that fallback.

Preserved as-is (reported, not fixed): getVideoPreviewModal's
`<Header as='h5'>{path['path']}</Header>` indexes a string with `['path']`,
which was already dead/undefined before this migration.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Roland 2026-07-30 13:11:01 -06:00
parent 87a6a34d68
commit 41b789bf8f
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
3 changed files with 171 additions and 205 deletions

View file

@ -155,7 +155,9 @@ describe('FileBrowser', () => {
// Find the upload button
const buttons = screen.getAllByRole('button');
const uploadButton = buttons.find(btn => btn.classList.contains('green'));
const uploadButton = buttons.find(btn =>
btn.classList.contains('green') || btn.querySelector('[class*="upload"]')
);
expect(uploadButton).not.toBeDisabled();
});
@ -173,7 +175,9 @@ describe('FileBrowser', () => {
// Find the upload button
const buttons = screen.getAllByRole('button');
const uploadButton = buttons.find(btn => btn.classList.contains('green'));
const uploadButton = buttons.find(btn =>
btn.classList.contains('green') || btn.querySelector('[class*="upload"]')
);
expect(uploadButton).toBeDisabled();
});