Skip to content

Conversation

binh-dam-ibigroup
Copy link
Collaborator

This PR replaces the distance functions with the ones from the humanize-distance package from OTP-UI.

@codecov-io
Copy link

Codecov Report

Merging #151 into dev will increase coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #151      +/-   ##
==========================================
+ Coverage   12.97%   13.02%   +0.04%     
==========================================
  Files         116      115       -1     
  Lines        4586     4569      -17     
  Branches     1327     1321       -6     
==========================================
  Hits          595      595              
+ Misses       3384     3373      -11     
+ Partials      607      601       -6     
Impacted Files Coverage Δ
lib/components/narrative/default/access-leg.js 0.00% <0.00%> (ø)
lib/util/index.js 0.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60b4d74...7b5e934. Read the comment docs.

Copy link
Member

@landonreed landonreed left a comment

Choose a reason for hiding this comment

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

LGTM. I think we should take this opportunity to add a config item here though. If we wanted to show distance in metric units, we have no way of easily doing so. We do have a use case (B-ham) where we probably want to do this, so could you add a config key for useMetric (I'm open to other names) and pass this to the humanizeDistanceString calls? It probably makes sense to add this near the dateTime config item.

@landonreed landonreed removed their assignment Apr 27, 2020
@binh-dam-ibigroup
Copy link
Collaborator Author

Good idea on the configuration to switch to metric units.

@binh-dam-ibigroup
Copy link
Collaborator Author

We will deal with configuration to show narratives in metric in opentripplanner/otp-ui#116 and #158.

@binh-dam-ibigroup binh-dam-ibigroup merged commit 1c91553 into dev Apr 27, 2020
@binh-dam-ibigroup binh-dam-ibigroup deleted the otp-ui-humanize-distance branch April 27, 2020 20:48
@landonreed
Copy link
Member

🎉 This PR is included in version 1.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@landonreed
Copy link
Member

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants