Streaming timeline
A garden taking shape, one update at a time.
Fictional data. 24 updates in about 9 seconds.
AddedChangedRemoved
Key CSS & implementation tricks
// One stream: empty → groups → late group → date → reorder.
groups = [];
{ type: 'add_group', group: { ...header, items: [] } }
{ type: 'add_item', groupId: header.id, item }
// The late group is appended before its date is known.
groups = receiveGroupDate(groups, lateGroup.id, receivedDate);
/* Reserve a quiet space before the first group arrives. */
.timeline-list { min-height: 180px; }// Date metadata arrives: detect and correct in the same handler.
groups = receiveGroupDate(groups, event.groupId, event.sortDate);
// Stable IDs, chronological order. Undated groups stay last.const before = layoutSnapshot();
timelineList.append(...orderedNodes); // Same nodes, new order.
const after = layoutSnapshot();
// FLIP: invert the displacement, then animate back to zero.
node.animate([
{ transform: `translate(0, ${beforeY - afterY}px)` },
{ transform: 'translate(0, 0)' }
], { duration: 640, easing: 'cubic-bezier(.22,1,.36,1)' });playbackToken += 1; // Invalidate the old stream on reset.
if (token !== playbackToken) return;
@media (prefers-reduced-motion: reduce) {
.timeline-group { animation: none; }
}