-
Notifications
You must be signed in to change notification settings - Fork 678
Description
Problem Description
The current timeline component only supports static item heights, where each item uses a single fixed height value.
This limitation prevents timelines from representing items of varying visual or content size, which reduces flexibility and expressiveness in use cases where item height should differ dynamically.
Proposed Solution
Introduce support for dynamic item sizing, allowing each timeline item to define its own height through a new optional height property. All layout-related calculations — including group height, item positioning, and collision detection — should leverage these per-item height values to ensure proper rendering and stacking.
With dynamic item heights, the existing gap calculation (lineHeight * (1 - itemHeightRatio)) will no longer produce consistent visual spacing, as it assumes a uniform height across all items. To address this, introduce a new timeline-level prop, itemVerticalGap, which defines a fixed vertical spacing between items regardless of their height.
Alternatives Considered
The current implementation does not include built-in support for dynamic item sizing, and no reliable workaround exists without altering core layout logic or breaking existing features.