Settings and Library QA: a segmented control that does not fit next to its row title wraps under it instead of painting over it (translated packs at 390px), the today title takes two lines, the Language row shows the whole pack name, swipe-to-delete rows share the card radius (no red corners), Best value does not wrap before its unit, FitNotes' stock bench-press name matches on import
This commit is contained in:
1 parent
33be28b8e6
commit
35c810a663
6 files changed
+27
-8
No files matched your search
@@ -71,7 +71,7 @@ export default function SwipeToDelete({ children, onDelete, deleteLabel, classNa
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div ref={outerRef} style={{ position: 'relative', overflow: 'hidden', borderRadius: 12 }}
|
||||
<div ref={outerRef} style={{ position: 'relative', overflow: 'hidden', borderRadius: 'var(--r-card)' }}
|
||||
onTouchStart={e => { if (e.target.closest('button,input')) return; start(e.touches[0].clientX, e.touches[0].clientY) }}
|
||||
onTouchEnd={end}
|
||||
onMouseDown={e => { if (e.button !== 0 || e.target.closest('button,input')) return; start(e.clientX, e.clientY) }}
|
||||
|
||||
+11
-4
@@ -249,7 +249,7 @@ h4.sec{
|
||||
none of the shrink — a long value would otherwise take the whole row and squeeze the title
|
||||
to 21px. A basis of 45% fixes that but reserves the space even for "3", costing the title
|
||||
141px on the rows that need it most. A cap does neither. */
|
||||
.lrow-v{color:var(--label-2);font-size:17px;letter-spacing:-.012em;flex:0 1 auto;max-width:45%;min-width:0;
|
||||
.lrow-v{color:var(--label-2);font-size:17px;letter-spacing:-.012em;flex:0 1 auto;max-width:55%;min-width:0;
|
||||
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}
|
||||
.lrow-c{color:var(--label);font-size:15px;flex:none;--icon-stroke:2.4}
|
||||
.lrow-k{color:var(--acc);font-size:17px;flex:none;--icon-stroke:2.4}
|
||||
@@ -540,8 +540,13 @@ body.chips-dragging *{cursor:inherit}
|
||||
.seg button .icn{font-size:16px}
|
||||
.seg button:not(.on){color:var(--label-2);font-weight:400}
|
||||
.seg button:active{opacity:.5}
|
||||
/* sitting in a list row: shrink to content instead of filling the row */
|
||||
.seg-inline{flex:none;min-width:132px}
|
||||
/* sitting in a list row: shrink to content instead of filling the row. The control never
|
||||
shrinks below its labels, so a row whose title and control do not both fit — most translated
|
||||
packs at 390px: "Übungs-Animationen" against "Voll · Klein · Aus" — wraps the control onto its
|
||||
own line under the title instead of painting it over the title. */
|
||||
.seg-inline{flex:none;min-width:132px;max-width:100%;margin-left:auto}
|
||||
.lrow:has(.seg-inline){flex-wrap:wrap}
|
||||
.lrow:has(.seg-inline) .lrow-m{min-width:min(150px,100%)}
|
||||
.seg-range{margin-bottom:10px}
|
||||
.seg-inline button{padding:5px 10px;font-size:13px;min-height:28px}
|
||||
.seg-inline button .icn{font-size:14px}
|
||||
@@ -1147,7 +1152,9 @@ body.chips-dragging *{cursor:inherit}
|
||||
.today-row .lbl2{font-size:11px;font-weight:500;letter-spacing:.03em;text-transform:uppercase;color:var(--label-3)}
|
||||
.today-row .ttl{
|
||||
font-weight:500;font-size:17px;line-height:1.25;text-transform:capitalize;
|
||||
letter-spacing:-.012em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px;
|
||||
letter-spacing:-.012em;margin-top:2px;
|
||||
/* two lines before the ellipsis: "Leg Day — in progress" grows past one line in hu/tr/th/pt-BR */
|
||||
display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;
|
||||
}
|
||||
|
||||
/* Only where a pointer really hovers — on a phone :hover sticks to the row after the tap.
|
||||
|
||||
@@ -158,7 +158,7 @@ function buildIndex() {
|
||||
// canonical barbell version, which is what these apps assume when they show it to you.
|
||||
// Extending this table is the intended way to improve import accuracy.
|
||||
const ALIAS_EX = {
|
||||
'bench press': '0025', 'barbell bench press': '0025', 'flat bench press': '0025',
|
||||
'bench press': '0025', 'barbell bench press': '0025', 'flat bench press': '0025', 'flat barbell bench press': '0025',
|
||||
'incline bench press': '0047', 'decline bench press': '0033',
|
||||
'close grip bench press': '0030', 'close-grip bench press': '0030',
|
||||
squat: '0043', 'back squat': '0043', 'barbell squat': '0043', 'front squat': '0042',
|
||||
|
||||
@@ -648,7 +648,7 @@ function ExerciseDetail({ ex, close }) {
|
||||
{(ex.secondaries?.length ? ex.secondaries : smOf(ex)).slice(0, 3).map((s, i) => <span key={i} className="tag">{t(s)}</span>)}
|
||||
</div>
|
||||
{ex.desc && <div className="exnote">{ex.desc}</div>}
|
||||
{best > 0 && <div className="small row" style={{ marginBottom: 6, gap: 5 }}><Icon name="trophy" style={{ fontSize: 14, color: 'var(--yellow)' }} />{t('Best:')} <b className="accent">{fmtNum(best)} {st.unit}</b>{last ? ` · ${t('last')} ${fmtDate(last.d)}: ${last.sets.map(s => setLabel(ex.id, s, last.target)).join(', ')}` : ''}</div>}
|
||||
{best > 0 && <div className="small row" style={{ marginBottom: 6, gap: 5 }}><Icon name="trophy" style={{ fontSize: 14, color: 'var(--yellow)' }} />{t('Best:')} <b className="accent" style={{ whiteSpace: 'nowrap' }}>{fmtNum(best)} {st.unit}</b>{last ? ` · ${t('last')} ${fmtDate(last.d)}: ${last.sets.map(s => setLabel(ex.id, s, last.target)).join(', ')}` : ''}</div>}
|
||||
<Button variant="primary" icon="plus" style={{ margin: '10px 0 4px' }} onClick={() => addToRoutineSheet(ex)}>{t('Add to my plan')}</Button>
|
||||
{last && <Button icon="history" style={{ marginTop: 4 }} onClick={() => exerciseHistorySheet(ex.id)}>{t('History')}</Button>}
|
||||
{ex.custom && <div className="row" style={{ gap: 8, marginTop: 8 }}>
|
||||
|
||||
@@ -36,7 +36,7 @@ describe('Stats mixed-entry metric contract', () => {
|
||||
expect(uiSource).toContain("className={stackedValue ? 'lrow-stack-value' : ''}")
|
||||
expect(cssSource).toContain('.lrow.lrow-stack-value .lrow-m{grid-column:1;grid-row:1}')
|
||||
expect(cssSource).toContain('.lrow.lrow-stack-value .lrow-v{grid-column:1;grid-row:2;width:100%;max-width:none;text-align:left}')
|
||||
expect(cssSource).toContain('flex:0 1 auto;max-width:45%;min-width:0;')
|
||||
expect(cssSource).toContain('flex:0 1 auto;max-width:55%;min-width:0;')
|
||||
expect(cssSource).toContain('overflow:hidden;text-overflow:ellipsis;white-space:nowrap')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user