Skip to content

Conversation

@joshlarson
Copy link
Contributor

Scope

Asana Ticket: [SF/UD] All Modes: Disambiguate upcoming departures by trip ID AND stop sequence

Implementation

This does two things:

  • Adds stop_sequence to the %UpcomingDeparture struct and uses that as well as trip_id to set the HTML element ID for the upcoming departure rows, thus removing duplicate ID's on certain pages. This fixes a bug, because LiveView gets pretty confused when there are duplicate ID's on live-updating elements (see screenshot below).
  • Uses stop_sequence as well as stop_id to determine which stop to highlight in the expanded trip details.

Screenshots

Duplicate ID Behavior

Screenshot 2026-01-23 at 6 56 25 PM

Better stop-pin markers

Screenshot 2026-01-23 at 6 38 10 PM Screenshot 2026-01-23 at 7 07 57 PM

How to test

Visit a route/stop combo that's visited multiple times by the same trip (e.g. the 8 at Ruggles), and expand different departures for the same trip (for the 8 at Ruggles, you'll be able to tell because they come in pairs separated by 1-2 minutes). Rejoice that each trip details only has one stop pin, and the stop pins are different between them (for the 8 at Ruggles, the first one will have a pin at Upper Busway and the second will have a pin at Lower Busway Lane 1).

You could also check the 120 at Orient Heights - there won't be duplicate departure rows, because the second visit is the end of the trip, but you can still rejoice at the absence of a stop pin on the second Orient Heights visit in trip details.

@joshlarson joshlarson requested a review from a team as a code owner January 24, 2026 00:11
@joshlarson joshlarson requested a review from thecristen January 24, 2026 00:11
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.

2 participants