Add optional RIR (reps in reserve) to reps-mode sets
Adds a third stepper column, next to weight and reps, for logging RIR on strength sets — not shown for cardio or timed holds, where it has no meaning. RIR is purely a logging/display addition: it never touches the progression engine (linear/Greyskull/double progression only ever read weight/reps/seconds), and it round-trips through the existing whole-object backup export/import with no code changes there. The set object only gains an `rir` key once the user actually logs a value (buildSets/addSet don't pre-seed it), matching how missing fields already read as undefined elsewhere in the store — no schema version or migration needed for existing logged workouts. Fitting a third stepper next to weight+reps on narrow phones needed the same treatment as the exercise-config sheet's three-steppers-in-a-row (.cfgrow): narrower buttons and a smaller value font just for rows that show RIR, verified by hand at 360-390px with edge-case values (2-3 digit weight, double-digit reps, decimal RIR together). "Last time" summaries now append "(RIR n)" when a set has one logged, covered by new setLabel tests including the rir: 0 case (0 is a valid RIR and must not be treated as absent).
This commit is contained in:
1 parent
ab0c98ba85
commit
6714b16e6a
4 files changed
+25
-3
No files matched your search
@@ -539,6 +539,7 @@ h4.sec{
|
||||
.sethead .n-sp{width:24px;flex:none}
|
||||
.sethead .w-sp{flex:1.4;text-align:center}
|
||||
.sethead .r-sp{flex:1;text-align:center}
|
||||
.sethead .rir-sp{flex:1.1;text-align:center}
|
||||
.sethead .ck-sp{width:30px;flex:none}
|
||||
.setrow{display:flex;align-items:center;gap:8px;padding:7px 0;position:relative}
|
||||
.setrow+.setrow::before{
|
||||
@@ -551,7 +552,19 @@ h4.sec{
|
||||
}
|
||||
.setrow .stp.w{flex:1.4;min-width:0}
|
||||
.setrow .stp.r{flex:1;min-width:0}
|
||||
.setrow .stp.rir{flex:1.1;min-width:0}
|
||||
.setrow .stp button{width:32px;height:40px}
|
||||
/* a 3rd stepper (RIR) needs narrower buttons and a tighter row gap to fit next to weight+reps
|
||||
on narrow phones, same technique as the exercise-config sheet's three-steppers-in-a-row
|
||||
(.cfgrow below) — RIR's own value is short ("1.5") so its buttons shrink the most, weight/reps
|
||||
just enough to make room since their values ("82.5", "12") need more of what's left. */
|
||||
.setrow.rir3{gap:6px}
|
||||
.setrow.rir3 .stp.w{flex:1.2}
|
||||
.setrow.rir3 .stp.r{flex:1}
|
||||
.setrow.rir3 .stp.rir{flex:.85}
|
||||
.setrow.rir3 .stp button{width:23px}
|
||||
.setrow.rir3 .stp.rir button{width:20px}
|
||||
.setrow.rir3 .stp .num{font-size:14px}
|
||||
.setrow.done .n{background:var(--acc);color:var(--on-acc)}
|
||||
.setrow.done{opacity:.45}
|
||||
/* why the next target is what it is (issue #17) */
|
||||
|
||||
Reference in new issue
Block a user