Appearance
Import browser
Pick a folder on a network drive and start importing it.
components-importbrowser--folder-selectedOpen in Storybook ↗When to use
- Importing a folder that already sits on a mounted network drive, such as a scanned batch or a magazine with its CSV or METS file.
When not to use
- Files on the user's own computer: use upload.
Anatomy
- Folder list: the drive's top-level folders as a folder tree. It scrolls when it is taller than three quarters of the window.
- Footer: a full-width Start import button that sticks to the bottom of the list. It stays disabled until a folder is selected.
The import browser is a field of a form: it sits in the form's dialog, under any other fields that form has.
Variants
| Variant | Lists | On Start import |
|---|---|---|
| Folder import | folders on the drive | imports the selected folder |
| Magazine with CSV | magazine folders | imports the folder with its CSV file |
| Magazine with METS | magazine folders | checks the form's other fields first, then imports the folder with its METS file |
Which variant shows depends on the form's field type.
States
| State | What you see | Trigger |
|---|---|---|
| Loading | a spinner instead of the list | opening |
| Folders | the folder tree; Start import disabled | folders loaded |
| Folder selected | the folder's row highlighted; Start import enabled | clicking a folder |
| No folders | No import directories available | the drive has no folders |
| Started | a notification, then the import's job page | the import starts |
| Failed | an error notification with the reason | the import cannot start |
components-importbrowser--loadingOpen in Storybook ↗components-importbrowser--no-foldersOpen in Storybook ↗When the import starts, the form closes and the job page opens, so people can follow the import there. If there is no job to open, the jobs list opens.
Keyboard & accessibility
- Start import is a native button: Tab reaches it, Enter or Space starts the import, and it is disabled until a folder is selected.
- Folders are selected and opened with the pointer; see the folder tree.
Content
- Error messages name the folder and what is wrong: Expected exactly 1 CSV file in {folder}, found {count}.
- Translation keys:
import.start-import,import.no-directories,import.error-csv-count.
Related
Folder tree · Upload · Modal