[openstreetmap/openstreetmap-website] Add kilometers/miles switch to directions (PR #5915)

Anton Khorev notifications at github.com
Thu Apr 10 15:18:22 UTC 2025


![image](https://github.com/user-attachments/assets/7dd84bcc-8ae1-46d2-890d-ee62e1277dcd)

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5915

-- Commit Summary --

  * Show/hide directions spinner instead of copying
  * Use different divs for directions error and route outputs
  * Write most of route html using erb template
  * Move directions template strings out of javascript
  * Add km/mi buttons to directions
  * Enable km/mi switching in route summary
  * Enable km/mi switching in route steps
  * Move distance in units translations into their own scope
  * Share distance formatting code branches between km/mi

-- File Changes --

    M app/assets/javascripts/index/directions-route-output.js (150)
    M app/assets/javascripts/index/directions.js (23)
    M app/views/directions/search.html.erb (46)
    M app/views/layouts/_search.html.erb (8)
    M config/locales/en.yml (23)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5915.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5915.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5915
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5915 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250410/fd8bc6a5/attachment.htm>


More information about the rails-dev mailing list