mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
The Insights tab strip carried fourteen pills end-to-end after the v1.4.32 wave-A HealthKit additions: Overview + thirteen metrics. On a `<sm` viewport that meant Overview + roughly two-and-a-half metric pills before the right-edge fade hid the rest. The five wave-A entries (HRV, Resting HR, Oxygen, Body Temperature, Active Energy) collapse behind a single "Vitals" / "Vitalwerte" parent pill that opens a popover sub-list. Each sub-page keeps its own URL and own page component — only the strip presentation changes, so deep-links, bookmarks, and the iOS app's surface paths all resolve unchanged. Implementation: - `SUB_PAGE_GROUP` + `SUB_PAGE_GROUP_ORDER` in `sub-page-metric.ts` flag a sub-page as belonging to a parent pill. Adding a new group is one row in `SUB_PAGE_GROUP` plus a matching label key under `insights.tabStrip.<group>Parent.*`. - `<InsightsTabStrip>` discriminated `TabEntry` union — flat `<Link>` pills coexist with `Popover`-driven group entries. Availability gating sits on the leaf slugs: the parent pill is only rendered when at least one of its children has data. - Parent-pill active state mirrors the URL — when a user is on any vital-sign sub-page, the parent pill carries `aria-current="page"` and the `border-primary` style so spatial orientation survives the collapse. Reduces the strip footprint from 14 to 10 entries when every metric has data — Overview + Blood Pressure + Pulse + Vitals (parent) + Weight + BMI + Workouts + Sleep + Mood + Medication. Per `.planning/research/v1434-r-2-carryover-scope.md` §8 and `.planning/round-v1433-audit-menu.md` §7.1 (item 1).