Log Past: add date picker + equalise button widths - #28
Open
JWAY21 wants to merge 1 commit into
Open
Conversation
Log Past exposure sheet now has a DATE wheel picker (up to 7 days back) above the START/END TIME pickers. Selecting a past date re-clamps the time pickers into the valid range for that day and re-triggers the UV calculation. saveToHealth() now stamps the HealthKit entry at the correct historical date via the existing saveVitaminD(amount:date:) parameter. Begin and Log Past buttons are now equal-width (maxWidth: .infinity each) matching the Clothing/Sunscreen/Skin Type card row widths. Log Past gets an icon + text label to match Begin's style. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
?
…On Sat., Jul. 4, 2026, 4:52 p.m. JWAY21, ***@***.***> wrote:
Summary
- *Date selection in Log Past sheet* — a DATE wheel picker (up to 7
days back) now sits above the START/END TIME pickers. Users can select
yesterday (or any day within the past week) to log a session they missed —
e.g. when GPS didn't load in time. Selecting a past date re-clamps the
hour/minute pickers into the valid range for that day and immediately
re-runs the UV estimate. saveToHealth() stamps the HealthKit entry at
the correct historical start time via the existing
saveVitaminD(amount:date:) parameter.
- *Equal-width Begin / Log Past buttons* — the Log Past button was a
narrow fixed-width icon-only tile. Both buttons are now maxWidth:
.infinity (50/50 split), matching the Clothing/Sunscreen/Skin Type
card rows. Log Past gets an icon + "Log Past" text label to match Begin's
style.
Files changed
File Change
Sources/Views/ManualExposureSheet.swift sessionDate state +
combineDateAndTime helper; DATE wheel picker; updated time ranges;
effectiveStartTime/effectiveEndTime used throughout; saveToHealth passes
correct date
Sources/Views/ContentView.swift Log Past button: frame(width:60) →
frame(maxWidth:.infinity) + text label Test plan
- Open Log Past → DATE picker defaults to today, START = 1 hr ago, END
= now
- Scroll DATE to yesterday → time pickers re-clamp, UV recalculates
- Save a past-day session → HealthKit entry appears on the correct date
- Begin and Log Past buttons are visually equal width
- While actively tracking, Log Past is greyed out (existing behaviour
preserved)
🤖 Generated with Claude Code <https://claude.com/claude-code>
------------------------------
You can view, comment on, or merge this pull request online at:
#28
Commit Summary
- a31cc01
<a31cc01>
Add date picker to Log Past sheet; equalise Begin/Log Past button widths
File Changes
(2 files <https://github.com/jackjackbits/sunday/pull/28/files>)
- *M* Sources/Views/ContentView.swift
<https://github.com/jackjackbits/sunday/pull/28/files#diff-07af623ac9156117f01bff2444badae357d527361416f7e8391134a275e0d755>
(24)
- *M* Sources/Views/ManualExposureSheet.swift
<https://github.com/jackjackbits/sunday/pull/28/files#diff-8fc489ba3901c39e46d9e320666aafcd1bcc1f52ce079dd9ee6bba86ddd316f6>
(103)
Patch Links:
- https://github.com/jackjackbits/sunday/pull/28.patch
- https://github.com/jackjackbits/sunday/pull/28.diff
—
Reply to this email directly, view it on GitHub
<#28?email_source=notifications&email_token=BHQ4G45MIOOFHZTPSK5Q7VL5DGKCFA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF4ZTSOJSGEZDAMRXGKTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6Y3MNFRWW>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHQ4G462O4CETQF6ECZZZLD5DGKCFAVCNFSNUABGKJSXA33TNF2G64TZHMYTAMJYGI2DKMJYGI5US43TOVSTWNBYGEYDSMZZGMZDTILWAI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
saveToHealth()stamps the HealthKit entry at the correct historical start time via the existingsaveVitaminD(amount:date:)parameter.maxWidth: .infinity(50/50 split), matching the Clothing/Sunscreen/Skin Type card rows. Log Past gets an icon + "Log Past" text label to match Begin's style.Files changed
Sources/Views/ManualExposureSheet.swiftsessionDatestate +combineDateAndTimehelper; DATE wheel picker; updated time ranges;effectiveStartTime/effectiveEndTimeused throughout;saveToHealthpasses correct dateSources/Views/ContentView.swiftframe(width:60)→frame(maxWidth:.infinity)+ text labelTest plan
🤖 Generated with Claude Code