-
Notifications
You must be signed in to change notification settings - Fork 16
feat(UpcomingDepartures): use vehicle status #2926
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: main
Are you sure you want to change the base?
Conversation
joshlarson
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.
I like the approach! It's a bit different from how I was originally thinking this would be done, but I actually like your overall approach better!
My comment about showing Approaching for too long / still using the time even when we have vehicle info, is blocking.
|
|
||
| defp realtime_arrival_status(%{route_type: :subway, vehicle_status: vehicle_status}) | ||
| when vehicle_status != nil do | ||
| arrival_status_from_vehicle(vehicle_status) |
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.
|
@joshlarson I refactored this enough that I feel like it may as well be a new PR 😵 |

Scope
Asana Ticket: [SF/UD] Subway: 🐞 Use vehicle info to inform "Approaching"/"Arriving"/"Boarding"
Implementation
For each prediction, fetch the related vehicle. If that vehicle has a populated
statusand the vehicle's corresponding stop is the same as the stop we're viewing in SF2.0, then we use this to display "Approaching"/"Arriving"/"Boarding".How to test
Note this change only affects subway lines.
I like to watch Upcoming Departures alongside the corresponding screens in Screenplay. Screenplay doesn't update the previews as frequently as our LiveView updates, but you can see matching statuses!