Skip to documentation

Design system / Organisms

Organism / Intake and review

ImportWorkspace

ImportWorkspace coordinates reviewed data imports and optional media attachment before separate catalogue publication.

ImportsOrganism

Intent and composition

The imports-owned assembly composes MappingEditor, ImportReview and ImportMedia. useImportWorkspace owns authorized job loading, validation and durable import/publication runs. useImportMedia owns the selected job's media lifecycle. Local inputs hold the chosen file, record kind, collection and program. This is a feature organism, not a generic template or a product instance that duplicates another component. Keep the tab open and foregrounded while the client drives processing; no background worker runs. Saved import records and attachment batches remain after interruption. Media attachment is optional and does not publish drafts.

Coordinated concerns: Private file staging, destination/mapping selection, validation, draft import, optional media attachment and separate catalogue publication.

The authorized route supplies tenantSlug. useImportWorkspace loads retained jobs and owns import/publication requests; useImportMedia owns job-scoped media requests. No Context or client store is introduced.

Authorized-context integration

Requires the authorized imports route. Mounting the workspace immediately loads jobs and destination choices, so it is not mounted publicly. The ImportMedia page shows the actual child with fictional read-only state, without a tenant or storage request.

Supported inputs and ownership

ImportWorkspace input summary
InputResponsibility
tenantSlugRequired authorized tenant context. The route and server operations enforce access independently of visible controls.
useImportWorkspaceLoads retained jobs and destination choices. A complete CSV/JSON file stages into one job; mapping, validation, run status and publication commands remain hook-owned.
useImportMediaResets local state when tenant/job changes. Preview restores saved attachment/error evidence for the selected job; reselect the matching manifest after reopening.
composition and stylingThe assembly supplies its own main and h2. Shared controls retain their theme tokens, fluid text sizes and native disabled/focus behavior. Do not override child internals.

This is an integration summary, not a replacement for the implementation's complete prop types. A disabled control or hidden destination does not enforce permission.

Using it in a page

Integrate the section through its supported props and context requirements. Routes supply permitted data; instances bind product copy and behavior; templates arrange slots. Keep feature hooks and operations with their feature owner. Generic layouts must not load business data or enforce product policy.

Related page assemblies: Reviewed data import and optional media.

Implementation

Repository path: src/components/imports/importWorkspace.tsx

All organisms
Current components and theme tokens. Fictional example data. Source views refresh on deployment; authors maintain contract notes.