Skip to content

Steps calibration: replace the manual slider with a stepper (#698) - #704

Merged
ryanbr merged 1 commit into
ryanbr:mainfrom
digitalerdude:fix/698-step-calibration-textfield
Jul 22, 2026
Merged

ryanbr merged 1 commit into
ryanbr:mainfrom
digitalerdude:fix/698-step-calibration-textfield

Conversation

@digitalerdude

Copy link
Copy Markdown

Fixes #698.

Problem

The manual steps-coefficient override (Settings → Profile → "Steps estimate" → Adjust manually) used a Slider spanning 0..stepperMax, where stepperMax is at least 100 (maxOf(autoFit, manual, 50.0) * 2). Real-world coefficients sit around 1-2 (the reporter's auto-fit was 1.4), so that whole usable range was compressed into a handful of drag pixels — landing on a specific value like 1.2 instead of 1.3 or 1.5 was essentially impossible by touch.

Fix

Replaced the slider with a StepperField — the same shared component the Profile card already uses for age/weight/height (-/+ buttons + a numeric readout), so this matches an established, already-accessible pattern instead of inventing a new one.

  • Each tap moves the coefficient by a fixed 0.1, so any one-decimal value is reachable exactly.
  • Nudging starts from whichever value is currently effective — the auto-fitted coefficient until the user first overrides it — so going from an auto 1.4 to a manual 1.2 is two taps, not a drag from zero.
  • Stepping all the way down to 0.0 still means "auto-fit", matching the old "drag to the far left" behavior; there's no separate reset control needed.
  • Since every tap commits immediately (like the other steppers), the old drag-draft/commit-on-release machinery (draftManual, onCommit, the 0.5 commit-rounding) is no longer needed and is removed.
  • Dropped the two now-orphaned "Auto"/"High" slider-endpoint strings (l10n_steps_calibration_screen_auto_c614ba7c / ..._high_...) from all five locale catalogs (en/de/es/fr/zh) — confirmed no other references first.

Scope

Pure Android/Kotlin UI fix, no analytics/formula/stored-value change (ProfileStore.stepsManualCoefficient keeps the exact same meaning and persistence, just written by a stepper instead of a slider) — no iOS twin needed for this.

Testing

  • ./gradlew compileFullDebugKotlin ✓ (JDK 17 via Homebrew; android.yml is disabled so this is local-only for now)
  • ./gradlew testFullDebugUnitTest --tests "com.noop.ui.*" ✓, all existing tests still pass
  • python3 Tools/i18n_audit.py ✓ — no new hardcoded-literal or missing-translation findings from this diff; the string removals leave zero gaps across de/es/fr/zh
  • Not tested on a physical device (no Android device available in this environment) — this is a pure Compose UI control swap with no BLE/analytics path touched, so the main risk is visual/layout, not correctness

The manual coefficient override used a Slider spanning 0..stepperMax
(at least 0..100), so a real-world value like 1.2-1.4 sat in a
handful of drag pixels and was practically undraggable.

Replaced it with a StepperField (0.1 per tap), the same control the
Profile card already uses for age/weight/height. Nudges start from
whichever value is currently effective (the auto fit, until first
overridden), so reaching a nearby value like 1.2 from an auto-fitted
1.4 is two taps. Stepping all the way down to 0 still returns to
auto-fit, matching the old "drag to far left" behaviour.

Dropped the now-unused "Auto"/"High" slider-endpoint strings from all
five locale catalogs.
@digitalerdude
digitalerdude marked this pull request as ready for review July 21, 2026 14:44
@ryanbr
ryanbr merged commit 28a660f into ryanbr:main Jul 22, 2026
1 check passed
DX23876 pushed a commit to DX23876/noop that referenced this pull request Jul 22, 2026
…tion-textfield

Steps calibration: replace the manual slider with a stepper (ryanbr#698)
simoncad7 pushed a commit to simoncad7/noop that referenced this pull request Aug 17, 2026
…tion-textfield

Steps calibration: replace the manual slider with a stepper (ryanbr#698)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slider in the manual step calibration too sensitive

2 participants