mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 16:06:19 -05:00
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:
parent
87a6a34d68
commit
41b789bf8f
3 changed files with 171 additions and 205 deletions
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue