From d9094c24ec985e9aa348dc0eb8bd36af64e24a1d Mon Sep 17 00:00:00 2001 From: Kyle Van Essen Date: Sun, 9 Aug 2026 15:48:12 -0700 Subject: [PATCH 1/2] Keep the timeline focused on recent stays --- ...ntiateWithoutColorInitialBottom_iPhone.png | 3 + ...eWithoutColorInitialBottom_iPhone_dark.png | 3 + ....DifferentiateWithoutColor_iPhone_dark.png | 2 +- .../presenceTimeline.InitialBottom_iPad.png | 3 + ...eline.InitialBottom_iPad_accessibility.png | 3 + ...resenceTimeline.InitialBottom_iPad_ax5.png | 3 + ...ceTimeline.InitialBottom_iPad_contrast.png | 3 + ...esenceTimeline.InitialBottom_iPad_dark.png | 3 + .../presenceTimeline.InitialBottom_iPhone.png | 3 + ...ine.InitialBottom_iPhone_accessibility.png | 3 + ...senceTimeline.InitialBottom_iPhone_ax5.png | 3 + ...Timeline.InitialBottom_iPhone_contrast.png | 3 + ...enceTimeline.InitialBottom_iPhone_dark.png | 3 + .../presenceTimeline.WithData_iPad.png | 4 +- ...ceTimeline.WithData_iPad_accessibility.png | 4 +- ...resenceTimeline.WithData_iPad_contrast.png | 4 +- .../presenceTimeline.WithData_iPad_dark.png | 4 +- .../presenceTimeline.WithData_iPhone.png | 4 +- ...Timeline.WithData_iPhone_accessibility.png | 4 +- ...senceTimeline.WithData_iPhone_contrast.png | 4 +- .../presenceTimeline.WithData_iPhone_dark.png | 4 +- .../Primary/PresenceTimelineList.swift | 56 ++++++++++++++++--- .../Sources/Shared/WhereStylesheet.swift | 5 ++ .../WhereUI/Tests/WhereStylesheetTests.swift | 3 + 24 files changed, 110 insertions(+), 24 deletions(-) create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColorInitialBottom_iPhone.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColorInitialBottom_iPhone_dark.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_accessibility.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_ax5.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_contrast.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_dark.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_accessibility.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_ax5.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_contrast.png create mode 100644 Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_dark.png diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColorInitialBottom_iPhone.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColorInitialBottom_iPhone.png new file mode 100644 index 000000000..59a46328d --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColorInitialBottom_iPhone.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee505314f5cc0789d177cdce19e64c7312221e0b46d332f67afadce3437b4280 +size 339979 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColorInitialBottom_iPhone_dark.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColorInitialBottom_iPhone_dark.png new file mode 100644 index 000000000..2f3d98b02 --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColorInitialBottom_iPhone_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c71240669479a28e3ccbeb58a7ccd8d42cdc49421e924979625224c0a1229ed +size 278608 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColor_iPhone_dark.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColor_iPhone_dark.png index 7300449a4..955f3863b 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColor_iPhone_dark.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.DifferentiateWithoutColor_iPhone_dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2124f91e6cf40a7328980061e6eae967ad4e2d2473e8818762b24841e237a6ac +oid sha256:5d96311b839ae7c7dc5f4c2dac48a107548972fd098f47dcd3b295703173446a size 348712 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad.png new file mode 100644 index 000000000..7f55da383 --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20272851632b4dfaa4b5d11604028f6a3dfbe7a1526357fc130617951fe1345b +size 402883 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_accessibility.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_accessibility.png new file mode 100644 index 000000000..16f95f675 --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_accessibility.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99c63924ec954333b352bf5d1a7bfc27c1acf7345dbc97dc32e7096612df69c4 +size 559373 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_ax5.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_ax5.png new file mode 100644 index 000000000..4c14a8532 --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_ax5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f798ac1e557eb7b32ab9a844eba0e8fa8d6c06f6d2847575b6599912711c7c42 +size 863777 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_contrast.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_contrast.png new file mode 100644 index 000000000..6c7dcc91d --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_contrast.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c5572f2ae67984cbf853ce869d88df5535786a6b9c20989d93aea6ad027d08a +size 406490 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_dark.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_dark.png new file mode 100644 index 000000000..bbb71c54d --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPad_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:067cd0279c28d20cb9f2463ef1efe11d16bc6ba2fada5ea8c88cfb6df0176b27 +size 409025 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone.png new file mode 100644 index 000000000..0e5dac828 --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f22d1b76657ddd14edae2e31fa21506ce05a3275a65cca8ee108f3b6e4a95932 +size 236648 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_accessibility.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_accessibility.png new file mode 100644 index 000000000..073995993 --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_accessibility.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8acc41f2f1a9d39835f95aa634f338274b691a2716d1c481579182afaf3d3502 +size 377102 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_ax5.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_ax5.png new file mode 100644 index 000000000..2c19b28d8 --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_ax5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b67d76931d2c129d440eaac94236fd00c438a7cef0d8482f1057bcd75f8bec03 +size 528633 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_contrast.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_contrast.png new file mode 100644 index 000000000..cfe945774 --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_contrast.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef6d0abc5209dff848895d8b6801aa3d6a86be6d7f7f5fa0696878007ab424ff +size 241164 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_dark.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_dark.png new file mode 100644 index 000000000..eb4b2ddd1 --- /dev/null +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af3631da307de57f97ee9b0211f6ee49e057d4f4e110ebbfecfb1b661d7c86a4 +size 239925 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad.png index a84c68ebc..7f55da383 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4569bd580bd861c4945bcfeea07eadfac11438d7e4ccf442e6ee27d49d413f6 -size 402720 +oid sha256:20272851632b4dfaa4b5d11604028f6a3dfbe7a1526357fc130617951fe1345b +size 402883 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_accessibility.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_accessibility.png index 39728506e..16f95f675 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_accessibility.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_accessibility.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:461168efd6ef1ce6b83ee2ebb9e74dcc511fc0a201d343ffc8f5e10a55a6053f -size 731603 +oid sha256:99c63924ec954333b352bf5d1a7bfc27c1acf7345dbc97dc32e7096612df69c4 +size 559373 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_contrast.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_contrast.png index ae9ac98cc..6c7dcc91d 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_contrast.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_contrast.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbd813ec59a9bc5849f08c747b371463fd91503f9ffff621eb48d81ebbdfd28d -size 406266 +oid sha256:1c5572f2ae67984cbf853ce869d88df5535786a6b9c20989d93aea6ad027d08a +size 406490 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_dark.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_dark.png index f9181686c..bbb71c54d 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_dark.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPad_dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e659718381be34e7be38e563ed45c683360a3dae77d64519148d6cc6ce51880 -size 408988 +oid sha256:067cd0279c28d20cb9f2463ef1efe11d16bc6ba2fada5ea8c88cfb6df0176b27 +size 409025 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone.png index 375fdb2f5..07a82dee1 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fef1f96480d98d6ae1d495b0688a19ad65d5e4b8fb2b938e587f8a214cc9b64d -size 279465 +oid sha256:5034d3b60d0e641df3da6db6f6a6961cf3a465f5b5d764d65ef343e04a959c31 +size 279459 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_accessibility.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_accessibility.png index bc9763d72..e0a668ccf 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_accessibility.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_accessibility.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab7e56a5c992d95bb359f74b6a5fc4d07d20b849b4d9e546055c270791b968ed -size 518094 +oid sha256:2f28b0cda8c0ccf0c9fe4e54bd2faa3a147db1cd784498fcd37229450f0c854c +size 416730 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_contrast.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_contrast.png index 0c826bd0f..fda3ddd77 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_contrast.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_contrast.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45a17777fa02580171600d991d436faf7eae66461254837eeda3a9bf48f5cdfd -size 284173 +oid sha256:3d4e09a622c766f7bc0de77cdf118374c405dbd9a74978ad626a73691895c285 +size 284158 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_dark.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_dark.png index 5e18a3759..17e98a193 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_dark.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.WithData_iPhone_dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe0482abd4bab507b715dc2eab298596756d4e6922aa469cccd8d9dcff58fa81 -size 282763 +oid sha256:88e2657da02f2f47465d3abe71c61f1d096a9a3817fae750ab7eb32ade302019 +size 282703 diff --git a/Where/WhereUI/Sources/Primary/PresenceTimelineList.swift b/Where/WhereUI/Sources/Primary/PresenceTimelineList.swift index 32026fb4e..6fa69025e 100644 --- a/Where/WhereUI/Sources/Primary/PresenceTimelineList.swift +++ b/Where/WhereUI/Sources/Primary/PresenceTimelineList.swift @@ -29,13 +29,17 @@ struct PresenceTimelineList: View { Text(String(localized: .timelineEmptyDescription)) } } else { + let pinsOverview = stylesheet.timeline.overview.pinsToViewport + ScrollView { - LazyVStack(spacing: stylesheet.spacing.large) { - YearRibbon( - days: yearReport?.days ?? [], - year: report.selectedYear, - calendar: report.calendar, - ) + LazyVStack(spacing: pinsOverview ? 0 : stylesheet.spacing.large) { + if !pinsOverview { + YearRibbon( + days: yearReport?.days ?? [], + year: report.selectedYear, + calendar: report.calendar, + ) + } LazyVStack(spacing: 0) { ForEach(stints.enumerated(), id: \.element.id) { index, stint in @@ -50,8 +54,28 @@ struct PresenceTimelineList: View { } } .padding(.horizontal, stylesheet.spacing.xxLarge) - .padding(.vertical, stylesheet.spacing.large) + .padding(.top, pinsOverview ? 0 : stylesheet.spacing.large) + .padding(.bottom, stylesheet.spacing.large) } + .safeAreaInset( + edge: .top, + spacing: 0, + ) { + if pinsOverview { + YearRibbon( + days: yearReport?.days ?? [], + year: report.selectedYear, + calendar: report.calendar, + ) + .padding(.horizontal, stylesheet.spacing.xxLarge) + .padding(.top, stylesheet.spacing.large) + .padding(.bottom, stylesheet.spacing.large) + .frame(maxWidth: .infinity) + .background(Color(.systemBackground)) + } + } + .defaultScrollAnchor(.bottom, for: .initialOffset) + .id(report.selectedYear) } } } @@ -65,6 +89,11 @@ struct PresenceTimelineList: View { PresenceTimelineList(report: PreviewSupport.loadedYearReportModel()) } }, + whereSnapshot(name: "InitialBottom", configurations: .screenDefaults) { + NavigationStack { + PresenceTimelineList(report: PreviewSupport.loadedYearReportModel()) + } + }, whereSnapshot( name: "DifferentiateWithoutColor", configurations: .fullContentPhoneLightDark, @@ -78,6 +107,19 @@ struct PresenceTimelineList: View { overrides.accessibility = accessibility } }, + whereSnapshot( + name: "DifferentiateWithoutColorInitialBottom", + configurations: .phoneLightDark, + ) { + NavigationStack { + PresenceTimelineList(report: PreviewSupport.loadedYearReportModel()) + } + .bTraitOverrides { traits, overrides in + var accessibility = traits.accessibility + accessibility.shouldDifferentiateWithoutColor = true + overrides.accessibility = accessibility + } + }, ] } } diff --git a/Where/WhereUI/Sources/Shared/WhereStylesheet.swift b/Where/WhereUI/Sources/Shared/WhereStylesheet.swift index 9fbe09b86..6e506003e 100644 --- a/Where/WhereUI/Sources/Shared/WhereStylesheet.swift +++ b/Where/WhereUI/Sources/Shared/WhereStylesheet.swift @@ -42,6 +42,7 @@ struct WhereStylesheet: BStylesheet { // Grow day-grid tap targets at accessibility Dynamic Type sizes. if traits.contentSizeCategory.isAccessibilitySize { calendar.day.minHeight = 56 + timeline.overview.pinsToViewport = false timeline.row.stacksDayCount = true featureDiscovery.siri.bubble.indent = 0 } @@ -49,6 +50,7 @@ struct WhereStylesheet: BStylesheet { // Give every region a consistently labeled ribbon band when tint // alone is not an acceptable differentiator. if traits.accessibility.shouldDifferentiateWithoutColor { + timeline.overview.pinsToViewport = false timeline.ribbon.separatesRegions = true } @@ -1163,6 +1165,8 @@ extension WhereStylesheet { var border: Color var borderWidth: CGFloat var yearFont: Font + /// Keep the compact overview visible while the journey scrolls. + var pinsToViewport: Bool } struct Ribbon: Equatable { @@ -1219,6 +1223,7 @@ extension WhereStylesheet { border: Color.primary.opacity(0.1), borderWidth: 1, yearFont: .system(.title2, design: .serif).bold(), + pinsToViewport: true, ), ribbon: Ribbon( monthLabelSpacing: 6, diff --git a/Where/WhereUI/Tests/WhereStylesheetTests.swift b/Where/WhereUI/Tests/WhereStylesheetTests.swift index 8e7e703ba..f5b35288f 100644 --- a/Where/WhereUI/Tests/WhereStylesheetTests.swift +++ b/Where/WhereUI/Tests/WhereStylesheetTests.swift @@ -295,6 +295,7 @@ struct WhereStylesheetTests { #expect(overview.border == Color.primary.opacity(0.1)) #expect(overview.borderWidth == 1) #expect(overview.yearFont == .system(.title2, design: .serif).bold()) + #expect(overview.pinsToViewport) let ribbon = timeline.ribbon #expect(ribbon.monthLabelSpacing == 6) @@ -604,6 +605,7 @@ struct WhereStylesheetTests { context.traitOverrides.contentSizeCategory = .accessibilityLarge let resolved = try context.stylesheets.get(WhereStylesheet.self) #expect(resolved.calendar.day.minHeight == 56) + #expect(resolved.timeline.overview.pinsToViewport == false) #expect(resolved.timeline.row.stacksDayCount) #expect(resolved.featureDiscovery.siri.bubble.indent == 0) #expect(resolved.featureDiscovery.widgets.contentWidth(in: 834) == 320) @@ -627,6 +629,7 @@ struct WhereStylesheetTests { shouldDifferentiateWithoutColor: true, ) let resolved = try context.stylesheets.get(WhereStylesheet.self) + #expect(resolved.timeline.overview.pinsToViewport == false) #expect(resolved.timeline.ribbon.separatesRegions) } From e809ceec84e8a181df900cd08ebc84d638081fbb Mon Sep 17 00:00:00 2001 From: Kyle Van Essen Date: Sun, 9 Aug 2026 17:51:10 -0700 Subject: [PATCH 2/2] Float the timeline overview over its journey --- .../presenceTimeline.InitialBottom_iPhone.png | 4 ++-- ...resenceTimeline.InitialBottom_iPhone_accessibility.png | 4 ++-- .../presenceTimeline.InitialBottom_iPhone_contrast.png | 4 ++-- .../presenceTimeline.InitialBottom_iPhone_dark.png | 4 ++-- Where/WhereUI/Sources/Primary/PresenceTimelineList.swift | 2 -- Where/WhereUI/Sources/Primary/YearRibbon.swift | 8 ++++++-- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone.png index 0e5dac828..6df691c69 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f22d1b76657ddd14edae2e31fa21506ce05a3275a65cca8ee108f3b6e4a95932 -size 236648 +oid sha256:0a68844f6d6c82cba8afa5716dd3d7165adc0c0387b93aef2c142d78c22dce26 +size 337455 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_accessibility.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_accessibility.png index 073995993..6766fd91f 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_accessibility.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_accessibility.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8acc41f2f1a9d39835f95aa634f338274b691a2716d1c481579182afaf3d3502 -size 377102 +oid sha256:bf83769d3ccf05b1917b2ce4549cd93cdcb181f5240b9b9c99243e705737eeef +size 409298 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_contrast.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_contrast.png index cfe945774..e7ce6e6cf 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_contrast.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_contrast.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef6d0abc5209dff848895d8b6801aa3d6a86be6d7f7f5fa0696878007ab424ff -size 241164 +oid sha256:474584fe1efd0e60bddd8a4db171c2424b0fa12d05df7f69c7c84df5ee3e4641 +size 357208 diff --git a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_dark.png b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_dark.png index eb4b2ddd1..4215c8335 100644 --- a/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_dark.png +++ b/Where/WhereUI/SnapshotTests/__Snapshots__/PresenceTimelineListSnapshotTests/presenceTimeline.InitialBottom_iPhone_dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af3631da307de57f97ee9b0211f6ee49e057d4f4e110ebbfecfb1b661d7c86a4 -size 239925 +oid sha256:de117cbed97fbe802bfb8eef01f98b6a36c7fcaa74b647e05af22b0fe4b6ca84 +size 277973 diff --git a/Where/WhereUI/Sources/Primary/PresenceTimelineList.swift b/Where/WhereUI/Sources/Primary/PresenceTimelineList.swift index 6fa69025e..5b4263b86 100644 --- a/Where/WhereUI/Sources/Primary/PresenceTimelineList.swift +++ b/Where/WhereUI/Sources/Primary/PresenceTimelineList.swift @@ -70,8 +70,6 @@ struct PresenceTimelineList: View { .padding(.horizontal, stylesheet.spacing.xxLarge) .padding(.top, stylesheet.spacing.large) .padding(.bottom, stylesheet.spacing.large) - .frame(maxWidth: .infinity) - .background(Color(.systemBackground)) } } .defaultScrollAnchor(.bottom, for: .initialOffset) diff --git a/Where/WhereUI/Sources/Primary/YearRibbon.swift b/Where/WhereUI/Sources/Primary/YearRibbon.swift index b1418e287..e3483a9e1 100644 --- a/Where/WhereUI/Sources/Primary/YearRibbon.swift +++ b/Where/WhereUI/Sources/Primary/YearRibbon.swift @@ -73,8 +73,12 @@ struct YearRibbon: View { } .padding(overview.padding) .background { - RoundedRectangle(cornerRadius: overview.cornerRadius) - .fill(overview.background) + ZStack { + RoundedRectangle(cornerRadius: overview.cornerRadius) + .fill(.background) + RoundedRectangle(cornerRadius: overview.cornerRadius) + .fill(overview.background) + } } .overlay { RoundedRectangle(cornerRadius: overview.cornerRadius)