fix(WhereUI): Keep the timeline focused on recent stays - #222
Conversation
kyleve
left a comment
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
Summary
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
Testing
./swiftformat --lint./test WhereUITests— 420 tests passed./test --snapshots --only 'WhereUISnapshotTests/PresenceTimelineListSnapshotTests' --review— every capture matched its reference byte for byte