Skip to content

Add explicit "Leave At" time to Trip Planner results#144

Merged
aaronbrethorst merged 2 commits intoOneBusAway:mainfrom
diveshpatil9104:feature/trip-planner-departure-time
Jan 23, 2026
Merged

Add explicit "Leave At" time to Trip Planner results#144
aaronbrethorst merged 2 commits intoOneBusAway:mainfrom
diveshpatil9104:feature/trip-planner-departure-time

Conversation

@diveshpatil9104
Copy link
Contributor

Fixes #143

Summary

This PR updates the TripPlannerResults list to explicitly display the Departure Time ("Leave at") for each itinerary option. Previously, users only saw the Duration and Arrival Time (ETA), forcing them to do mental math to figure out when to leave the house.

Changes

  • Modified: ItineraryPreviewView.swift
  • Update: Added an HStack to display Leave at: [startTime] • Arrive: [endTime].
  • Styling: Used secondary foreground styles to maintain visual hierarchy, keeping the Duration as the primary focus.

Screenshots

Before After

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

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

hi thanks for your contribution!

  • change to "Depart:" and "Arrive:"
  • Make both times .medium
  • Use localization keys or at least update the the string tables with empty placeholders

@diveshpatil9104
Copy link
Contributor Author

Thanks for the feedback. I made the following changes:

  • Switched labels to Depart: and Arrive: using OTPLoc keys.
  • Added translations for en, es, and zh-Hans.
  • Updated the start and end times to use .fontWeight(.medium).

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

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

nice work @diveshpatil9104!

@aaronbrethorst
Copy link
Member

@diveshpatil9104 tests are failing :(

@diveshpatil9104
Copy link
Contributor Author

I noticed that too. I checked the logs and the failures are in TripPlannerViewModelTests, which I didn't modify in this PR. 🥲Since this seems to be a pre-existing issue unrelated to the UI changes..

@aaronbrethorst
Copy link
Member

@diveshpatil9104 duly noted!

@aaronbrethorst aaronbrethorst merged commit 8f7b889 into OneBusAway:main Jan 23, 2026
2 of 3 checks passed
@diveshpatil9104
Copy link
Contributor Author

diveshpatil9104 commented Jan 23, 2026

@aaronbrethorst Thanks for the quick merge!
Just wanted to mention something I noticed while looking into the logs - it seems like TripPlannerViewModelTests uses a short 0.2s sleep to wait for the network. Since the tests appear to be hitting the real API, I'm not sure, but that short timeout might be why it's flaky on the CI server compared to local. 🙄

image

@diveshpatil9104 diveshpatil9104 deleted the feature/trip-planner-departure-time branch January 30, 2026 09:23
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.

Make it more clearer when a rider has to walk out the door

2 participants