List view clears the sticky header at its real height — a wrapped workout name hid the current exercise's header row (QA C27)
The scroll margin that keeps the current unit out from under the pinned header was a fixed 96 px, the height of a one-line header. The header renders the session name without truncation, so a descriptive routine name or a two-routine "A + B" session makes it two to five lines tall and the unit's label, Current badge and menu ended up underneath it. Workout.jsx measures the header right before it scrolls and hands the height to the list as --whdr-h; .wl-unit's scroll-margin-top uses it (safe area included, since the header's padding carries it) and keeps the one-line height as the fallback. Measured on the QA rig (scripts/opengym-qa/run/fix-list-scroll/measure.mjs, gap from header bottom to the current unit's top, tab-bar return with "Set current" on the 4th exercise; before: negative = covered): 320 px 8ch 12 | 42ch (143 px header) 12, before −51 | 62ch (165) 12, before −73 368 px 8ch 11 | 42ch (121) 12, before −29 | 62ch (143) 12, before −51 412 px 8ch 11 | 42ch (99) 12, before −7 | 62ch (121) 12, before −29 backfilled session, 42ch name, via ⋯ → Layout → List at 368 px: 16
This commit is contained in:
1 parent
6e39fbd4b4
commit
a54e4b6e8a
3 files changed
+24
-3
No files matched your search
@@ -1165,8 +1165,10 @@ body.chips-dragging *{cursor:inherit}
|
||||
border-radius:var(--r-lg);padding:14px 14px 4px;
|
||||
background:var(--surface-2);
|
||||
}
|
||||
/* scrolled to when the list opens (#224): clear the sticky header above it */
|
||||
.wl-unit{scroll-margin-top:calc(var(--sat) + 96px)}
|
||||
/* scrolled to when the list opens (#224): clear the sticky header above it. Workout.jsx
|
||||
measures the header (--whdr-h on .workout-list, safe area included) because it grows when
|
||||
the session name wraps; the fallback is the height of a one-line header. */
|
||||
.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){
|
||||
|
||||
Reference in new issue
Block a user