You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
health: split typical pill into bin-time + daily-total on wide displays
Redesign the activity-summary "typical" pill so it surfaces both the
bin-aware "by now" step count and the full-day weekday historical
average, side by side, on wide (>= 200px) displays. The header stays
"TYPICAL <day>"; below it a two-column row shows each number on top with
its label beneath (bin time | TOTAL) in black, separated by a 1px black
vertical divider. Narrower displays (incl. BW) stay two-line: TYPICAL
<day> over the daily total alone, since they lack room for the split.
Renderer (ui.c): split the single renderer into two functions sharing a
prv_render_typical_pill helper (background + "TYPICAL <day>" header):
- health_ui_render_typical_text_box draws one value line below the
header (35/36px pill).
- health_ui_render_split_typical_text_box draws the two-column split
(53px pill). It takes a value and label per column from the caller, so
it stays generic rather than steps-specific.
- Push the pill down by a third of HEALTH_Y_OFFSET (and the current step
count by a sixth) so spacing stays balanced on taller displays; zero
on legacy-sized displays where the offset is 0.
- On round, narrow the column band so the two halves sit closer to
center instead of marooned at the display edges.
Activity card: prv_render_typical_steps now formats the values and
labels (incl. i18n_get("TOTAL") and the bin time) and routes by display
width with #if DISP_COLS >= 200 -- wide gets the split, narrow shows the
daily total alone. Missing values fall back to an em-dash.
Data layer: add health_data_steps_get_current_average_minute, a
health-app-internal accessor returning the minute-of-day of the latest
completed step-average bin (cached by the preceding
health_data_steps_get_current_average call).
Sleep card: call the single-value renderer.
Test fixture: pin RTC to Saturday 16:19:35 UTC with 24h clock so the
rendered "16:15" bin time is deterministic; seed
step_average_last_updated_time per case. Regenerate activity, sleep, and
card-view goldens on obelix/gabbro.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Ave Özkal <git@ave.zone>
0 commit comments