Row height is a resolver
Context
Every Row had one height from --fg-row-height. A consumer app has Rows of several kinds: a group Row, a Row with one Lane, and a Row with two Lanes. The height index (PrefixSumHeightIndex) already takes a height per Row. No public option reached it.
Decision
gantt.rowHeight = 32;
gantt.rowHeight = (ctx: RowHeightContext) => number;
interface RowContext {
entry: Entry | undefined;
kind: PlannedRowKind;
depth: number;
}
interface RowHeightContext extends RowContext {
laneCount: number; // 0 when the Row has no Lanes
defaultHeight: number; // the --fg-row-height value
laneHeight: number | undefined; // derived from the Lane tokens
}
- The resolver runs once per layout pass, never per frame.
- A number keeps today's behaviour.
laneHeightis the px height the Lane formula gives. A resolver writesctx => ctx.laneHeight ?? 48. It does not repeat the formula.- With no
rowHeight,--fg-row-heightsets every Row.
Options rejected
- A per-Entry
rowHeightField. It puts a display value into authored data. - A token only. A token cannot change per Row.
- A resolver with no
laneHeight. Every consumer would copy the Lane formula.
Consequences
- A Row is as tall as the resolver says. Content taller than the Row clips. That is a consumer choice.