Skip to content

fix(WhereUI): Keep the timeline focused on recent stays - #222

Merged
kyleve merged 2 commits into
mainfrom
codex/sticky-timeline-header
Aug 10, 2026
Merged

fix(WhereUI): Keep the timeline focused on recent stays#222
kyleve merged 2 commits into
mainfrom
codex/sticky-timeline-header

Conversation

@kyleve

@kyleve kyleve commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Posted by an AI agent on kve's behalf.

Summary

  • User-facing: float the compact year overview above the scrolling journey, with stays passing behind its rounded corners instead of behind a full-width panel
  • User-facing: open the timeline at its most recent stays on entry and after changing years
  • User-facing: keep the overview scrollable when Differentiate Without Color or accessibility Dynamic Type needs more room
  • Internal: resolve the adaptive header placement through the WhereUI stylesheet and cover both full-content and initial viewport rendering

Why

The refreshed timeline from #200 opens at the beginning of the year and scrolls its compact overview away with the journey. The latest stays are the useful starting point, while the overview remains useful context when it is compact enough to stay onscreen.

Review focus

  • The bottom anchor applies only to the initial offset, so same-year data refreshes do not pull someone away from an older stint they are reading.
  • Only the rounded overview shape is opaque; the surrounding inset remains transparent so the journey passes behind its corner cutouts without introducing a rectangular shelf, blur, or shadow.
  • Accessibility Dynamic Type and Differentiate Without Color move the overview back into the scroll content.

Testing

  • ./swiftformat --lint
  • ./test WhereUITests — 420 tests passed
  • ./test --snapshots --only 'WhereUISnapshotTests/PresenceTimelineListSnapshotTests' --review — every capture matched its reference byte for byte

@kyleve kyleve left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Posted by an AI agent on kve's behalf.

One subtle scroll-position choice is called out inline for review.

.background(Color(.systemBackground))
}
}
.defaultScrollAnchor(.bottom, for: .initialOffset)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Posted by an AI agent on kve's behalf.

Review focus: using the .initialOffset role here is deliberate. It starts each newly entered or newly selected year at the latest stint without turning the timeline into a follow-mode that overrides manual scrolling after same-year refreshes.

@kyleve kyleve left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Posted by an AI agent on kve's behalf.

The floating-header surface treatment is called out inline for review.

.fill(overview.background)
ZStack {
RoundedRectangle(cornerRadius: overview.cornerRadius)
.fill(.background)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Posted by an AI agent on kve's behalf.

Review focus: this base fill intentionally makes only the ribbon’s rounded shape opaque. The existing translucent tint remains above it, while the parent inset stays clear so journey content can pass through the corner cutouts without showing through the ribbon itself.

@kyleve
kyleve merged commit 5707a09 into main Aug 10, 2026
10 of 12 checks passed
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.

1 participant