Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
Skip completed exercises in Cards and Focus (#523)
Duarte Santosa0ff77e7a55a
diff --git a/frontend/src/lib/supersetFlow.js b/frontend/src/lib/supersetFlow.jsindex ae2c9a727..cc2734050 100644--- a/frontend/src/lib/supersetFlow.js+++ b/frontend/src/lib/supersetFlow.js@@ -5,6 +5,20 @@ import { isWarmupRow } from './workout-model.js'const hasWork = (entries, idx) => !!entries[idx]?.sets?.some(set => !set.done)+/**+ * The unit Prev (`dir` -1) or Next (+1) lands on from unit `from` in Cards and Focus, or -1 at+ * either end. With "Skip completed exercises" (#523, `skipDone`) it jumps over units whose every+ * set is done; when everything that way is done it takes the next one after all, so the buttons+ * and the swipe still step through a finished session.+ */+export function stepUnitIndex(entries, units, from, dir, skipDone = false) {+ const n = from + dir+ if (!Array.isArray(units) || n < 0 || n >= units.length) return -1+ if (!skipDone) return n+ for (let i = n; i >= 0 && i < units.length; i += dir) if ((units[i] || []).some(idx => hasWork(entries, idx))) return i+ return n+}+// Return the first unfinished navigation unit after the current one, wrapping once so a user// who completed units out of order is never offered workout completion while earlier work remains.export function nextUnfinishedUnit(entries, units, fromIdx) {diff --git a/frontend/src/lib/supersetFlow.test.js b/frontend/src/lib/supersetFlow.test.jsindex 601cfaaab..dcbc10730 100644--- a/frontend/src/lib/supersetFlow.test.js+++ b/frontend/src/lib/supersetFlow.test.js@@ -1,5 +1,5 @@import { describe, expect, it } from 'vitest'-import { insertionIndexAfterCurrentUnit, nextUnfinishedUnit, setProgressHighWater, supersetFlowStep, restAfterSet, restOnRecheck, restSecFor, warmupRestSecFor, sideRestFor } from './supersetFlow.js'+import { insertionIndexAfterCurrentUnit, nextUnfinishedUnit, setProgressHighWater, supersetFlowStep, restAfterSet, restOnRecheck, restSecFor, warmupRestSecFor, sideRestFor, stepUnitIndex } from './supersetFlow.js'const entry = done => ({ sets: done.map(value => ({ done: value })) })@@ -213,3 +213,27 @@ describe('restSecFor with a pyramid set’s own rest', () => {expect(restSecFor(entries, [0, 1], 120, { idx: 1, sec: 200 })).toBe(200)})})++describe('stepUnitIndex (#523 skip completed exercises)', () => {+ const ex = (...done) => ({ sets: done.map(d => ({ done: d })) })+ const entries = [ex(true), ex(true, true), ex(false), ex(true), ex(false, true)]+ const units = [[0], [1], [2], [3], [4]]+ it('without the setting, the neighbour, -1 past either end', () => {+ expect(stepUnitIndex(entries, units, 0, 1)).toBe(1)+ expect(stepUnitIndex(entries, units, 0, -1)).toBe(-1)+ expect(stepUnitIndex(entries, units, 4, 1)).toBe(-1)+ })+ it('with it, over finished exercises both ways', () => {+ expect(stepUnitIndex(entries, units, 0, 1, true)).toBe(2)+ expect(stepUnitIndex(entries, units, 2, 1, true)).toBe(4)+ expect(stepUnitIndex(entries, units, 4, -1, true)).toBe(2)+ })+ it('everything that way finished: the neighbour after all', () => {+ expect(stepUnitIndex(entries, units, 2, -1, true)).toBe(1)+ })+ it('a superset counts as finished only when every member is', () => {+ const e2 = [ex(true), ex(true), ex(false), ex(false)]+ expect(stepUnitIndex(e2, [[0], [1, 2], [3]], 0, 1, true)).toBe(1)+ })+})+diff --git a/frontend/src/locales/ar.js b/frontend/src/locales/ar.jsindex 9b93bcaa5..3b7473de1 100644--- a/frontend/src/locales/ar.js+++ b/frontend/src/locales/ar.js@@ -2388,4 +2388,7 @@ export default {'Your backups': 'بدائلك',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'لا وزن يُضاف هنا: يزيد التمرين بالتكرارات ثم بالمجموعات.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'في البطاقات والتركيز، يتخطى «السابق» و«التالي» التمرين المنتهي.',+ 'Skip completed exercises': 'تخطّي التمارين المكتملة',}diff --git a/frontend/src/locales/bn.js b/frontend/src/locales/bn.jsindex c09036625..72fabfc14 100644--- a/frontend/src/locales/bn.js+++ b/frontend/src/locales/bn.js@@ -2412,4 +2412,7 @@ export default {'Your backups': 'আপনার বিকল্প',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'এখানে ওজন যোগ করার কিছু নেই: আগে রেপ বাড়বে, তারপর সেট।',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'কার্ড ও ফোকাসে আগের/পরের বোতাম শেষ হওয়া ব্যায়াম টপকে যায়।',+ 'Skip completed exercises': 'শেষ হওয়া ব্যায়াম বাদ দিন',}diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.jsindex 279e4fd3e..db03ec354 100644--- a/frontend/src/locales/de.js+++ b/frontend/src/locales/de.js@@ -2353,4 +2353,7 @@ export default {'Your backups': 'Deine Ausweichübungen',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Hier kommt kein Gewicht dazu: Es geht über Wiederholungen nach oben, dann über Sätze.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'In Karten und Fokus springen Zurück und Weiter über fertige Übungen.',+ 'Skip completed exercises': 'Erledigte Übungen überspringen',}diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.jsindex 7839e7435..b28941b5e 100644--- a/frontend/src/locales/es.js+++ b/frontend/src/locales/es.js@@ -2333,4 +2333,7 @@ export default {'Your backups': 'Tus sustitutos',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Aquí no hay peso que sumar: sube en repeticiones y luego en series.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'En Tarjetas y Enfoque, Anterior y Siguiente saltan los ejercicios terminados.',+ 'Skip completed exercises': 'Saltar ejercicios completados',}diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.jsindex 44b678b18..62a903a0b 100644--- a/frontend/src/locales/fr.js+++ b/frontend/src/locales/fr.js@@ -2333,4 +2333,7 @@ export default {'Your backups': 'Tes remplaçants',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Pas de poids à ajouter ici : ça monte en répétitions, puis en séries.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'En Cartes et Focus, Précédent et Suivant sautent les exercices terminés.',+ 'Skip completed exercises': 'Sauter les exercices terminés',}diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.jsindex 9bdcbbef6..b700732e0 100644--- a/frontend/src/locales/hi.js+++ b/frontend/src/locales/hi.js@@ -2333,4 +2333,7 @@ export default {'Your backups': 'आपके विकल्प',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'यहाँ वज़न जोड़ने की ज़रूरत नहीं: पहले रेप्स बढ़ेंगे, फिर सेट।',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'कार्ड और फ़ोकस में पिछला और अगला पूरे हो चुके व्यायाम को छोड़ देते हैं।',+ 'Skip completed exercises': 'पूरे हुए व्यायाम छोड़ें',}diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.jsindex bdc46d23f..3ec61be5e 100644--- a/frontend/src/locales/hu.js+++ b/frontend/src/locales/hu.js@@ -2336,4 +2336,7 @@ export default {'Your backups': 'A helyettesítőid',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Itt nincs mit súlyban hozzáadni: előbb az ismétlések nőnek, aztán a sorozatok.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'Kártyák és Fókusz nézetben az Előző és a Következő átugorja a kész gyakorlatot.',+ 'Skip completed exercises': 'Kész gyakorlatok átugrása',}diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.jsindex 983f55b4a..ab66cb1a3 100644--- a/frontend/src/locales/it.js+++ b/frontend/src/locales/it.js@@ -2333,4 +2333,7 @@ export default {'Your backups': 'I tuoi sostituti',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Qui non c’è peso da aggiungere: si sale con le ripetizioni, poi con le serie.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'In Schede e Focus, Indietro e Avanti saltano gli esercizi finiti.',+ 'Skip completed exercises': 'Salta gli esercizi completati',}diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.jsindex 967a49791..a5d5f0509 100644--- a/frontend/src/locales/ko.js+++ b/frontend/src/locales/ko.js@@ -2333,4 +2333,7 @@ export default {'Your backups': '내 대체 운동',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': '여기엔 더할 무게가 없어요. 반복 수를 늘리고, 그다음 세트를 늘려요.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': '카드와 포커스에서 이전/다음이 끝난 운동을 건너뛰어요.',+ 'Skip completed exercises': '끝난 운동 건너뛰기',}diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.jsindex 040ba5ad3..f0cf0f0a3 100644--- a/frontend/src/locales/pl.js+++ b/frontend/src/locales/pl.js@@ -2333,4 +2333,7 @@ export default {'Your backups': 'Twoje zamienniki',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Tu nie ma czego dokładać w ciężarze: rosną powtórzenia, potem serie.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'W Kartach i Skupieniu przyciski Wstecz i Dalej przeskakują ukończone ćwiczenia.',+ 'Skip completed exercises': 'Pomijaj ukończone ćwiczenia',}diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.jsindex 8811ac7d9..d80f6bd69 100644--- a/frontend/src/locales/pt-BR.js+++ b/frontend/src/locales/pt-BR.js@@ -1472,6 +1472,9 @@ export const PT_BR_OVERRIDES = {'Your backups': 'Seus substitutos',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Aqui não há peso para acrescentar: sobe em repetições e depois em séries.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'Em Cartões e Foco, Anterior e Próximo pulam os exercícios concluídos.',+ 'Skip completed exercises': 'Pular exercícios concluídos',}export default { ...pt, ...PT_BR_OVERRIDES }diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.jsindex 2f5c3c597..ecff150ea 100644--- a/frontend/src/locales/pt.js+++ b/frontend/src/locales/pt.js@@ -2333,4 +2333,7 @@ export default {'Your backups': 'Os teus substitutos',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Aqui não há peso a acrescentar: sobe em repetições e depois em séries.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'Em Cartões e Foco, Anterior e Seguinte saltam os exercícios terminados.',+ 'Skip completed exercises': 'Saltar exercícios concluídos',}diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.jsindex f7dd91f6d..b5e6a9f01 100644--- a/frontend/src/locales/ru.js+++ b/frontend/src/locales/ru.js@@ -2337,4 +2337,7 @@ export default {'Your backups': 'Ваши замены',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Здесь нечего добавлять в весе: растут повторения, потом подходы.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'В Карточках и Фокусе «Назад» и «Далее» перескакивают готовые упражнения.',+ 'Skip completed exercises': 'Пропускать выполненные упражнения',}diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.jsindex 3170cdb74..f7fec030b 100644--- a/frontend/src/locales/th.js+++ b/frontend/src/locales/th.js@@ -2344,4 +2344,7 @@ export default {'Your backups': 'ท่าสำรองของคุณ',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'ท่านี้ไม่ต้องเพิ่มน้ำหนัก: เพิ่มจำนวนครั้งก่อน แล้วค่อยเพิ่มเซ็ต',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'ในโหมดการ์ดและโฟกัส ปุ่มก่อนหน้า/ถัดไปจะข้ามท่าที่ทำเสร็จแล้ว',+ 'Skip completed exercises': 'ข้ามท่าที่ทำเสร็จแล้ว',}diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.jsindex ea9cc86f1..9a58613b6 100644--- a/frontend/src/locales/tr.js+++ b/frontend/src/locales/tr.js@@ -2333,4 +2333,7 @@ export default {'Your backups': 'Yedeklerin',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Burada eklenecek ağırlık yok: önce tekrar, sonra set artar.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'Kartlar ve Odak düzeninde Geri ve İleri, bitmiş egzersizlerin üstünden atlar.',+ 'Skip completed exercises': 'Tamamlanan egzersizleri atla',}diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.jsindex 619c2d30f..e849ec0be 100644--- a/frontend/src/locales/uk.js+++ b/frontend/src/locales/uk.js@@ -2330,4 +2330,7 @@ export default {'Your backups': 'Ваші заміни',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': 'Тут нічого додавати у вазі: ростуть повторення, потім підходи.',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': 'У Картках і Фокусі «Назад» і «Далі» перестрибують готові вправи.',+ 'Skip completed exercises': 'Пропускати виконані вправи',}diff --git a/frontend/src/locales/zh-TW.js b/frontend/src/locales/zh-TW.jsindex cf63faff7..3031074cc 100644--- a/frontend/src/locales/zh-TW.js+++ b/frontend/src/locales/zh-TW.js@@ -2326,4 +2326,7 @@ export default {'Your backups': '你的備選動作',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': '這裡不用加重量:先加次數,再加組數。',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': '在卡片和專注版面中,上一個/下一個會跳過已完成的動作。',+ 'Skip completed exercises': '跳過已完成的動作',}diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.jsindex 08facea50..f178b985f 100644--- a/frontend/src/locales/zh.js+++ b/frontend/src/locales/zh.js@@ -2333,4 +2333,7 @@ export default {'Your backups': '你的备选动作',// --- #583 bodyweight step ---'Nothing to add in weight here: it goes up in reps, then sets.': '这里不用加重量:先加次数,再加组数。',+ // --- #523 skip completed ---+ 'In Cards and Focus, Prev and Next hop over a finished exercise.': '在卡片和专注布局中,上一个/下一个会跳过已完成的动作。',+ 'Skip completed exercises': '跳过已完成的动作',}diff --git a/frontend/src/views/Settings.jsx b/frontend/src/views/Settings.jsxindex 4468d121a..1d3a833f8 100644--- a/frontend/src/views/Settings.jsx+++ b/frontend/src/views/Settings.jsx@@ -494,6 +494,13 @@ export default function Settings({ page = null, find = null, via = null, entryKe<Switch aria-label={t('Collapse completed exercises')} checked={!!S.collapseCompleted}onChange={v => update(s => { s.collapseCompleted = v; if (s.active) delete s.active.collapseCompleted })} /></Row>+ {/* Its counterpart for Cards and Focus (#523): Prev, Next and the swipe jump over an+ exercise whose every set is done. */}+ <Row icon="skipForward" iconTint="var(--teal)" title={t('Skip completed exercises')}+ subtitle={t('In Cards and Focus, Prev and Next hop over a finished exercise.')}>+ <Switch aria-label={t('Skip completed exercises')} checked={S.skipCompleted === true}+ onChange={v => update(s => { if (v) s.skipCompleted = true; else delete s.skipCompleted })} />+ </Row></Section><Section title={t('Before and during')}>{/* The quick weigh-in that opens on Start (sheets.jsx startFlow, issue #137); off skipsdiff --git a/frontend/src/views/Workout.jsx b/frontend/src/views/Workout.jsxindex 5c14bec4e..88354c639 100644--- a/frontend/src/views/Workout.jsx+++ b/frontend/src/views/Workout.jsx@@ -17,7 +17,7 @@ import { pinState } from '../lib/queue.js'import { t, tn, exerciseNameFor, exerciseNameClass } from '../lib/i18n.js'import { api, beacon } from '../lib/api.js'import { pyramidRestFor, maxRecordAt, isPyramid, pyramidLabel } from '../lib/pyramid.js'-import { insertionIndexAfterCurrentUnit, nextUnfinishedUnit, setProgressHighWater, supersetFlowStep, restAfterSet, restOnRecheck, restSecFor, warmupRestSecFor, sideRestFor } from '../lib/supersetFlow.js'+import { insertionIndexAfterCurrentUnit, nextUnfinishedUnit, setProgressHighWater, supersetFlowStep, restAfterSet, restOnRecheck, restSecFor, warmupRestSecFor, sideRestFor, stepUnitIndex } from '../lib/supersetFlow.js'import Media from '../components/Media.jsx'import WorkoutScrollAnchor from '../components/WorkoutScrollAnchor.jsx'import WorkoutChips from '../components/WorkoutChips.jsx'@@ -958,6 +958,8 @@ function ActiveWorkout({ onActionChange }) {// The session's own choice (the Layout menu) wins over the saved one (Settings → Workout), the// way the layout itself does, so someone who always wants it switches it on once.const collapseOn = listMode && !!(A.collapseCompleted ?? S.collapseCompleted)+ // Cards and Focus: Prev, Next and the swipe jump over finished exercises (#523).+ const skipDone = !listMode && S.skipCompleted === true// A finished unit you tapped open again to look at or fix (Discord: "minimize completed exercises// so I view only what I have yet to do"). This screen's own memory: a reload folds it back.// Keyed by index like the units, so a different number of exercises starts over.@@ -1324,7 +1326,8 @@ function ActiveWorkout({ onActionChange }) {if (active.cur < 0 || active.cur >= active.entries.length) return nullconst freshUnits = supersetUnits(active.entries)const freshUnitIdx = freshUnits.findIndex(candidate => candidate.includes(active.cur))- return freshUnitIdx < 0 ? null : freshUnits[freshUnitIdx + direction]?.[0] ?? null+ // Cards and Focus may jump over finished exercises (Settings, "Skip completed exercises").+ return freshUnitIdx < 0 ? null : freshUnits[stepUnitIndex(active.entries, freshUnits, freshUnitIdx, direction, skipDone)]?.[0] ?? null}if (targetFor(useStore.getState().S.active) == null) returnupdate(s => {@@ -2061,7 +2064,7 @@ function ActiveWorkout({ onActionChange }) {// so none of it can be pressed. That includes a superset's header with its Unpair, and a// lone exercise's "Make superset" buttons when Settings shows them: without them the// header's words moved over, or the card grew by a row, as it landed.- const adjacent = units[unitIdx + direction] || []+ const adjacent = units[stepUnitIndex(A.entries, units, unitIdx, direction, skipDone)] || []if (!adjacent.length) return nullreturn adjacent.length > 1 ? (<div className="ss-card">diff --git a/frontend/src/views/Workout.test.jsx b/frontend/src/views/Workout.test.jsxindex f4027c320..56917734f 100644--- a/frontend/src/views/Workout.test.jsx+++ b/frontend/src/views/Workout.test.jsx@@ -2880,6 +2880,18 @@ describe('workout controls: the more menu and the set menu', () => {expect(mocks.exerciseHistorySheet).toHaveBeenCalledWith('plain-row')})+ // #523: "Skip completed exercises" makes Next hop over a finished exercise in Cards.+ it('with skip completed on, Next hops over a finished exercise; off, it steps to it', async () => {+ const three = () => [exercise('plain-bench', [false]), exercise('plain-row', [true, true]), exercise('plain-curl', [false])]+ await mount(three(), 0, { skipCompleted: true })+ await pressNext()+ expect(mocks.S.active.cur).toBe(2)+ await unmount()+ await mount(three(), 0)+ await pressNext()+ expect(mocks.S.active.cur).toBe(1)+ })+it('opens a per-set menu from the set number with drop, burst and remove', async () => {await mount([exercise('plain-bench', [false, false])])await act(async () => { container.querySelector('button[aria-label="Set 2"]').dispatchEvent(new dom.Event('click', { bubbles: true })) })diff --git a/frontend/src/views/settings-pages.js b/frontend/src/views/settings-pages.jsindex 9a3614180..eb34b0791 100644--- a/frontend/src/views/settings-pages.js+++ b/frontend/src/views/settings-pages.js@@ -57,6 +57,7 @@ export const SEARCH = [{ page: 'workout', title: 'Shown under each exercise', icon: 'history', tint: 'var(--blue)', kw: 'last time best set reference previous', opts: ['Last time', 'Best set'] },{ page: 'workout', title: 'Layout', icon: 'layout', tint: 'var(--blue)', kw: 'workout view cards list compact', opts: ['Cards', 'List', 'Compact'] },{ page: 'workout', title: 'Collapse completed exercises', icon: 'minimize', tint: 'var(--teal)', kw: 'collapse fold minimize hide done finished completed exercises list compact remaining left to do' },+ { page: 'workout', title: 'Skip completed exercises', icon: 'skipForward', tint: 'var(--teal)', kw: 'skip jump done finished completed exercises cards focus next previous' },{ page: 'workout', title: 'Weigh in before workouts', icon: 'scale', tint: 'var(--green)', kw: 'body weight weigh scale start' },{ page: 'workout', title: 'Keep screen awake', icon: 'phoneScreen', tint: 'var(--yellow)', kw: 'wake lock screen sleep display on', when: c => c.wakeOK || !c.mobile },{ page: 'workout', title: 'Exercise animations', icon: 'image', tint: 'var(--teal)', kw: 'gif animation video media pictures images', opts: ['Full', 'Small', 'Hidden'] },diff --git a/frontend/src/views/settings-pages.test.jsx b/frontend/src/views/settings-pages.test.jsxindex 0d6f8aa1f..df7e78113 100644--- a/frontend/src/views/settings-pages.test.jsx+++ b/frontend/src/views/settings-pages.test.jsx@@ -275,7 +275,7 @@ describe('the pages', () => {mount('workout')expect([...host.querySelectorAll('.sect-t')].map(e => e.textContent)).toEqual(['Rest', 'Logging', 'Before and during'])expect(titles()).toEqual(['Rest timer', 'Rest-pause rest', 'Effort per set', 'Shown under each exercise', 'Layout',- 'Collapse completed exercises', 'Weigh in before workouts', 'Keep screen awake', 'Exercise animations', 'Fine-tuning'])+ 'Collapse completed exercises', 'Skip completed exercises', 'Weigh in before workouts', 'Keep screen awake', 'Exercise animations', 'Fine-tuning'])// QA 10-05: the "screen stays on" line is the awake row's own subtitle, not a section footer// that read as if it explained the animations above it.expect(rowTitled('Keep screen awake').querySelector('.lrow-s').textContent).toMatch(/^The screen stays on/)