docs(countdown): explain why the sticky offset is measured

The group card scales with the viewport, grows while live and wraps on
long titles, measuring between 91px and 171px. A constant would leave
the running event behind the pinned header.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjX7D56AW8cL3FXjvtnjtL
This commit is contained in:
Claude
2026-08-12 05:19:22 +00:00
parent e4cfa1d17d
commit 0106145a45
@@ -53,7 +53,10 @@ export default function CountdownSubscriptions({ subscribedEvents, goToEditMode
const sections = useMemo(() => groupSubscriptionTargets(subscribedEvents), [subscribedEvents]);
// the group of the running event is pinned to the top of the list, the running event needs to clear it
// The group of the running event is pinned to the top of the list, the running event needs to clear it.
// This is measured rather than estimated: the card scales with the viewport (the font sizes are clamped
// against vw), it grows while live since the running event's title is added, and long titles wrap.
// Measured between 91px and 171px, so a constant would leave the running event behind the header.
const getStickyOffset = useCallback(() => {
const header = stickyHeaderRef.current;
// account for the row margin, so that the rows do not touch