feat: Render CR Station Closures as Stop(s) Skipped
#2918
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Scope
Asana Ticket: ❗[AM Alerts] Update CR status station bypass to stop(s) skipped
Implementation
<.commuter_rail_status />combines alert count and effect to form a label.<.commuter_rail_status />and<.commuter_rail_route_status />to map:station_closureto"Stop(s) Skipped"instead of"Station Closure(s)".Alert.human_effect/1just return"Stop Skipped"when given%Alert{effect: :station_closure}? Shouldhuman_effect/1own pluralized effects (becauseInflex.pluralizewon't work onStop Skipped, and also isn't translateable)?Screenshots
Mode page
Before

After

Route page
Before on the left; After on the right

How to test
Right now, there are a lot of test alerts, so there aren't actually any CR routes where a station closure would be visible on the commuter rail status page (since they all get collapsed into
Service AlertsorSee Alerts. When I tested locally, I commented outservice_change: 3from the definition of@service_impacting_alertsso that the station closures wouldn't get drowned out, which is what's in the screenshots above.