Android: battery % and recorded-nights streak strip on Today screen#256
Android: battery % and recorded-nights streak strip on Today screen#256ujix wants to merge 2 commits into
Conversation
Wraps the HR line chart in a Row with a SpaceBetween Y-axis column (max/avg/min bpm) and adds an X-axis row below with three HH:mm time labels computed from the 5-minute bucket index. Enables selectionEnabled for tap/drag value inspection. Footer labels now show unit 'bpm'.
|
The live strap-battery % on the Today header is a genuinely nice touch, and The recorded-nights streak is the part that's a product-tone decision: streak/gamification mechanics change the feel of the app, so that's a deliberate call rather than something to quietly add. This PR also bundles the same |
Adds a compact status strip (top-right of content area) showing the live strap battery percentage (icon + %) when connected, and a fire icon with the total recorded-nights count. Fire turns red when the streak is >= 2 consecutive nights. nightStreak() walks the sorted day set from today backwards, allowing a one-day gap for the current live day.
a34518f to
ab13ed9
Compare
|
You're right — the branch was stacked on top of On the product-tone point about streak gamification — totally understand. Happy to keep this on hold alongside #255 while you settle the Today direction. |
|
Thanks for the clean rebase — isolating it to just the battery % + streak strip (off the |
…nment polish #255 (adapted from a community PR by ujix): replace the fixed 3-day selector with a DayNavBar — chevron prev/next + a date-picker jump, capped at today — on Android, plus a new shared StrandDesign DayNavBar and full day navigation wired into the iOS/macOS Today screen for parity. #256 (ujix): a live strap-battery % + recorded-nights streak strip on the Android Today header, with spoken accessibility labels. #234 (RichrdJ): iOS polish — unify the two Synthesis hero cards' alignment and give the manual-workout Avg HR / Calories fields equal widths.
…on, Live perf macOS CFBundle 99 / iOS projver 54 / Android versionCode 141. New: sleep-debt ledger (#242), daytime stress timeline (#239), recovery forecast (#240), day-by-day Today navigation (#255), Android battery+streak strip (#256). Improved: iOS/macOS Live-tab performance (#271). Fixed: iOS Today/manual-workout alignment (#234).
|
Adopted ✅ — battery % + recorded-nights streak strip (with a11y labels), shipped in v2.10.0, re-landed under the project account. Thank you! Closing as adopted. |
What this PR does
Executive summary: Adds a compact status strip at the top of the Today content area showing live strap battery percentage and a total-nights-recorded streak with a fire icon.
Details:
Today screen
Rowpinned to the top-right of the Today content area; visible whenever the strap is connectedBattery5Baricon when the strap is connected and battery level is availableLocalFireDepartmenticon — icon and count turnstatusCritical(red) when streak ≥ 2, gray otherwiseValidation:
:app:assembleFullDebug,testFullDebugUnitTest, andtestDemoDebugUnitTestall green.Type of change
How it was tested
Android 16. Real Samsung device. WHOOP 4.0. Tested: battery icon appears only when connected, streak count matches recorded nights, streak ≥ 2 triggers red color, strip absent when strap disconnected.
Checklist
swift testinPackages/<name>)android/(./gradlew testFullDebugUnitTest)StrandDesigntokens — no hardcoded colors, fonts, or spacingdocs/CONTRIBUTING.mdStrand.xcodeproj/) or any secrets/keystoresRelated issues