Skip to content

Add metric/imperial display units to the dashboard - #9

Merged
aderaaij merged 3 commits into
aderaaij:mainfrom
johnzanussi:feat/unit-preference
Nov 11, 2026
Merged

aderaaij merged 3 commits into
aderaaij:mainfrom
johnzanussi:feat/unit-preference

Conversation

@johnzanussi

@johnzanussi johnzanussi commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Adds a Metric / Imperial setting so distance, pace and weight can show as mi, min/mi and lb.

  • Metric by default; imperial is opt-in under Settings → Units, stored per browser.
  • Conversions live in lib/format.ts and are used across Overview, Workouts, Workout detail, Health, Plans and Queue.
  • Display only. The API, wire types and iOS app stay metric.
  • Splits stay 1 km (only their pace converts), and protein stays g/kg.
  • Fixes a Queue bug where a goal in miles was divided by 1,000.

Testing: frontend typecheck, lint and build pass.

Add a metric/imperial preference (default from the browser locale,
override in Settings, stored in localStorage) and convert distance, pace
and weight for display through shared helpers in lib/format.ts. The API
and wire formats stay metric.
@aderaaij

Copy link
Copy Markdown
Owner

@johnzanussi thanks for this, super nice addition and it didn't even cross my mind as European, haha. I'll have a look for the app as well, at one point.

One change request before I merge: I'prefer metric as the default with imperial as an opt-in. en-US is the default browser language for a lot of people outside the US so I'd rather not 'guess. What do you think? Thanks!

@johnzanussi

Copy link
Copy Markdown
Contributor Author

@aderaaij Ah yes, that make sense. I will get that change in later today.

Drop the browser-locale guess: en-US is the default language for plenty of
people outside the US.
@aderaaij

Copy link
Copy Markdown
Owner

@aderaaij Ah yes, that make sense. I will get that change in later today.

thank you! mind fixing the merge conflict (readme) as well? Thanks. I've submitted the app for beta review btw, so hopefully It'll be in public testflight soon. Will let you know

@johnzanussi

Copy link
Copy Markdown
Contributor Author

@aderaaij Done!

@aderaaij
aderaaij merged commit d5a0c44 into aderaaij:main Nov 11, 2026
3 checks passed
@aderaaij

Copy link
Copy Markdown
Owner

@johnzanussi thank you!! TestFlight link for the app is a go: https://testflight.apple.com/join/fV73tucs. Thanks again for checking it out!

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.

2 participants