A shared plan file can no longer take the app down
Importing a plan whose exercise ids this build doesn't know — a
hand-edited file, an export from a build with a different dataset — put
those ids straight into a routine. The routine editor skipped them
silently (you could neither see nor delete them), and starting the
routine reached for ex.n on undefined: white screen, no tab bar, no way
back. The running workout is persisted, so it came back on every reload.
Three layers, so this class of bug can't reach the screen again:
· parsePlan() drops ids that resolve to neither the library nor a
custom exercise carried in the same file, and the import sheet says
how many were left out.
· exOr() renders an unresolvable id as a placeholder, so the routine
editor shows it (and lets you remove it) instead of hiding it, and
the workout view survives one.
· an ErrorBoundary around the routes: it keeps the tab bar alive,
offers a reload, and can discard a running workout that can't be
drawn. It is keyed on the route, so switching tabs clears it.
Turning the schedule switch on now really replaces Mon–Sun, as the
switch has always claimed. It only wrote the days the shared plan filled,
so days it left empty kept your own routine and you silently ended up
training a mix of two plans.
Also here, because they sit in the same lines: the tags that carry a unit
or a whole sentence opt out of the capitalise rule ("Best: 85 Kg", "Last
Time You Hit All Reps"), and the workout header's "best" now includes the
working weight you confirmed, so it agrees with the sheet that asked for
it.
This commit is contained in:
1 parent
c8a68e37e1
commit
3d5b00cecd
8 files changed
+126
-36
No files matched your search
@@ -153,10 +153,12 @@ button,.chip,.tile,.item,.wday,.cal-d,.swatch,.hm-c,.lrow,.seg button,.stp butto
|
||||
.small{font-size:13px;line-height:1.38}
|
||||
.accent{color:var(--acc)}
|
||||
.capitalize{text-transform:capitalize}
|
||||
.nocap{text-transform:none}
|
||||
/* exercise names and body-part/equipment terms arrive lowercase from the dataset,
|
||||
so capitalising is opt-in per element — blanket-capitalising a row also turned
|
||||
"60 kg" into "60 Kg" and whole sentences into Title Case. */
|
||||
so tags and chips capitalise by default. Anything that is a unit or a sentence opts
|
||||
back out — blanket-capitalising turned "60 kg" into "60 Kg" and a whole hint into
|
||||
Title Case. The compound selectors are needed: .tag/.chip come later in this file
|
||||
and would otherwise win on source order. */
|
||||
.nocap,.tag.nocap,.chip.nocap{text-transform:none}
|
||||
|
||||
/* ---------------------------------------------------------------- layout -- */
|
||||
#app{
|
||||
|
||||
Reference in new issue
Block a user