Skip to content

0.21.0 — Timeline overhaul Phase 2

Choose a tag to compare

@CinimoDY CinimoDY released this 29 Apr 20:34
· 68 commits to main since this release
0ea5def

Two new TimelineContainer capabilities for pluggable content + paginated reads.

Highlights

renderEntry prop

Pluggable per-entry renderer with a defaultRender() opt-in. Lets consumers swap the default TimelineEntryCard for any custom node — blog posts, photos, financial records, anything domain-specific. Threads through MonthView, DayView, HourView, and static mode. Year view is unaffected (renders bucket counts, not entries).

<TimelineContainer
  entries={entries}
  renderEntry={(entry, ctx) =>
    entry.type === 'photo'
      ? <PhotoCard entry={entry} expanded={ctx.isExpanded} />
      : ctx.defaultRender()
  }
/>

New types: TimelineEntryRenderContext, TimelineRenderEntry.

mode="feed"

Paginated, expandable vertical-list mode for changelogs, devlogs, and notification feeds. Entries collapsed by default, click to expand, DOS-styled LOAD MORE... button at the bottom. Distinct from static (always-expanded, no pagination) and interactive (multi-zoom).

<TimelineContainer
  entries={posts}
  mode="feed"
  pageSize={10}
  onLoadMore={(count) => fetchMore()}
/>

pageSize clamped ≥1; onLoadMore fires once per real advance (StrictMode-safe). Append flow works correctly: visibleCount is preserved when entries grows, so backend-pagination flows don't hide the just-fetched batch.

Dependency moves

  • Vite ^6.4.2^8.0.10. Verified dist/* parity: 54 named exports identical, ES bundle ~16% smaller from Rolldown's tree-shaking. Browser baseline raised to Chrome 107+ / Safari 16+ / Firefox 104+.
  • PostCSS 8.5.108.5.12 (patch).
  • Dependabot now ignores Tailwind major-version bumps (v4 migration is a deliberate project, not a bump).

Numbers

  • Tests: 942 → 958 (47 suites, 16 new)
  • Components: 36 (unchanged)
  • Bundle: ES index.es.js ~16% smaller, CSS and UMD essentially flat

See CHANGELOG for the full entry.