Workout view: add a "compact" layout and a per-session ⋮ switcher
S.workoutView gains a third value, 'compact': the list layout with each
ExerciseBlock rendered `dense` — no media, tag chips ("Best:" included),
note lines, "Last time" recap, bar/plates chip or progression-guidance
line. Just the name, the ⋯ menu and the set rows. Everything stripped is
still on the ⋯ menu or is display-only.
- Settings → During a workout → Workout view is now a 3-way Segmented
(Cards / List / Compact).
- The workout header gains a ⋮ button (menuSheet) that writes
s.active.workoutView, overriding the layout for the running session.
- beginWorkout / beginBackfill snapshot S.workoutView onto s.active, and
the render prefers A.workoutView || S.workoutView — so changing the
saved default never disturbs a workout already in progress.
- 'Compact' added to all 14 locales; pt-BR inheritance fingerprint
regenerated (inherited 613 → 614).
cards / list behaviour is unchanged. Component tests in Workout.test.jsx,
Settings.workoutview.test.jsx and a new sheets.workoutview.test.jsx;
docs/LIST_VIEW.md rewritten to the shipped model.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016QqZBhX7PVNsRqLhkTt9y3
This commit is contained in:
1 parent
5c2005e81f
commit
e7a4597478
22 files changed
+282
-23
No files matched your search
@@ -1668,6 +1668,9 @@ export function beginWorkout(routineId, bw) {
|
||||
s.active = {
|
||||
id: uid(), d: todayISO(), start: Date.now(), routineId,
|
||||
name: r ? r.name : t('Freestyle'), bw: bw || null, cur: 0, entries,
|
||||
// Snapshot the layout at start so the header ⋮ can change it for this session only —
|
||||
// changing the saved default (Settings → Workout view) mid-session leaves it alone.
|
||||
workoutView: st.workoutView || 'cards',
|
||||
...(excluded ? { excludeFromProgression: true } : {})
|
||||
}
|
||||
})
|
||||
@@ -1742,6 +1745,8 @@ function beginBackfill({ iso, time, durationMin, routineId, replaceId }) {
|
||||
id: uid(), d: iso, start: backfillStart(iso, time), routineId,
|
||||
name: r ? r.name : t('Freestyle'), bw: null, cur: 0, entries,
|
||||
backfill: { durationMin, replaceId: replaceId || null },
|
||||
// Same layout snapshot as a live session (see beginWorkout).
|
||||
workoutView: st.workoutView || 'cards',
|
||||
...(excluded ? { excludeFromProgression: true } : {})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user