KQ-1694 · MOVING/DAY
Moving Day
The import step of moving into a new workspace: each category the old tool holds is a box with its count, and Start opens them in turn — the lid swings open on springs.snap, the count rolls up in tabular digits straight from a motion value, and the box's things leave it one by one, travelling into the new workspace's preview on springs.glide and landing on springs.recoil, before the box shuts with a tick drawn on springs.flick. A category too big to wait for keeps counting in the background behind a thin bar with a toast, and whatever could not move is listed with its reason for Retry. Start, Pause, Resume, Retry and Open are real buttons (the primary keeps focus as its label changes) and the source is a radiogroup the arrow keys move through.
Bring everything over
From Coldbrook Tasks to Fieldline · Harbour team · since 2022
ready · 16,250 items from coldbrook tasks
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/moving-day
Props
- sources
- MovingDaySource[]
- default defaultMovingDaySources
- The old tools to import from, { id, name, detail?, counts, blocked? }, each with a count per category and the items that cannot move.
- categories
- MovingDayCategory[]
- default defaultMovingDayCategories
- What moves, { id, label, unit, icon?, samples }, one box each in the order they open.
- source / defaultSource
- string
- default — / the first source
- The chosen source's id, controlled or initial.
- onSourceChange
- (id: string) => void
- default —
- Fires from the radio or arrow key that changed the source; only before the import starts.
- workspace
- string
- default "Fieldline"
- The new workspace's name, in the preview, the copy and the open button.
- onStart
- (sourceId: string) => void
- default —
- Start was pressed.
- onPause
- (sourceId: string) => void
- default —
- Pause was pressed; the open box's count holds where it is.
- onResume
- (sourceId: string) => void
- default —
- Resume was pressed; the count continues from the same number.
- onRetry
- (ids: string[]) => void
- default —
- Retry was pressed, with the ids of the items it tries again. Retryable ones move; the rest keep their reasons.
- onDone
- (summary: { moved: number; stayed: string[] }) => void
- default —
- Every box has finished, background ones included.
- onOpenWorkspace
- () => void
- default —
- The open-workspace button was pressed (offered as soon as the visible pass is done).
- pace
- number
- default 2400
- Items per second the simulated import moves; each box takes between 0.9 and 2.4 s.
- backgroundAbove
- number
- default 5000
- A category with more items than this moves in the background after its first share, with a toast.
- boxStyle
- "carton" | "crate" | "tote"
- default "carton"
- A carton whose flaps swing open, a slatted crate whose lid lifts and tilts, or a tote whose lid slides back.
- density
- "compact" | "cozy" | "roomy"
- default "cozy"
- Box size, row heights and spacing.
- tone
- "kraft" | "slate" | "cobalt" | "mint"
- default "kraft"
- The boxes' pigment, a hue at a fixed lightness shaded toward black in oklab, so it reads in both themes.
- status
- "ready" | "loading" | "error"
- default "ready"
- Whether the old tool's counts have arrived: loading draws skeleton boxes, error a message with Try again.
- onReload
- () => void
- default —
- Try again was pressed after the counts failed to load.
- maxHeight
- number
- default 560
- The tallest the step grows before its body scrolls, px.
- disabled
- boolean
- default false
- Nothing can be started or chosen; the step dims.
- className
- string
- default —
- Classes for the outer section.
| Prop | Type | Default | Description |
|---|---|---|---|
| sources | MovingDaySource[] | defaultMovingDaySources | The old tools to import from, { id, name, detail?, counts, blocked? }, each with a count per category and the items that cannot move. |
| categories | MovingDayCategory[] | defaultMovingDayCategories | What moves, { id, label, unit, icon?, samples }, one box each in the order they open. |
| source / defaultSource | string | — / the first source | The chosen source's id, controlled or initial. |
| onSourceChange | (id: string) => void | — | Fires from the radio or arrow key that changed the source; only before the import starts. |
| workspace | string | "Fieldline" | The new workspace's name, in the preview, the copy and the open button. |
| onStart | (sourceId: string) => void | — | Start was pressed. |
| onPause | (sourceId: string) => void | — | Pause was pressed; the open box's count holds where it is. |
| onResume | (sourceId: string) => void | — | Resume was pressed; the count continues from the same number. |
| onRetry | (ids: string[]) => void | — | Retry was pressed, with the ids of the items it tries again. Retryable ones move; the rest keep their reasons. |
| onDone | (summary: { moved: number; stayed: string[] }) => void | — | Every box has finished, background ones included. |
| onOpenWorkspace | () => void | — | The open-workspace button was pressed (offered as soon as the visible pass is done). |
| pace | number | 2400 | Items per second the simulated import moves; each box takes between 0.9 and 2.4 s. |
| backgroundAbove | number | 5000 | A category with more items than this moves in the background after its first share, with a toast. |
| boxStyle | "carton" | "crate" | "tote" | "carton" | A carton whose flaps swing open, a slatted crate whose lid lifts and tilts, or a tote whose lid slides back. |
| density | "compact" | "cozy" | "roomy" | "cozy" | Box size, row heights and spacing. |
| tone | "kraft" | "slate" | "cobalt" | "mint" | "kraft" | The boxes' pigment, a hue at a fixed lightness shaded toward black in oklab, so it reads in both themes. |
| status | "ready" | "loading" | "error" | "ready" | Whether the old tool's counts have arrived: loading draws skeleton boxes, error a message with Try again. |
| onReload | () => void | — | Try again was pressed after the counts failed to load. |
| maxHeight | number | 560 | The tallest the step grows before its body scrolls, px. |
| disabled | boolean | false | Nothing can be started or chosen; the step dims. |
| className | string | — | Classes for the outer section. |