Effort help: show the two scales as one table, (i) before the control

The sheet explained RIR and RPE in three paragraphs, which is a bad way to
say "these are the same judgement counted from opposite ends" — you had to
hold both sentences in your head to see the correspondence. A conversion
table shows it in one look: RIR and RPE in fixed tabular columns you can
read straight down, the feel in words next to them, and the row a working
set usually lands on highlighted in the accent.

The table is built from the same parts as the app's grouped lists (surface
fill, inset hairlines) instead of a real <table>, so it inherits the card
look and wraps on a narrow phone.

The (i) moves ahead of the segmented control: you reach the explanation on
the way to the choice rather than past it.

The three paragraph strings are replaced by the table's strings in all 11
language packs.
This commit is contained in:
Duarte Santos committed 2026-07-30 23:42:21 +02:00
1 parent 4e27461b7e
commit 0c6c22c04b
13 files changed
+158 -57

No files matched your search

+29 -9
View File
@@ -135,12 +135,12 @@ export default function Settings() {
<Switch checked={!!S.sound} onChange={v => update(s => { s.sound = v })} />
</Row>
{/* Two names for the same judgement, so the column asks in the scale you already think in.
The (i) explains the difference rather than making the row title carry it. */}
The (i) sits before the control — you read it on the way to the choice, not after it. */}
<Row icon="target" iconTint="var(--purple)" title={t('Effort per set')}>
<button className="helpbtn" aria-label={t('What are RIR and RPE?')} onClick={effortHelpSheet}><Icon name="info" /></button>
<Segmented className="seg-inline"
options={[{ value: 'none', label: t('Off') }, { value: 'rir', label: t('RIR') }, { value: 'rpe', label: t('RPE') }]}
value={effortOf(S)} onChange={v => update(s => { s.effort = v; delete s.showRir })} />
<button className="helpbtn" aria-label={t('What are RIR and RPE?')} onClick={effortHelpSheet}><Icon name="info" /></button>
</Row>
</Section>
@@ -175,16 +175,36 @@ export default function Settings() {
</div>
}
// Short on purpose: the two scales measure the same thing from opposite ends, and that one
// sentence is what people actually come looking for.
// The whole point is that the two scales are one judgement counted from opposite ends, and a
// paragraph is a bad way to say that — the conversion table shows it in one look. Reading down
// a column is the answer to "what do I put here", so the numbers get their own aligned columns.
const EFFORT_ROWS = [
['0', '10', 'Nothing left — went to failure'],
['1', '9', 'One more rep in the tank'],
['2', '8', 'Two more reps'],
['3', '7', 'Three more reps'],
['4+', '≤6', 'Easy — warm-up territory'],
]
// RIR 2 / RPE 8: the row a working set usually lands on, and where the first + puts you.
const EFFORT_TYPICAL = 2
function effortHelpSheet() {
useUI.getState().openSheet(close => <>
<h3>{t('Effort per set')}</h3>
<div className="muted small" style={{ lineHeight: 1.55, display: 'grid', gap: 10 }}>
<div>{t('How hard a set was, logged next to weight and reps. Nothing else reads it — your progression and estimated 1RM are unaffected.')}</div>
<div>{t('RIR — reps in reserve: how many more reps you had in you. 2 means two left, 0 means you went to failure.')}</div>
<div>{t('RPE — perceived exertion, the same effort read off a 10-point scale: RPE 8 means two reps left, RPE 10 means failure.')}</div>
<div>{t('So RPE ≈ 10 − RIR. Pick the one you already think in; sets you have already logged keep their own scale.')}</div>
<div className="muted small" style={{ lineHeight: 1.5 }}>
{t('How hard a set was, logged next to weight and reps. Two scales for the same judgement, counted from opposite ends.')}
</div>
<div className="efftbl">
<div className="r hd"><span className="n">{t('RIR')}</span><span className="n">{t('RPE')}</span><span className="f">{t('How it felt')}</span></div>
{EFFORT_ROWS.map(([rir, rpe, feel], i) => (
<div key={rir} className={'r' + (i === EFFORT_TYPICAL ? ' on' : '')}>
<span className="n">{rir}</span><span className="n">{rpe}</span><span className="f">{t(feel)}</span>
</div>
))}
</div>
<div className="dim small" style={{ lineHeight: 1.5, display: 'grid', gap: 8 }}>
<div>{t('RIR counts the reps you left; RPE reads the same effort off a 10-point scale — so RPE ≈ 10 − RIR. Pick the one you already think in.')}</div>
<div>{t('The highlighted row is where the first + lands. Sets you have already logged keep their own scale, and nothing else reads the value — progression and estimated 1RM are unaffected.')}</div>
</div>
<div style={{ height: 8 }} />
</>)