8000 feat(RouteCardData): Disruption on branch cases by KaylaBrady · Pull Request #918 · mbta/mobile_app · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(RouteCardData): Disruption on branch cases #918

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

Merged
merged 7 commits into from
Apr 25, 2025

Conversation

KaylaBrady
Copy link
Collaborator
@KaylaBrady KaylaBrady commented Apr 25, 2025

Summary

Ticket: 🤖 | Group By Direction | Disruption on a branch

What is this PR for?

With this PR, we now show a separate row for disrupted branches when grouped by headsign to match designs.
Grouping by headsign when we know we are dealing with a branched route seemed like the most straightforward way to accomplish this. TY to @EmmaSimon for feedback on where that grouping logic should live!

iOS

  • If you added any user-facing strings on iOS, are they included in Localizable.xcstrings?
    • Add temporary machine translations, marked "Needs Review"

android

  • All user-facing strings added to strings resource in alphabetical order
  • Expensive calculations are run in withContext(Dispatchers.Default) where possible (ideally in shared code)

Testing

What testing have you done?

  • Updated stubbed out unit tests

  • Updated android preview data & confirmed displayed as expected
    image

  • Tested in running app for a few alerts
    imageimage


Comment on lines -123 to +125
override val hasSchedulesToday: Boolean,
val hasSchedulesTodayByPattern: Map<String, Boolean>,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is one of my least favorite changes in this PR, but it seemed like the most straightforward path to determining whether we should show "Predictions Unavailable" for a branch with no service vs. if we are dealing with a no scheduled service / service ended scenario.

@KaylaBrady KaylaBrady marked this pull request as ready for review April 25, 2025 14:04
@KaylaBrady KaylaBrady requested a review from a team as a code owner April 25, 2025 14:04
@KaylaBrady KaylaBrady requested review from BrandonTR and removed request for a team April 25, 2025 14:04
Base automatically changed from kb-branch-disruption-refactor to main April 25, 2025 17:26
@KaylaBrady KaylaBrady force-pushed the kb-branch-disruption branch from 8f8dd0f to a6af465 Compare April 25, 2025 17:31
@@ -863,7 +1033,7 @@ data class RouteCardData(
this.upcomingTrips ?: emptyList(),
checkNotNull(alertsHere),
allDataLoaded ?: false,
hasSchedulesToday ?: false,
hasSchedulesTodayByPattern ?: routePatterns!!.associate { it.id to false },
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: We could also checkNotNull(routePatterns) here for consistency

@KaylaBrady KaylaBrady enabled auto-merge April 25, 2025 17:42
@KaylaBrady KaylaBrady added this pull request to the merge queue Apr 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 25, 2025
@KaylaBrady KaylaBrady added this pull request to the merge queue Apr 25, 2025
Merged via the queue into main with commit c6d7ec0 Apr 25, 2025
10 checks passed
@KaylaBrady KaylaBrady deleted the kb-branch-disruption branch April 25, 2025 18:35
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
0