From d302088c11d0932cb017b62baff45601147e4059 Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Sun, 20 Sep 2026 16:29:30 +0200 Subject: [PATCH] =?UTF-8?q?Set=20rows:=20every=20give-way=20now=20lasts=20?= =?UTF-8?q?until=20the=20full-size=20row=20fits=20=E2=80=94=20the=20L/R=20?= =?UTF-8?q?effort=20=E2=88=92/+=20shrink=20once=20more=20at=20360=E2=80=93?= =?UTF-8?q?365=20px=20and=20the=20list=20view's=20cards=20keep=20their=20e?= =?UTF-8?q?xtra=20width=20to=20404=20px=20(QA=20re-test=20of=200b1072d)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two narrow bands were left where a set row was wider than the content box of the card it sits in, so its done tick reached into the card's side padding: 360–365 px on an L/R row with an effort column (over by 6, 5, 4, 3, 2 and 1 px, in a sets card inside a superset card or a list unit, cards, list and compact alike, with a rating logged or not), and 401–404 px on a plain row with an effort column in a superset in the list and compact view (over by 4, 3, 2 and 1 px). Nothing was clipped and nothing left the screen — the page never overflowed and every number field still had scrollWidth == clientWidth — but a row may not stand in its card's padding. Both are the same shape: a give-way that ends one pixel before the layout it hands back to fits. At 401 px the nested cards' padding snapped back to 16 + 14 + 14 per side and took 48 px off the row in the one pixel the screen had gained, leaving 281 px for cells that want 285; at 360 px the effort −/+ returned and asked for 35 px more than the row had. So each give-way now ends where its full-size counterpart fits. The padding give-back for the list view's units, superset cards and sets cards runs to 404 px instead of 400, because 405 px is the width where the three full insets and the row's 285 px of cells first add up to the screen. And the effort column, which had one step (nothing below 360 px, 64 px from 360), gets the intermediate one it was missing: from 360 to 365 px an L/R row's pill is 56 px, its −/+ shrinking to a 12 px floor. They are what that cell sheds first — a pixel lower they go altogether — and the rating keeps its 28 px tap target. The weight and reps columns were deliberately left alone: they have the 41 px numbers and the 18 px button floors of every other row, and "WEIGHT (KG)" needs 75.5 px of the weight column's 77, so taking the six pixels there would have wrapped the header onto a second line at the most common phone width there is. Measured with scripts/opengym-qa/run/r3-setrow-band/sweep.mjs on the QA rig (slot 31, slot 71 for fixes-0917), a 1 px sweep from 320 to 440 px across cards / list / compact x effort none / RIR / RPE x steppers on / off x a plain and an L/R row inside a superset and outside one (3630 measurements per build, values 102.5 / 227.5 kg, 12 / 100 reps per side, RIR 2.5 / RPE 8.5, Liberation Sans as the Roboto-metric proxy): before, 64 measurements had a row past its card's content box — exactly 360–365 and 401–404 px — and after, none, with no clipped number field, no card or unit past its parent or the screen and no page overflow anywhere in the sweep. The empty effort cell (empty-eff.mjs) was over by the same 6 / 3 / 1 px at 360 / 363 / 365 and is now 0. The effort cell is 56 px wide at 360–365 px and 64 px again at 366; the weight column stays 77 px and its header label one line (before: one line at 77 px, two at 73). The picker still opens: tap-effort.mjs at 360, 363 and 365 px in cards and list, taps at the value's centre ±6 px, 30 of 30 opened it. 320, 368 and 412 px lie outside both edges, and fix-setrow-layout/measure.mjs — the harness of 0b1072d, 108 combinations of width, view, effort, steppers and superset — prints byte-identical output on this build and on fixes-0917, 0 with problems (QA C2, C3, C4, C5, C21, C22, C24). --- frontend/src/index.css | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/frontend/src/index.css b/frontend/src/index.css index c343058..898dca8 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -871,6 +871,23 @@ body.chips-dragging *{cursor:inherit} .sethead.per-side{gap:4px} .sethead.per-side .n-sp{width:49px} } +/* The effort column steps down twice on the way to a narrow screen, not once. Its −/+ are gone + below 360 px (see the 359 px query), and from 366 px an L/R row carries them at full size in a + sets card two insets deep — in a list unit, or in a superset card. In between it could do + neither: the 64 px the pill needs for a 28 px value and two 16 px button floors left the row + 6, 5, 4, 3, 2 and 1 px wider than its card's content box at 360–365 px, so its done tick sat + in the card's side padding. The −/+ give way there too, to a 12 px floor — they are what the + cell sheds first, a pixel further down they go altogether — and the row keeps everything that + carries meaning: the rating stays a 28 px tap target, the weight and reps columns keep their + numbers, their buttons and their floors, and the header keeps its single line ("WEIGHT (KG)" + has 1.5 px to spare in a 77 px column and would wrap if the weight column paid instead). + An L/R row in a superset in the list view has no −/+ to shrink below 430 px; the rule for it + below is more specific and keeps the cell at 34 px. */ +@media (min-width:360px) and (max-width:365px){ + .setrow.side .effcell,.setrow.side .effcell-stp,.sethead.per-side .eff-sp{min-width:56px} + .setrow.side .effcell-stp>button[aria-label="Decrease"], + .setrow.side .effcell-stp>button[aria-label="Increase"]{min-width:12px} +} /* An L/R row with an effort column inside a superset in the list view sits behind three insets (unit, superset card, sets card): at 412 px the row is 260 px wide, and with the logged effort's −/+ its cells want 277 (badge, tick and gaps, weight 77, reps 66, effort 64). The @@ -1281,8 +1298,14 @@ body.chips-dragging *{cursor:inherit} /* A superset nests a card inside the page's own gutter, so its inset is paid twice. On a narrow phone that left the weight and reps steppers too tight to show a three-digit number — reported as "the reps textbox becomes too small when superset on mobile". The - card only gives up its own padding; the rows inside keep their spacing. */ -@media (max-width:400px){ + card only gives up its own padding; the rows inside keep their spacing. + The give-back runs to 404 px rather than 400, because it may not end before the full insets + fit: at 401 px they snapped back to 16 + 14 + 14 per side and took 48 px off the row while the + screen had gained one, so a plain row with an effort column in a superset in the list view — + 285 px of cells in a 281 px card — was 4, 3, 2 and 1 px wider than its card's content box at + 401–404 px and its done tick sat in the card's side padding. 405 px is the width where those + 285 px and the three full insets first add up to the screen, so that is where it ends. */ +@media (max-width:404px){ .ss-card{padding:10px 8px} /* The sets card nested in a superset card or a list unit pays a second inset, and in a superset in the list view a third; with an L/R row's set number, badge, two steppers, effort and tick @@ -1317,7 +1340,8 @@ body.chips-dragging *{cursor:inherit} .wl-unit{scroll-margin-top:calc(var(--whdr-h, var(--sat) + 80px) + 16px)} .wl-unit.cur{box-shadow:inset 0 0 0 1.5px var(--acc-line)} .wl-hd{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px} -@media (max-width:400px){ +/* part of the give-back above — one edge for all three insets of a row in the list view */ +@media (max-width:404px){ .wl-unit{padding:10px 8px 2px} }