Skip to content
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

Disruption list route filter #1133

Merged
merged 4 commits into from
Feb 27, 2025
Merged

Disruption list route filter #1133

merged 4 commits into from
Feb 27, 2025

Conversation

lemald
Copy link
Member

@lemald lemald commented Feb 26, 2025

Summary of changes

Asana Ticket: 🏹 Implement route selection + button filters

[Please include a brief description of what was changed]

Reviewer Checklist

  • Meets ticket's acceptance criteria
  • Any new or changed functions have typespecs
  • Tests were added for any new functionality (don't just rely on Codecov)
  • This branch was deployed to the staging environment and is currently running with no unexpected increase in warnings, and no errors or crashes.

@lemald lemald force-pushed the lem-route-filter branch 4 times, most recently from 5974436 to c1e8d8b Compare February 26, 2025 19:58
@lemald lemald requested review from a team and cmaddox5 and removed request for a team February 26, 2025 20:34
@lemald lemald marked this pull request as ready for review February 27, 2025 15:02
Copy link
Contributor

@cmaddox5 cmaddox5 left a comment

Choose a reason for hiding this comment

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

Looks good! Played around with it locally and all is working. Just have one non-blocking question/suggestion.

@@ -20,7 +20,11 @@ defmodule ArrowWeb.DisruptionV2Controller.Filters do

@behaviour Behaviour

@type t :: %__MODULE__{view: Calendar.t() | Table.t()}
@type t :: %__MODULE__{
kinds: MapSet.t(atom()),
Copy link
Contributor

Choose a reason for hiding this comment

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

question: I know kinds is a term from v1, but it feels odd to me. Does it make sense to just go with routes instead since it will always hold route IDs anyway?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, that's a good point. The one thing that gives me pause about that though is that it will eventually also include Commuter Rail, which is a mode as opposed to a route, so it's actually kind of a heterogeneous mix of routes and modes, and I'm not really sure of a better term that captures both of those things.

<% show_as_active? = MapSet.size(@filters.kinds) == 0 or kind in @filters.kinds %>
<% active_class = if(show_as_active?, do: "active", else: "") %>

<.link
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should look into this page using LiveView in the future? Would be nice if the filters worked without a page load.

@lemald lemald merged commit 909a50c into master Feb 27, 2025
40 checks passed
@lemald lemald deleted the lem-route-filter branch February 27, 2025 16:20
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