-
Notifications
You must be signed in to change notification settings - Fork 58
Add stop code to place name in nearby view from/to picker #1482
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
base: dev
Are you sure you want to change the base?
Conversation
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.
Looks good, just some small issues. Also, what happens if no stop code is defined? Isn't there already a lot of code for handling what to do with stops in all these cases?
const feedId = place.gtfsId.split(':')[0] | ||
const feed = feeds.find((f) => f.feedId === feedId) | ||
const feedName = feed?.publisher?.name | ||
placeForFromTo.name = `${place.name} (${feedName} ${place.code})` |
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.
What if there is no place.code
e96030e
to
0f35ea9
Compare
I accidentally broke off from binh's branch but I figured it was getting merged so it wasn't a big deal. I rebased now and it looks good. |
So, we do have this PR which sort of has the same logic. However I'm not really sure I see a great way to reuse it here unless we extract a very simple function which I think would be overkill... I can do it if you think that would be better overall. |
Description:

This PR adds the stop code to the nearby view's from/to picker's place name. Clicking on from/to on a stop in the nearby view will now include this information in the location field.