Skip to content

Conversation

@joshlarson
Copy link
Contributor

Scope

Asana Ticket: [SF/UD] πŸ‘οΈπŸž Headsigns don't line-wrap; times do

Implementation

  • Changed the route-icon, headsign, (optional track info) layout from a grid to a flexbox, since I wasn't sure how to do what I wanted using a grid.
  • Put an invisible route icon to the left of the optional track info so that it would be aligned properly.

Screenshots

(Before on the left; After on the right)

Screenshot 2026-01-16 at 2 31 23β€―PM Screenshot 2026-01-16 at 2 19 36β€―PM

How to test

Go to any route/stop combo and squish the window size down (or increase the default font size) so that things start wrapping. Pictured above are CT2 at Ruggles and Haverhill Line at Bradford.

Notes

This supercedes #2858


~H"""
<span>
<span class="text-nowrap">
Copy link
Collaborator

Choose a reason for hiding this comment

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

suggestion: This module has a <.formatted_time /> component that pretty much does this. I suggest using it! You can modify it to support a custom class so you can bold or strikethrough it at will.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines 687 to 705
<div class="flex flex-col gap-1.5">
<div class="flex items-center gap-2">
<RouteComponents.route_icon size="small" route={@upcoming_departure.route} class="shrink-0" />
<div />
<div :if={@upcoming_departure.trip_name} class="leading-none text-xs">
{gettext("Train %{trip_name}", trip_name: @upcoming_departure.trip_name)}
<span>
&bull; {@upcoming_departure.platform_name || ~t"Track TBA"}
</span>
<div>{@upcoming_departure.headsign}</div>
</div>
<div :if={@upcoming_departure.trip_name} class="flex items-center gap-2">
<div class="h-0 invisible shrink-0">
<RouteComponents.route_icon size="small" route={@upcoming_departure.route} />
</div>
<div class="leading-none text-xs">
{gettext("Train %{trip_name}", trip_name: @upcoming_departure.trip_name)}
<span>
&bull; {@upcoming_departure.platform_name || ~t"Track TBA"}
</span>
</div>
</div>
Copy link
Collaborator

@thecristen thecristen Jan 16, 2026

Choose a reason for hiding this comment

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

not blocking: πŸ˜ƒ soo.. how much effort do we think it'd be to extract this (icon + title/headsign + subtitle) so we can use it in Daily Schedules?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Re-reading this comment, I think I may have missed the prompt slightly.

But I don't hate the result, or the result of actually using it in Daily Schedules!

(If you don't like it, or would rather have them as a separate PR, feel free to revert those two commits on this branch before approving.)

@joshlarson joshlarson requested a review from thecristen January 17, 2026 02:35
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