mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 22:50:51 +00:00
fix(ui): draw no empty frame and say when a read failed
"Since the last visit" was wrapped in a card by the visits section, so the card stayed on screen empty while the window loaded, when it held nothing and when the read failed. The component now owns its card and draws it only with a row; a failed read shows a compact error row. The same shapes elsewhere: the caffeine card and the mood forecast no longer open a loading card that most often collapses, and a failed read on them, the mood tag catalogue, the usual-range strip, the cycle ring and the measurement drill-down now says so with a retry instead of passing for no data. The scores strip keeps the ring's cell on a failed calendar read. The mental-health card no longer draws an empty action slot for a viewer without the right to start. The frame guard now also flags a frame whose only content sits behind a condition. Refs #1241
This commit is contained in:
1 parent
d00281f35a
commit
38c106e358
23 files changed
+816
-193
No files matched your search
@@ -391,7 +391,8 @@ export default function InsightsPageClient() {
|
||||
// Until that read answers the strip keeps its skeleton, so it never paints
|
||||
// Strain first and swaps it for the ring when the calendar lands.
|
||||
const cycleRing = useCycleRingDial(isAuthenticated && cycleRingVisible);
|
||||
const cycleRingDial = cycleRing.dial;
|
||||
// A failed read keeps the cell too: the tile then says so, with a retry.
|
||||
const cycleRingCell = cycleRing.dial || cycleRing.failed;
|
||||
|
||||
// A failed comprehensive read no longer replaces the page. The payload only
|
||||
// decides the "no data yet" empty state below; every section on the page
|
||||
@@ -492,11 +493,11 @@ export default function InsightsPageClient() {
|
||||
// AND the operator server-wide kill-switch) so an operator-off
|
||||
// instance never renders the ring nor fires its calendar read.
|
||||
// v1.39 — and only once the ring has a dial to draw (see above).
|
||||
extraTile={cycleRingDial ? <CycleRingTile /> : undefined}
|
||||
extraTile={cycleRingCell ? <CycleRingTile /> : undefined}
|
||||
// v1.15.5 — when the cycle ring is shown it TAKES the Strain slot:
|
||||
// hide Strain so the strip stays compact instead of growing a sixth
|
||||
// tile. Strain stays visible for non-cycle accounts.
|
||||
hideStrain={cycleRingDial}
|
||||
hideStrain={cycleRingCell}
|
||||
/>
|
||||
),
|
||||
// Hidden, never an error card, while the briefing is unavailable for any
|
||||
|
||||
Reference in new issue
Block a user