Skip to content

chore: remove DotcomWeb.Components.Prototype#3096

Merged
thecristen merged 3 commits intomainfrom
cbj/remove-picker
Apr 9, 2026
Merged

chore: remove DotcomWeb.Components.Prototype#3096
thecristen merged 3 commits intomainfrom
cbj/remove-picker

Conversation

@thecristen
Copy link
Copy Markdown
Collaborator

Scope

Asana Ticket: 📅🔎🚀 | QF | Pre-release, remove the testing route/direction/stop selector from the top

Implementation

Removed the component, then realized we don't need the handle_params/3 callback, as that's useful when navigating within a LiveView.

  • Instead, we can do all of our data loading in mount/3. So I did this refactor, which let me remove some of the smaller intermediate functions like assign_route/2 or assign_stop/2.
  • I also tweaked the "go to 404" handling slightly to handle this in the mount/3 as well. Turns out you can raise an exception.
  • I removed a few :if={@stop} from the template, since by the time we render we've already fetched the stop.

The diff looks more dramatic than it actually is, because nothing else was changed here...

Screenshots

It looks the same, but without the buttons for switching any of the URL params.

image

How to test

Manually try different URLs 😩

  • /departures should redirect to /schedules
  • /departures with a combination of URL params that doesn't have a valid route_id, direction_id or stop_id will return the 404 page

@thecristen thecristen requested a review from a team as a code owner April 8, 2026 19:25
@thecristen thecristen added the dev-blue Deploy to dev-blue label Apr 8, 2026
@thecristen thecristen requested a review from joshlarson April 8, 2026 19:25
Copy link
Copy Markdown
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.

Goodbye Prototype Picker! It was a good run 🥲

Comment thread lib/dotcom_web/live/schedule_finder_live.ex
Comment thread lib/dotcom_web/views/error_view.ex
@thecristen thecristen enabled auto-merge (squash) April 9, 2026 14:43
@thecristen thecristen merged commit a217d75 into main Apr 9, 2026
34 checks passed
@thecristen thecristen deleted the cbj/remove-picker branch April 9, 2026 14:43
@github-actions github-actions Bot removed the dev-blue Deploy to dev-blue label Apr 14, 2026
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.

2 participants