-
Notifications
You must be signed in to change notification settings - Fork 58
Location field cleanup #853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
miles-grant-ibigroup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All is working well thanks for the changes!
amy-corson-ibigroup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small issue with the favorite places getting rendered in double parentheses, but otherwise everything looks great! Thank you so much for doing this
| /** | ||
| * Create a LocationField location object from a persisted user location object. | ||
| */ | ||
| function makeLocationFieldLocation(favoriteLocation: Fields) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe makeLocationFieldObject? makeLocationFieldLocation does seem a little unwieldy, but if that feels more appropriate I'll defer to you.
lib/util/user.js
Outdated
| name: address || name, | ||
| // HACK: If a place name and address are provided, put the address in parentheses | ||
| // to mimic the existing LocationField behavior for "work" and "home". | ||
| name: address && name ? `${name} (${address})` : address || name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed in e94f5a1.

Description
This PR updates
@opentripplanner/location-fieldto the latest version, notably:PR Checklist