-
Notifications
You must be signed in to change notification settings - Fork 16
fix(SF2.0/UpcomingDepartures): Don't line-wrap times; do line-wrap headsigns #2890
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?
fix(SF2.0/UpcomingDepartures): Don't line-wrap times; do line-wrap headsigns #2890
Conversation
|
|
||
| ~H""" | ||
| <span> | ||
| <span class="text-nowrap"> |
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.
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.
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.
| <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> | ||
| • {@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> | ||
| • {@upcoming_departure.platform_name || ~t"Track TBA"} | ||
| </span> | ||
| </div> | ||
| </div> |
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.
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?
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.
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.)
Scope
Asana Ticket: [SF/UD] ποΈπ Headsigns don't line-wrap; times do
Implementation
Screenshots
(Before on the left; After on the right)
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