Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Segmented controls: 32px tall instead of 30px, the inline ones in list rows unchanged

Duarte Santosbe7d735ec1ef
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 130744372..cc09b5eff 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -766,7 +766,7 @@ body.chips-dragging *{cursor:inherit}
.seg button{
position:relative;z-index:1;padding:6px 8px;font-size:14px;font-weight:500;
letter-spacing:-.006em;color:var(--label);display:flex;align-items:center;
- justify-content:center;gap:5px;min-height:30px;transition:opacity var(--fast);
+ justify-content:center;gap:5px;min-height:32px;transition:opacity var(--fast);
}
.seg button .icn{font-size:16px}
.seg button:not(.on){color:var(--label-2);font-weight:400}
diff --git a/frontend/src/segmented-height.test.js b/frontend/src/segmented-height.test.js
new file mode 100644
index 000000000..b8d80588b
--- /dev/null
+++ b/frontend/src/segmented-height.test.js
@@ -0,0 +1,17 @@
+// Segmented controls were 30px tall app-wide (Stats tabs, CSV range, cardio mode; night QA 10-19),
+// under the 32px the rest of the controls keep. The inline variant in list rows stays compact.
+import { describe, expect, it } from 'vitest'
+import { readFileSync } from 'node:fs'
+import { resolve } from 'node:path'
+
+const css = readFileSync(resolve(process.cwd(), 'src/index.css'), 'utf8').replace(/\/\*[\s\S]*?\*\//g, '')
+
+describe('segmented control height', () => {
+ it('gives every segment at least 32px', () => {
+ const rule = css.match(/\n\.seg button\{([^}]*)\}/)?.[1] || ''
+ expect(rule).toMatch(/min-height:32px/)
+ })
+ it('keeps the inline one in list rows as it was', () => {
+ expect(css.match(/\.seg-inline button\{([^}]*)\}/)?.[1]).toMatch(/min-height:28px/)
+ })
+})