From 827c0f85050140855e2dae60c3fe1bdb53a29a73 Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Fri, 24 Jul 2026 23:45:36 +0200 Subject: [PATCH] UI fixes found while testing the workout flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit · The rest timer floats above the tab bar, so it covered the set rows underneath it — during a rest, the next set was behind the bar. The page now gets enough bottom padding while a rest runs to scroll clear of it. · "Skip today", sitting right under "Save & start workout", reads like skipping the session rather than the weigh-in. It says "Start without weighing in". · The calendar legend drew "Planned" in blue while planned days have always had a grey dot. · Body weight showed "− 0" when it hadn't moved since the last weigh-in. · In a superset both exercises are on screen at once, so their animations give way: 180px meant scrolling a full screen between two exercises you are meant to alternate. --- frontend/src/components/RestTimer.jsx | 7 +++++++ frontend/src/index.css | 6 +++++- frontend/src/sheets.jsx | 4 ++-- frontend/src/views/Home.jsx | 5 +++-- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/RestTimer.jsx b/frontend/src/components/RestTimer.jsx index 3c315f8..cc6128d 100644 --- a/frontend/src/components/RestTimer.jsx +++ b/frontend/src/components/RestTimer.jsx @@ -1,3 +1,4 @@ +import { useEffect } from 'react' import { useUI } from '../store/useUI.js' import { t } from '../lib/i18n.js' import { Button } from './ui.jsx' @@ -5,6 +6,12 @@ import { Button } from './ui.jsx' export default function RestTimer() { const timer = useUI(s => s.timer) const { addRest, stopRest } = useUI() + // The bar is fixed above the tab bar and floats over whatever is beneath it — during a + // rest that was the next set's row. Extra bottom padding lets the page scroll clear. + useEffect(() => { + document.body.classList.toggle('resting', !!timer) + return () => document.body.classList.remove('resting') + }, [!!timer]) if (!timer) return null const pct = (timer.left / timer.total) * 100 const m = Math.floor(timer.left / 60), s = String(timer.left % 60).padStart(2, '0') diff --git a/frontend/src/index.css b/frontend/src/index.css index b216a4a..535e2f3 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -165,6 +165,8 @@ button,.chip,.tile,.item,.wday,.cal-d,.swatch,.hm-c,.lrow,.seg button,.stp butto padding:calc(var(--sat) + 8px) var(--pad) calc(128px + var(--sab)); max-width:560px;margin:0 auto; } +/* while the rest timer floats above the tab bar, keep its height scrollable-past */ +body.resting #app{padding-bottom:calc(206px + var(--sab))} @keyframes viewfade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}} #app.vfade{animation:viewfade var(--med) var(--ease)} @@ -525,7 +527,9 @@ h4.sec{ .exmedia .gifhint{right:9px} .exmedia .giftoggle{left:9px} .exmedia .gifhint .icn,.exmedia .giftoggle .icn{font-size:13px} -.exmedia.compact img{height:180px} +/* superset: both exercises are on screen together, so the animations have to give way — + at 180px you had to scroll a full screen between two exercises done back-to-back */ +.exmedia.compact img{height:120px} .exmedia.mini img{height:84px} .sethead{ diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx index ae86efa..5e5617c 100644 --- a/frontend/src/sheets.jsx +++ b/frontend/src/sheets.jsx @@ -108,7 +108,7 @@ function BwSheet({ required, onDone, close }) {
{required && <> -
+
} {!required && recent.length > 0 && <> @@ -652,7 +652,7 @@ function Calendar({ start, close }) {
{['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'].map(l =>
{t(l)}
)}{cells}
{t('Trained')} - {t('Planned')} + {t('Planned')} {t('Rescheduled')}
{t('Tap a trained day for details · tap any other day to plan a session')}
diff --git a/frontend/src/views/Home.jsx b/frontend/src/views/Home.jsx index db964c5..1a751f8 100644 --- a/frontend/src/views/Home.jsx +++ b/frontend/src/views/Home.jsx @@ -97,9 +97,10 @@ export default function Home() { {bw ? <>
{fmtNum(bw.w)} {S.unit}
- {delta !== null && ( + {/* only when it actually moved — an unchanged weight used to read as "− 0" */} + {!!delta && ( - 0 ? 'arrowUp' : delta < 0 ? 'arrowDown' : 'minus'} style={{ fontSize: 12 }} /> + 0 ? 'arrowUp' : 'arrowDown'} style={{ fontSize: 12 }} /> {fmtNum(Math.abs(delta))} )}