Skip to content

Conversation

@thecristen
Copy link
Collaborator

@thecristen thecristen commented Jan 7, 2026

Summary of changes

Asana Ticket: [SF/UD] Ferry: Suppress Upcoming Departures entirely :-( and [SF/UD] All Modes: "No service today" message on days with no service

edit: I forgot to add screenshots!

(from dev-green, which doesn't yet have the next Pats game)
image

(from dev, which does have service)
image

ferry!
image

@thecristen thecristen requested a review from a team as a code owner January 7, 2026 19:48
Copy link
Contributor

@joshlarson joshlarson left a comment

Choose a reason for hiding this comment

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

I could be persuaded to approve anyway, but the style on the No Service callout doesn't match Figma. I'm open to either trying to convince Chase that what's in this PR is better and/or creating a follow-up ticket, but IMO the easiest path is to just match the Figma right now.

vehicle_name={@vehicle_name}
/>
<% else %>
<.callout>{~t(No service today)}</.callout>
Copy link
Contributor

Choose a reason for hiding this comment

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

The callout CSS class appears to apply a border and a border-radius, which makes it look a bit different from what's in Figma (Figma has sharp corners and no border).

stop_id={@stop.id}
vehicle_name={@vehicle_name}
/>
<%= if ServicePatterns.has_service?(route: @route.id) do %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Idea: I wonder if UpcomingDepartures itself should have some kind of short-circuit, to return a type like {:departures, list_of_departures} | :no_service_today

(...eventually to be expanded to something like {:departures, list_of_departures} | :no_service_today | {:future_service, first_scheduled_departure} to account for the case where it should say "Predicted departure times aren’t available yet, but they’ll appear here before the scheduled first trip.")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, you can add that when the feature you add warrants it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think my main thinking was that we don't have to bother even computing any predicted schedules, if we already know there's no service today (as indicated by the services endpoint). So why conflate that?

On the other hand, once we know there is service and we need to get into the more nuanced logic, then that could benefit from those short-circuited types.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think my main thinking was that we don't have to bother even computing any predicted schedules, if we already know there's no service today (as indicated by the services endpoint). So why conflate that?

I agree with that, but is there any reason that UpcomingDepartures.upcoming_departures/1 couldn't be the thing that calls ServicePattenrs and decides not to figure out predicted_schedules?

... in the future, I'm on board with 👇

Yeah, you can add that when the feature you add warrants it

@thecristen
Copy link
Collaborator Author

@joshlarson There's a thread in Figma where we discussed the discrepancy and agreed to align with the current callout style!

@joshlarson
Copy link
Contributor

@thecristen Ahaa found it!

I'm thinking that we don't want to use the border and rounded corners for callout-style things that are attached to the bottom of the upcoming-departures table - e.g. 👇 looks weird

Screenshot 2026-01-09 at 5 14 49 AM

compared to 👇

Screenshot 2026-01-09 at 5 15 08 AM

That means if we go this route, we'll have two different styles of callouts on the same page. (Three, if you count the different color background on the subway daily schedules thing).

@thecristen
Copy link
Collaborator Author

@joshlarson I agree with you on the attached callout benefiting from the original designed style. Once everything's on display together eventually our team will have to reckon with the three resulting styles. 🤷🏼‍♀️

Copy link
Contributor

@joshlarson joshlarson left a comment

Choose a reason for hiding this comment

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

I've been convinced to approve! But with two notes for things that we may want to follow up on now or soon.:

  1. The visual style one that I already mentioned. Eventually we'll need to reckon with the fact that there are two different styles for basically the same thing.
  2. This comment feels like a code-style analog to ☝️, where we have two different code styles to accomplish similar types of things (short-circuiting upcoming-departures so that we don't actually show the UD table). You can see the approach that I followed here. Eventually it would be good (but maybe not necessary?) to reconcile the two approaches.

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