Skip to content

Conversation

daniel-heppner-ibigroup
Copy link
Contributor

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.
image

Copy link
Collaborator

@miles-grant-ibigroup miles-grant-ibigroup left a 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})`
Copy link
Collaborator

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

@daniel-heppner-ibigroup
Copy link
Contributor Author

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.

@daniel-heppner-ibigroup
Copy link
Contributor Author

daniel-heppner-ibigroup commented Oct 15, 2025

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.

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