feat(UpcomingDepartures): use vehicle status#2926
Conversation
joshlarson
left a comment
There was a problem hiding this comment.
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.
|
@joshlarson I refactored this enough that I feel like it may as well be a new PR 😵 |
joshlarson
left a comment
There was a problem hiding this comment.
This looks mostly good! I made a few non-blocking suggestions, and raised a few issues. The only two that are blocking for me are that I'm pretty sure we shouldn't be using vehicle_at_stop_status to figure Arriving, and that I do want to see test coverage that validates all of the pattern-matchings for :boarding (I'm happy to pair on this!).
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!