Fix exercise-config sheet overflowing on narrow phones (#10)

The Sets/Reps/Weight stepper row (and its cardio variant) used fixed-width
steppers that added up to ~445px — wider than an iPhone viewport — clipping
the Weight stepper off-screen and letting iOS Safari pan the whole page
sideways. Steppers in the config sheet now flex and shrink to fit, and
html/body clip horizontal overflow as a safety net.
This commit is contained in:
Duarte Santos committed 2026-07-21 20:48:14 +02:00
1 parent 42402cae0c
commit b9f8d18bbd
3 files changed
+17 -3

No files matched your search

+8
View File
@@ -1,5 +1,13 @@
# Changelog
## v1.1.2 — 2026-07-21
- 📱 Fixed the exercise-config sheet (Sets / Reps / Weight, and the cardio variant) overflowing the
screen edge on narrow phones — the Weight stepper was clipped and could make the whole page pan
sideways in iOS Safari. Steppers now shrink to fit the viewport. (#10)
- 🛡️ Added a global horizontal-overflow guard so a single too-wide element can no longer knock the
page layout off-scale.
## v1.1.1 — 2026-07-21
Reliability fixes for the push notifications shipped in v1.1.0, found through live testing:
+8 -2
View File
@@ -29,11 +29,11 @@ button,.chip,.tile,.item,.wday,.cal-d,.ck,.swatch,.emoji-cell,.hm-c,#tabbar,.ste
@media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}}
/* html carries the theme background too, so the iOS scroll-lock (position:fixed on body)
can never expose a grey strip below the app when a modal opens */
html{font-size:16px;background:var(--bg);overscroll-behavior:none}
html{font-size:16px;background:var(--bg);overscroll-behavior:none;overflow-x:clip}
body{
background:var(--bg); color:var(--txt);
font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',Roboto,sans-serif;
min-height:100vh; overscroll-behavior-y:none;
min-height:100vh; overscroll-behavior-y:none; overflow-x:clip;
-webkit-font-smoothing:antialiased; touch-action:manipulation;
}
button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}
@@ -144,6 +144,12 @@ a{color:var(--acc)}
.step input{width:58px;text-align:center;background:none;border:none;font-size:1.05rem;font-weight:700;outline:none;
-moz-appearance:textfield;appearance:textfield}
.step input::-webkit-inner-spin-button{display:none}
/* exercise-config sheet: three steppers side by side must shrink to fit narrow phones */
.cfgrow{gap:8px}
.cfgrow>div{flex:1;min-width:0}
.cfgrow .step button{width:32px}
.cfgrow .step input{width:100%;min-width:0}
.cfgrow .small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* ---------- workout ---------- */
.wprog{height:5px;background:var(--bg2);border-radius:99px;overflow:hidden;margin-bottom:14px}
+1 -1
View File
@@ -258,7 +258,7 @@ function ExConfig({ ex, existing, onSave, onDelete, close }) {
{cardio && <span className="tag acc">🏃 Cardio</span>}
<span className="tag">{ex.tg || ex.bp}</span><span className="tag">{ex.eq}</span>
</div>
<div className="row" style={{ justifyContent: 'space-around', marginBottom: 18 }}>
<div className="row cfgrow" style={{ marginBottom: 18 }}>
{cardio ? <>
<Stepper label="Intervals" value={c.sets} step={1} decimal={false} onChange={v => setC(x => ({ ...x, sets: v }))} />
<Stepper label="Minutes" value={c.min} step={1} decimal={false} onChange={v => setC(x => ({ ...x, min: v }))} />