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
Plan: the loop header wraps so Add stays on screen at 320 px
Duarte Santosa15eaa17f0f1
diff --git a/frontend/src/index.css b/frontend/src/index.cssindex 3ad378ed6..bf78f0930 100644--- a/frontend/src/index.css+++ b/frontend/src/index.css@@ -1835,7 +1835,10 @@ body.no-tabbar.resting #toast{bottom:calc(100px + var(--sab))}.plan-mode .seg-inline{flex:1 1 200px;min-width:0}.plan-mode .seg-inline button{white-space:nowrap}.plan-mode-locked{margin-inline-start:auto;text-align:end}-.plan-sec-h{margin:22px 0 8px;gap:8px}+.plan-sec-h{margin:22px 0 8px;gap:8px;flex-wrap:wrap}+/* Long words (German "Hinzufügen") push the loop's buttons off a 320 px screen; they drop+ to their own line instead and stay on the trailing edge. */+.plan-sec-h>.plan-sec-acts{margin-inline-start:auto}.plan-sec-h h4.sec{margin:0}.plan-routines-bar{margin-top:0}.plan-textbtn{color:var(--acc);font-size:16px;padding:6px 4px;position:relative}diff --git a/frontend/src/views/Plan.jsx b/frontend/src/views/Plan.jsxindex a4d44adef..a9bd10615 100644--- a/frontend/src/views/Plan.jsx+++ b/frontend/src/views/Plan.jsx@@ -215,7 +215,7 @@ function Schedule({ S, update, nav, mode }) {<h4 className="sec">{t('The loop')}{external && <span className="tag" style={{ marginInlineStart: 8 }}>{t('Externally managed')}</span>}</h4>{/* A coach's own queue is read-only here: the one way to change what it holds is toadopt it first ("Use this rotation" below), never a tap on one of its rows. */}- {!external && <div className="row" style={{ gap: 6 }}>+ {!external && <div className="row plan-sec-acts" style={{ gap: 6 }}>{seq.length > 0 && <button className="plan-textbtn" aria-pressed={editLoop} onClick={() => setEditLoop(e => !e)}>{editLoop ? t('Done') : t('Edit')}</button>}<Button size="sm" variant="tinted" icon="plus" aria-label={t('Add routine to the rotation')}disabled={S.routines.every(r => seq.includes(r.id))} onClick={addToSeq}>{t('Add')}</Button>diff --git a/frontend/src/views/Plan.rotation.test.jsx b/frontend/src/views/Plan.rotation.test.jsxindex 74cc3e713..0cfca17e1 100644--- a/frontend/src/views/Plan.rotation.test.jsx+++ b/frontend/src/views/Plan.rotation.test.jsx@@ -93,6 +93,17 @@ describe('Plan — How you train', () => {expect(subtitle()).toBe('Your routines in a loop')})+ it('the loop header can wrap so Add never runs off a 320 px screen', async () => {+ mount({ scheduleMode: 'rotation' })+ const acts = host.querySelector('.rotation .plan-sec-h > .plan-sec-acts')+ expect(acts).toBeTruthy()+ expect(acts.querySelector('button[aria-label="Add routine to the rotation"]')).toBeTruthy()+ const { readFileSync } = await import('node:fs')+ const css = readFileSync(process.cwd() + '/src/index.css', 'utf8')+ expect(css).toMatch(/^\.plan-sec-h\{[^}]*flex-wrap:wrap/m)+ expect(css).toMatch(/^\.plan-sec-h>\.plan-sec-acts\{[^}]*margin-inline-start:auto/m)+ })+it('back to Fixed Week with nothing running needs no confirmation', () => {mount({ scheduleMode: 'rotation' })pickMode('Fixed Week')