# Production timeline

> One film's dates from first draft to release in lanes: phases as bars, dates as marks, today as a line.

Source: https://kwark.space/designSystem/components/production-timeline

## Usage

### When to use
The Calendar's Timeline view and the project overview: when the question is *how long is each phase and what lands where*. Lanes are kinds of thing (phases, shoot, prep marks, dates, meetings).

### When not to
- For scheduling hours. Use the week grid in [Production calendar](https://kwark.space/designSystem/components/production-calendar.md).
- For a generic task Gantt with dependencies. See [Gantt chart](https://kwark.space/designSystem/components/gantt-chart.md).

### Anatomy in use
- **Bars** run over days: phase colour at 32% with a 3px edge.
- **Marks** stand on one day: a 12px diamond.
- **Today**: a 2px line, the only red, labelled *Today*.
- **Months and weeks** in the header; weekends a faint step.

### Writing
Bars say what and how long: *Shoot, 18 days*. Marks carry their date in their name.

**Do:** *Shoot, 18 days* in sand, with *Festival submission, 18 Dec* as a mark.

**Don't:** Bars without labels, or a red bar because a phase is "late".

## Style

### Anatomy

Frame 12px corners; labels 96px sticky column; rows 30px; bars 20px tall at 5px; month header 30px.

### Tokens

| Token | Light | Dark |
|---|---|---|
| `--k-cal-writing` | #98633f | #e8b58b |
| `--k-cal-recce` | #4d6a7a | #83aac0 |
| `--k-cal-shoot` | #826d35 | #c4b068 |
| `--k-cal-deadline` | #a44a3f | #df8275 |
| `--k-danger` | #b4382c | #e0685c |
| `--k-line` | #e2e8f0 | rgba(255, 255, 255, .1) |

## Code

### React

In the Kwark app: `import { TimelineView } from '@/pages/PreProduction/ProjectCalendarModule/components/TimelineView'`.

```tsx
<TimelineView entries={entries} phases={phases} today={today} onSelect={open} />
```

| Prop | Type | Notes |
|---|---|---|
| `phases` | `Phase[]` | writing, development, financing, prep, shoot, post, release |

### HTML and CSS

Works anywhere with `kwark.css`.

```html
<div class="kw-gantt" aria-label="Blank Pages, September to December">
  <div class="kw-gantt__labels"><div></div><div>Phases</div><div>Shoot</div><div>Dates</div></div>
  <div class="kw-gantt__body">
    <div class="kw-gantt__months"><span style="left:0">Sep</span><span style="left:25%">Oct</span><span style="left:50%">Nov</span><span style="left:75%">Dec</span></div>
    <div class="kw-gantt__row"><button class="kw-gantt__bar kw-cat-writing" type="button" style="left:0;width:38%">Writing</button><button class="kw-gantt__bar kw-cat-recce" type="button" style="left:38%;width:16%">Prep</button></div>
    <div class="kw-gantt__row"><button class="kw-gantt__bar kw-cat-shoot" type="button" style="left:54%;width:24%">Shoot, 18 days</button></div>
    <div class="kw-gantt__row"><span class="kw-gantt__mark kw-cat-deadline" style="left:90%" title="Festival submission, 18 Dec"></span></div>
    <span class="kw-gantt__today" style="left:63%"><span>Today</span></span>
  </div>
</div>
```

## Accessibility

- Bars and marks are buttons named with dates.
- Provide the same data as the Next view list for screen-reader users; the timeline is a visual summary.
- The body scrolls sideways with arrow keys.

## For agents

### Rules

- **Must** label every bar with what and how long.
- **Never** colour a phase as late; only Today is red.
- **Always** offer the same data as a list.

### AI readiness test

**Task:** Show Blank Pages' phases on the project overview.

**Give the agent:** Production timeline, Production calendar.

**Constraint:** Post-production dates are not set.

**A reliable answer:**
- Phases with labels
- No bar for post until set
- Today line
- List equivalent available
