From 42402cae0c411b2a0b9eec0a0371ebe6ea106855 Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Tue, 21 Jul 2026 19:08:07 +0200 Subject: [PATCH] Lower weight slider floor to 1kg, add +-1/+-0.5 quick-step buttons 20kg was too high a floor for light dumbbell work. Also added -1/-0.5/ +0.5/+1 chip buttons alongside the existing fine +-0.1 pair, so coarse adjustments don't need dozens of taps. --- frontend/src/sheets.jsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx index 3572501..7166715 100644 --- a/frontend/src/sheets.jsx +++ b/frontend/src/sheets.jsx @@ -48,7 +48,7 @@ export function loadStarterPlan() { // attempt) makes the thumb's position unpredictable: every time it grows, everything already // placed on it shifts toward one side. A static range never has that problem, at the cost of // coarser precision per pixel — the +/- buttons cover exact values. -const W_LO = 20, W_HI = 300 +const W_LO = 1, W_HI = 300 function WeightInput({ value, setValue, unit }) { const clamp = x => Math.max(W_LO, Math.min(W_HI, Math.round((x || 0) * 10) / 10)) const sv = Math.max(W_LO, Math.min(W_HI, value)) @@ -56,9 +56,15 @@ function WeightInput({ value, setValue, unit }) { const onSlide = v => setValue(clamp(v)) return <>
- +
{fmtNum(value)} {unit}
- + +
+
+ + + +
onSlide(parseFloat(e.target.value))}