Config sheet: a stepper is not a list-row accessory

Added weight sat inside a list row next to its label, which is fine for a switch
and wrong for a stepper: the control took the width it needed and left the text
column wrapping one word per line. It now gets the same full-width treatment as
sets and reps, with the explanation underneath, and reuses the "Added (kg)" label
the set table already uses.

Also stops a long value overlapping its own title in a list row — flex:none meant
"Follow the routine (Linear progression)" ran straight through "Rule", since the
title's column was already free to shrink to nothing. The value shrinks and
ellipsises instead. Pre-existing, visible in every settings row with a long value.
This commit is contained in:
Duarte Santos committed 2026-08-01 17:00:30 +02:00
1 parent a5e360cde5
commit 1e86d6ace2
13 files changed
+17 -16

No files matched your search

+5 -1
View File
@@ -233,7 +233,11 @@ h4.sec{
.lrow-m{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.lrow-t{font-size:17px;letter-spacing:-.012em;line-height:1.25}
.lrow-s{font-size:13px;color:var(--label-2);line-height:1.3}
.lrow-v{color:var(--label-2);font-size:17px;letter-spacing:-.012em;flex:none}
/* flex:none would let a long value ("Follow the routine (Linear progression)") run straight
through the title next to it, since the title's column is already free to shrink to nothing.
Letting the value shrink and ellipsise instead keeps the two out of each other's way. */
.lrow-v{color:var(--label-2);font-size:17px;letter-spacing:-.012em;flex:0 1 auto;min-width:0;
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}
.lrow-c{color:var(--label);font-size:15px;flex:none;--icon-stroke:2.4}
.lrow-k{color:var(--acc);font-size:17px;flex:none;--icon-stroke:2.4}
.lrow.danger,.lrow.danger .lrow-t{color:var(--red)}
-1
View File
@@ -559,7 +559,6 @@ export default {
'Bodyweight': 'Körpergewicht',
'No weight to enter — just log the reps.': 'Kein Gewicht einzutragen — nur die Wiederholungen.',
'Ask for a weight on every set.': 'Bei jedem Satz nach dem Gewicht fragen.',
'Added weight': 'Zusatzgewicht',
'For dips or pull-ups with a belt. Progression then follows the weight.': 'Für Dips oder Klimmzüge mit Gürtel. Die Progression folgt dann dem Gewicht.',
'Reps per side': 'Wiederholungen pro Seite',
'For lunges, single-arm rows and the like.': 'Für Ausfallschritte, einarmiges Rudern und Ähnliches.',
-1
View File
@@ -542,7 +542,6 @@ export default {
'Bodyweight': 'Peso corporal',
'No weight to enter — just log the reps.': 'No hay peso que introducir — solo registra las reps.',
'Ask for a weight on every set.': 'Pedir un peso en cada serie.',
'Added weight': 'Peso extra',
'For dips or pull-ups with a belt. Progression then follows the weight.': 'Para fondos o dominadas con cinturón. La progresión sigue entonces el peso.',
'Reps per side': 'Reps por lado',
'For lunges, single-arm rows and the like.': 'Para zancadas, remo a una mano y similares.',
-1
View File
@@ -542,7 +542,6 @@ export default {
'Bodyweight': 'Poids du corps',
'No weight to enter — just log the reps.': 'Pas de poids à saisir — note simplement les répétitions.',
'Ask for a weight on every set.': 'Demander un poids à chaque série.',
'Added weight': 'Poids ajouté',
'For dips or pull-ups with a belt. Progression then follows the weight.': 'Pour les dips ou les tractions avec une ceinture. La progression suit alors le poids.',
'Reps per side': 'Reps par côté',
'For lunges, single-arm rows and the like.': 'Pour les fentes, les rowings à un bras et compagnie.',
-1
View File
@@ -542,7 +542,6 @@ export default {
'Bodyweight': 'बॉडीवेट',
'No weight to enter — just log the reps.': 'कोई वज़न नहीं डालना — बस रेप्स दर्ज करें।',
'Ask for a weight on every set.': 'हर सेट पर वज़न पूछें।',
'Added weight': 'अतिरिक्त वज़न',
'For dips or pull-ups with a belt. Progression then follows the weight.': 'बेल्ट के साथ डिप्स या पुल-अप्स के लिए। फिर प्रोग्रेशन वज़न के हिसाब से चलता है।',
'Reps per side': 'प्रति तरफ़ रेप्स',
'For lunges, single-arm rows and the like.': 'लंजेस, सिंगल-आर्म रो और ऐसे व्यायामों के लिए।',
-1
View File
@@ -542,7 +542,6 @@ export default {
'Bodyweight': 'Corpo libero',
'No weight to enter — just log the reps.': 'Nessun peso da inserire — registra solo le ripetizioni.',
'Ask for a weight on every set.': 'Chiedi un peso a ogni serie.',
'Added weight': 'Peso aggiunto',
'For dips or pull-ups with a belt. Progression then follows the weight.': 'Per dip o trazioni con la cintura. La progressione segue poi il peso.',
'Reps per side': 'Ripetizioni per lato',
'For lunges, single-arm rows and the like.': 'Per affondi, rematori a un braccio e simili.',
-1
View File
@@ -542,7 +542,6 @@ export default {
'Bodyweight': '맨몸 운동',
'No weight to enter — just log the reps.': '입력할 무게 없음 — 횟수만 기록합니다.',
'Ask for a weight on every set.': '세트마다 무게를 물어봅니다.',
'Added weight': '추가 무게',
'For dips or pull-ups with a belt. Progression then follows the weight.': '벨트를 차고 하는 딥스나 풀업용. 그러면 점진적 증가가 무게를 따라갑니다.',
'Reps per side': '한쪽당 횟수',
'For lunges, single-arm rows and the like.': '런지, 한팔 로우 같은 운동용.',
-1
View File
@@ -542,7 +542,6 @@ export default {
'Bodyweight': 'Masa własna',
'No weight to enter — just log the reps.': 'Nie podajesz ciężaru — zapisujesz tylko powtórzenia.',
'Ask for a weight on every set.': 'Pytaj o ciężar przy każdej serii.',
'Added weight': 'Dodatkowy ciężar',
'For dips or pull-ups with a belt. Progression then follows the weight.': 'Do dipów albo podciągania z pasem. Progresja idzie wtedy za ciężarem.',
'Reps per side': 'Powtórzenia na stronę',
'For lunges, single-arm rows and the like.': 'Do wykroków, wiosłowania jednorącz i podobnych.',
-1
View File
@@ -542,7 +542,6 @@ export default {
'Bodyweight': 'Peso do corpo',
'No weight to enter — just log the reps.': 'Sem peso para introduzir — regista só as repetições.',
'Ask for a weight on every set.': 'Pedir um peso em cada série.',
'Added weight': 'Peso extra',
'For dips or pull-ups with a belt. Progression then follows the weight.': 'Para dips ou pull-ups com cinto. A progressão passa então a seguir o peso.',
'Reps per side': 'Reps por lado',
'For lunges, single-arm rows and the like.': 'Para afundos, remadas a um braço e afins.',
-1
View File
@@ -542,7 +542,6 @@ export default {
'Bodyweight': 'Собственный вес',
'No weight to enter — just log the reps.': 'Вес вводить не нужно — записывай только повторения.',
'Ask for a weight on every set.': 'Спрашивать вес в каждом подходе.',
'Added weight': 'Дополнительный вес',
'For dips or pull-ups with a belt. Progression then follows the weight.': 'Для отжиманий на брусьях или подтягиваний с поясом. Тогда прогрессия идёт по весу.',
'Reps per side': 'Повторения на сторону',
'For lunges, single-arm rows and the like.': 'Для выпадов, тяг одной рукой и тому подобного.',
-1
View File
@@ -542,7 +542,6 @@ export default {
'Bodyweight': 'Vücut ağırlığı',
'No weight to enter — just log the reps.': 'Girilecek ağırlık yok — sadece tekrarları kaydet.',
'Ask for a weight on every set.': 'Her sette ağırlık sorulsun.',
'Added weight': 'Ek ağırlık',
'For dips or pull-ups with a belt. Progression then follows the weight.': 'Kemerle yapılan dips veya barfiks için. İlerleme o zaman ağırlığı izler.',
'Reps per side': 'Taraf başına tekrar',
'For lunges, single-arm rows and the like.': 'Lunge, tek kol çekiş ve benzeri hareketler için.',
-1
View File
@@ -542,7 +542,6 @@ export default {
'Bodyweight': '徒手动作',
'No weight to enter — just log the reps.': '无需输入重量——只记录次数。',
'Ask for a weight on every set.': '每组都询问重量。',
'Added weight': '额外负重',
'For dips or pull-ups with a belt. Progression then follows the weight.': '用于系负重腰带做双杠臂屈伸或引体向上。此时进阶方式跟随重量。',
'Reps per side': '每侧次数',
'For lunges, single-arm rows and the like.': '用于弓步蹲、单臂划船之类的动作。',
+12 -4
View File
@@ -561,10 +561,6 @@ function ExConfig({ ex, existing, onSave, onDelete, close, routine }) {
subtitle={bw ? t('No weight to enter — just log the reps.') : t('Ask for a weight on every set.')}>
<Switch checked={bw} onChange={v => setC(x => ({ ...x, bodyweight: v, weight: v ? 0 : x.weight }))} />
</Row>
{bw && <Row icon="plus" iconTint="var(--indigo)" title={t('Added weight')}
subtitle={t('For dips or pull-ups with a belt. Progression then follows the weight.')}>
<Stepper value={c.weight || 0} step={2.5} onChange={v => setC(x => ({ ...x, weight: v }))} />
</Row>}
{mode === 'reps' && <Row icon="shuffle" iconTint="var(--blue)" title={t('Reps per side')}
subtitle={perSide ? t('You still log the total: {0} is {1} per side.', c.reps || 0, fmtNum(sideReps(c.reps))) : t('For lunges, single-arm rows and the like.')}>
{/* Turning it on rounds the target up to an even number, since half of an odd
@@ -572,6 +568,18 @@ function ExConfig({ ex, existing, onSave, onDelete, close, routine }) {
<Switch checked={perSide} onChange={v => setC(x => ({ ...x, side: v || undefined, reps: v ? Math.ceil((x.reps || 0) / 2) * 2 : x.reps }))} />
</Row>}
</div>}
{/* A stepper is too wide to sit in a list row next to a label — it squeezes the text to
one word per line — so added weight gets the same full-width treatment as sets and
reps, with its explanation underneath. */}
{bw && <>
<div className="row cfgrow" style={{ marginBottom: 8 }}>
<Stepper label={t('Added ({0})', st.unit)} value={c.weight || 0} step={2.5}
onChange={v => setC(x => ({ ...x, weight: v }))} />
</div>
<div className="small dim" style={{ marginBottom: 18 }}>
{t('For dips or pull-ups with a belt. Progression then follows the weight.')}
</div>
</>}
{/* The rep ceiling only means something when there is no load to add instead. */}
{mode === 'reps' && bw && !(c.weight > 0) && <div className="row cfgrow" style={{ marginBottom: 18 }}>
<Stepper label={t('Top of the range')} value={c.repsMax || 0} step={1} decimal={false}