Skip to content

feat(timeline): add day-jump toolbar with dated labels#202

Merged
chiptus merged 16 commits into
mainfrom
claude/188-193-day-jump-toolbar
Jul 19, 2026
Merged

feat(timeline): add day-jump toolbar with dated labels#202
chiptus merged 16 commits into
mainfrom
claude/188-193-day-jump-toolbar

Conversation

@chiptus

@chiptus chiptus commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Adds a slim sticky toolbar above the Timeline strip with one button per festival day (weekday + date, e.g. "Thu 13"). Tapping a day writes scrollTo and smooth-scrolls the strip to that day's first set, via a new jumpTo(moment: Date) returned from useTimelineScrollSync.

Design notes: the day list comes from the unfiltered scheduleDays (from useScheduleData) so it reflects the actual festival-timezone days; when a day filter is active only that day's button renders (nav operates on what's rendered, never filters). The jump target is the day's earliest set start (falling back to festival-timezone midnight for a dayless day) since that's what a viewer actually wants centered. jumpTo writes scrollTo immediately via history replace and relies on the existing scroll debounce to settle on the same value once the smooth-scroll animation finishes — no new suppression state needed.

Stacked on #192 (claude/188-192-scrollto-url-state) — this PR's diff is scoped to the day-jump toolbar; #192's changes will disappear from the diff once that PR merges.

Closes #193

Verification

  • Open the timeline: a sticky toolbar renders above the strip with one button per festival day, labeled e.g. "Sat 12", "Sun 13", "Mon 14".
  • Click a day button: the strip smooth-scrolls to that day's first set and the URL gains a scrollTo param.
  • Apply a day filter (e.g. via the existing day select): only that day's button remains in the toolbar.
  • Scroll the toolbar does not visually collide with the sticky time-axis date labels in TimeScale.tsx.
  • pnpm run lint, pnpm run typecheck, and pnpm vitest run all pass.

Generated by Claude Code

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
upline Ready Ready Preview, Comment Jul 19, 2026 7:50pm

Comment thread src/hooks/useTimelineScrollSync.ts Outdated
Comment thread src/lib/timelineDayJump.test.ts Outdated
Comment thread src/lib/timelineDayJump.ts Outdated
Comment thread src/pages/EditionView/tabs/ScheduleTab/horizontal/TimelineContainer.tsx Outdated
Comment thread src/hooks/useTimelineScrollSync.ts Outdated
Comment thread src/hooks/useTimelineScrollSync.ts Outdated
Comment thread src/hooks/useTimelineUrlState.ts Outdated
Comment thread src/lib/timelineDayJump.test.ts Outdated
Comment thread src/lib/timelineDayJump.ts Outdated
Comment thread tests/e2e/timeline-day-toolbar.spec.ts
Comment thread tests/e2e/timeline-day-toolbar.spec.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Comment thread src/hooks/useTimelineJump.ts Outdated
Comment thread src/__tests__/fixtures.ts
Comment thread src/hooks/useTimelineJump.ts Outdated
Comment thread src/lib/timelineCalculator.test.ts
Comment thread src/pages/EditionView/tabs/ScheduleTab/horizontal/DayJumpButtons.tsx Outdated
Comment thread tests/e2e/timeline-day-toolbar.spec.ts Outdated
claude added 5 commits July 19, 2026 05:17
Adds a sticky toolbar above the Timeline strip with one button per
festival day; tapping a day jumps the strip to that day's first set
via jumpTo() on useTimelineScrollSync.
defaultStructuralSharing is set globally on the router in main.tsx.
useTimelineScrollSync now owns only the passive URL <-> scroll sync;
imperative jumpTo moves to a new useTimelineJump hook.
Dedupes the inline ScheduleDay literals in timelineCalculator.test.ts
and timelineDayJump.test.ts's buildDay into one makeScheduleDay helper.
claude added 5 commits July 19, 2026 05:17
Adds role="toolbar" + an aria-label to TimelineToolbar so the e2e
spec can select it via getByRole instead of a test id.
A missing/broken seed should surface as a failure, not a quiet skip
that masks a real regression.
This structuralSharing addition belonged to the earlier scrollTo
URL-state work (#192/#201), not the day-jump toolbar; it was leftover
diff noise picked up before the branch was rebased onto main.
- Drop the redundant scrollTo write in useTimelineJump; the scroll-driven
  debounce in useTimelineScrollSync already settles on the same value.
- Move the ScheduleDay test fixture to src/__tests__/fixtures.ts.
- Scope StageLabels' absolute positioning to the scroll container instead
  of the shared wrapper, so the new sticky toolbar no longer pushes it out
  of alignment with the date label and stage rows.
- Give day-jump buttons an explicit transparent background so they're not
  unreadable white-on-white against the dark toolbar.
- Give the e2e day-toolbar spec's initial container check a more generous
  timeout to reduce cross-browser CI flakiness.
- Day-jump buttons now highlight the day currently in view, tracked via
  a new useActiveTimelineDay hook that follows scroll position.
- jumpTo gained a "start" alignment mode: day jumps now land the target
  moment near the left edge (offset by a gutter that clears the pinned
  StageLabels column) instead of centering, per feedback that centering
  buried the target day mid-viewport and let early sets hide behind the
  stage-name badges.
- Share the gutter constant between useTimelineJump and
  useActiveTimelineDay so the active-day highlight and the actual scroll
  landing position never drift apart.
- Inline useTimelineJump into a plain jumpToTimelineMoment function in
  timelineDayJump.ts; it held no state/effects so didn't need to be a hook.
- Move makeStage into shared src/__tests__/fixtures.ts alongside makeScheduleDay.
- Drop the now-unused data-testid on day-jump buttons (specs use getByRole).
- Model the day-jump toolbar as a radiogroup of radio buttons instead of a
  plain toolbar/button list, and update the e2e spec's locators to match.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.

chiptus and others added 2 commits July 19, 2026 16:58
getDayJumpMoment targeted the global earliest set start, which landed
the day jump on sparse midnight/pre-dawn sets (dead far-left timeline).
Target the modal opening — the time the most stages start — instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread src/__tests__/fixtures.ts
Comment thread src/lib/timelineCalculator.test.ts
getFestivalDayKey's no-timezone fallback formats in the local zone, so
the 'UTC calendar day' test only passed on UTC machines (e.g. CI) and
failed on local dev in other zones. Pin TZ=UTC in the shared test setup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the eight outlined pill buttons with a stacked weekday/date rail
marked by an underline on the active day, and add a divider wherever the
festival's days are not calendar-adjacent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chiptus
chiptus requested a review from Copilot July 19, 2026 20:20
@chiptus
chiptus merged commit fdb295e into main Jul 19, 2026
7 of 11 checks passed
@chiptus
chiptus deleted the claude/188-193-day-jump-toolbar branch July 19, 2026 20:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.

chiptus pushed a commit that referenced this pull request Jul 20, 2026
The day-jump-toolbar feature (#202) was substantially reworked after this
branch's own commits stopped: active-day tracking (useActiveTimelineDay),
radiogroup/radio a11y semantics, a "modal opening" day-jump target instead
of the global-earliest set, a restyled weekday/date rail, a repositioned
StageLabels column, and global router structuralSharing. This branch's
diff-based rebase preserved this branch's own (now-stale) versions of those
files, which would have regressed all of the above on merge.

Restore every file this PR doesn't need to touch to main's exact content,
and re-wire only the overview mini-map on top of it:
- TimelineToolbar now nests the day radiogroup and appends the overview
  toggle as a sibling, instead of replacing the toolbar's semantics.
- TimelineContainer keeps main's useActiveTimelineDay + StageLabels wiring
  and drives both the day buttons (start-aligned) and the overview map
  (center-aligned) through the same jumpToTimelineMoment call.
- Dropped the now-unnecessary useTimelineScrollSync.jumpTo/structuralSharing
  additions and the standalone getFestivalDayShortLabel helper.
- e2e specs for both the day toolbar and the overview map now match main's
  "fail loudly instead of silently skipping" convention.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: day-jump toolbar with dated labels on the Timeline

3 participants