Skip to content

chore: extract Upcoming Departures into a LiveView#3219

Open
thecristen wants to merge 2 commits into
mainfrom
cbj/upcoming-departures-lv
Open

chore: extract Upcoming Departures into a LiveView#3219
thecristen wants to merge 2 commits into
mainfrom
cbj/upcoming-departures-lv

Conversation

@thecristen
Copy link
Copy Markdown
Collaborator

Scope

I got tired of navigating the gigantic codebase of DotcomWeb.ScheduleFinderLive, and I think Upcoming Departures has enough of its own thing going on that it could be extracted. You can render child LiveViews within parent LiveViews. So now here is a new LiveView, dedicated to Upcoming Departures.

Implementation

Most of the code was migrated as-is*. I moved a few smaller functional components into separate files, so that other files could easily import them. I added some more documentation in various spots.

*I changed the computation of the last trip time, slightly. Just felt like we could use a simpler query.
*I also slightly adjusted it to use start_async/3 and handle_async/3 instead of assign_async/3, felt easier to reason about and try to capture errors for

Screenshots

No change! This should result in no visible changes from the current implementation.

How to test

No idea, but there are a few new tests covering some of the upcoming departures functionality now!

@thecristen thecristen requested a review from a team as a code owner May 29, 2026 19:05
@thecristen thecristen requested a review from joshlarson May 29, 2026 19:05
@thecristen thecristen enabled auto-merge (squash) May 29, 2026 19:05
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.

1 participant