Android: Sleep screen — metric detail ModalBottomSheet#259
Conversation
…ckerDialog Redesigns NightNavHeader to match DayNavBar: left/right chevrons flanking an accent-tinted center block showing the night label and date. The time range moves to a separate row below. Tapping the block opens a DatePickerDialog to jump to any recorded night by calendar date. Also fixes nightOffset reset: moves it into LaunchedEffect(days) so it only resets on a real sync/import, not on every optimistic sleeps update.
|
Nice work — the metric-detail
This is the third rung of the Sleep stack and a subset of #260's surface, so same as #258: we're making one decision on #260 rather than merging the intermediate states. Holding open. Thanks for the thorough build-out. |
… card HoursVsNeededCard: score %, trend arrow, gradient progress bar, stacked component bar (Healthy / Strain / Debt), slept/needed/debt footer. SleepConsistencyCard: Canvas vertical bar chart (bed-time top, wake-time bottom), dashed typical overlay lines, Y-axis time labels, X-axis day labels. Score is count-based (nights where both bed and wake are within 45 min of the user's typical); the previous SD formula always returned 0 %.
bce2c87 to
ee5f57c
Compare
Each SparkTile in MetricGrid now accepts an onClick lambda; tapping any tile sets detailMetricKey and slides up a ModalBottomSheet scoped to SleepScreen. SparkTile gains an onClick param — when set, the card modifier gets .clickable so the whole tile is the touch target. AppRoot adds SleepMetricDetail as a nav destination (kept for deep-link compatibility). MainActivity adds KEY_LAST_JOURNAL_PROMPT to NoopPrefs.
ee5f57c to
b6bce17
Compare
|
Both issues addressed:
Branch updated and force-pushed. |
|
Thanks — |
What this PR does
Executive summary: Tapping any metric tile in Sleep Night Detail now slides up a
ModalBottomSheetwith a full trend chart and range selector instead of pushing a new screen.Details:
Sleep screen — metric detail
ModalBottomSheet— W / M / 3M / 6M / 1Y / ALL range selector, Y-axis labels, interactiveLineChart, X-axis dates, min/avg/max footerSparkTileaccepts an optionalonClick: (() -> Unit)?parameter; when provided the tile renders with aclickablemodifier; when null it is non-interactive (backwards compatible)AppRootandMainActivitywired to surface the bottom sheet callback through the nav graphValidation:
:app:assembleFullDebug,testFullDebugUnitTest, andtestDemoDebugUnitTestall green.Type of change
How it was tested
Android 16. Real Samsung device. WHOOP 4.0. Tested: all 8 metric tiles open correct sheet, range selector switches data, chart drag shows values, sheet dismisses on swipe-down and back gesture, sheet does not open for non-clickable tiles.
Checklist
swift testinPackages/<name>)android/(./gradlew testFullDebugUnitTest)StrandDesigntokens — no hardcoded colors, fonts, or spacingdocs/CONTRIBUTING.mdStrand.xcodeproj/) or any secrets/keystoresRelated issues