Skip to content

Show imperial conversions next to metric route values - #14

Merged
SpencerLiang0114 merged 1 commit into
SpencerLiang0114:mainfrom
victory-c:imperial-units
Sep 22, 2026
Merged

SpencerLiang0114 merged 1 commit into
SpencerLiang0114:mainfrom
victory-c:imperial-units

Conversation

@victory-c

Copy link
Copy Markdown
Contributor

Summary

Adds imperial equivalents alongside every metric route value where the unit system matters. Metric stays primary; the imperial value is in parentheses.

  • New lib/units.ts helper (formatDistance, formatElevation, formatMiles, formatFeet) plus unit tests
  • Route card: distance, elevation gain, elev difference, lowest/highest elev → e.g. 8.4 km (5.2 mi), +118 m (+387 ft)
  • Saved routes, Strava picker (cards + search-radius note), route summary target distance
  • Distance goal presets: 5 km (3.1 mi), 42.2 km (26.2 mi), and the custom slider label
  • Elevation chart: secondary feet axis on the right, miles beneath each km tick

Unchanged on purpose: duration, avg grade (%), scores, and lat/lng — those are unit-system independent.

Test plan

  • pnpm vitest run (15 passing, incl. new units tests)
  • pnpm tsc --noEmit, pnpm eslint src
  • Checked the results page in the browser with a seeded route: card values and chart axes render correctly

🤖 Generated with Claude Code

Distances now read "8.4 km (5.2 mi)" and elevations "142 m (466 ft)"
across route cards, saved routes, Strava picker, route summary and the
distance-goal presets. The elevation chart gains a feet axis on the
right and miles under each km label.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 22, 2026 07:50
@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown

@victory-c is attempting to deploy a commit to the spencerliang0114's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
routecraft Ready Ready Preview Sep 22, 2026 2:52pm UTC

@SpencerLiang0114
SpencerLiang0114 merged commit e1cb4fc into SpencerLiang0114:main Sep 22, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 7176cd17 Deployed Sep 22, 2026 by vercel[bot]
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.

3 participants