Skip to content

Conversation

daniel-heppner-ibigroup
Copy link
Contributor

Description:
We needed to render the agency name for a stop in the stop popup. Sadly this information is not easy to get, it requires another network request. This change provides a callback for the tile overlay to request information about a stop ID, and then gives it a map of all the stops from the transit index along with their agency object. Note that because the stops can have multiple agencies, we just take the first one. Feel free to suggest a different behavior for shared stops.

@daniel-heppner-ibigroup
Copy link
Contributor Author

Blocked by opentripplanner/otp-ui#857

@daniel-heppner-ibigroup
Copy link
Contributor Author

This is blocked as in we can't merge it until we have the new version numbers, but it can be reviewed!

@miles-grant-ibigroup
Copy link
Collaborator

This is blocked as in we can't merge it until we have the new version numbers, but it can be reviewed!

otp-ui is ready for merge! I'll wait until this PR has the updated package version and merge conflicts fixed

@daniel-heppner-ibigroup daniel-heppner-ibigroup removed the BLOCKED Blocked (waiting on another PR to be merged) label Jul 29, 2025
@miles-grant-ibigroup
Copy link
Collaborator

Is this ready for review? If so, can you update package versions and fix merge conflicts?

@daniel-heppner-ibigroup
Copy link
Contributor Author

done!

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.

A few questions

Comment on lines 178 to 184
getAgencyFromStopId = async (stopId: string) => {
this.props.findStopTimesForStop({
date: getCurrentDate(),
stopId
})
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

What's this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops! no longer needed

@@ -462,6 +478,7 @@ class DefaultMap extends Component {
const mapStateToProps = (state) => {
const activeSearch = getActiveSearch(state)
const viewedRoute = state.otp?.ui?.viewedRoute?.routeId
const stops = state.otp.transitIndex.stops
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 transitIndex is undefined

@@ -486,6 +503,7 @@ const mapStateToProps = (state) => {
bikeRentalStations: state.otp.overlay.bikeRental.stations,
carRentalStations: state.otp.overlay.carRental.stations,
config: state.otp.config,
feeds: state.otp.transitIndex.feeds,
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 transit index is undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it won't be, it's defined in the initial state in the reducer.

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.

This PR is making the stop code appear twice. Is there any way to make this optional? Screenshot 2025-08-08 at 3 46 24 PM

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.

Works well and code looks good! STill seeing some funky behavior when clickign on stations but I guess that's ok?

@binh-dam-ibigroup
Copy link
Collaborator

I am not seeing the updated text using other languages (e.g. Spanish). Any ideas? I'll try a to find the cause of that.

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Necessary changes for the scope of this PR seem fine. Out of scope for this PR: Better i18n handling for stop id formatting in other languages.

@daniel-heppner-ibigroup daniel-heppner-ibigroup merged commit 405d1cd into dev Sep 3, 2025
9 checks passed
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.

4 participants