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

feat(android.TripDetails): Trip stop list UI #703

Merged
merged 8 commits into from
Feb 4, 2025
Merged

Conversation

KaylaBrady
Copy link
Collaborator

Summary

Ticket: 🤖 | stop + trip details | Trip details UI

What is this PR for?
This PR finishes off the UI for the trip stop list, including

  • Route line diagram
  • Shimmer loading UI
  • p0 QA items identified in iOS QA

Not included:

  • Animation when expanding / collapsing the "X stops away" disclosure. I struggled getting this to work. Will try a little bit more, and otherwise will break out a separate ticket for it.

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

Testing

What testing have you done?

  • Ran locally & verified UI looks as expected.
    Screenshot_20250203_120849

@KaylaBrady KaylaBrady requested a review from a team as a code owner February 3, 2025 17:15
@KaylaBrady KaylaBrady requested a review from BrandonTR February 3, 2025 17:15
Copy link
Contributor

@BrandonTR BrandonTR left a comment

Choose a reason for hiding this comment

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

One minor comment, otherwise lgtm!

Modifier.alpha(0.6f),
routeType = routeAccents.type,
hideRealtimeIndicators = true
Text(
Copy link
Contributor

Choose a reason for hiding this comment

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

The font looks a bit large here, I think we need to specify the fontSize as 17.sp

Copy link
Contributor

Choose a reason for hiding this comment

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

I made some changes to the defined font styles in my vehicle card UI changes, I can also include this as part of that.

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 made me realize that the UpcomingTripView font size is also too large, which will take a little more to resolve but I can include in this. bodyLarge is defined in the Material defaults as 16.sp, but I overlooked that we're overriding those sizes in MyApplicationTheme

Copy link
Contributor

@EmmaSimon EmmaSimon Feb 4, 2025

Choose a reason for hiding this comment

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

I added the remaining text roles to our overrides, swapped titleLarge (previously 20.sp) to titleSmall, and added comments correlating them to the roles we use in Figma/iOS:

Typography(
    bodyLarge = textStyle(fontSize = 24.sp),
    bodyMedium = textStyle(fontSize = 17.sp), // Body
    bodySmall = textStyle(fontSize = 16.sp),
    headlineLarge = textStyle(fontSize = 17.sp, fontWeight = FontWeight.Bold), // Headline
    headlineMedium = textStyle(fontSize = 16.sp), // Callout
    headlineSmall = textStyle(fontSize = 15.sp), // Subheadline
    titleLarge = textStyle(fontSize = 32.sp, fontWeight = FontWeight.Bold), // Title 1
    titleMedium = textStyle(fontSize = 24.sp, fontWeight = FontWeight.Bold), // Title 2
    titleSmall = textStyle(fontSize = 20.sp, fontWeight = FontWeight.SemiBold), // Title 3
    labelLarge = textStyle(fontSize = 13.sp, fontWeight = FontWeight.Normal), // Footnote
    labelMedium = textStyle(fontSize = 12.sp, fontWeight = FontWeight.Normal), // Caption 1
    labelSmall = textStyle(fontSize = 11.sp, fontWeight = FontWeight.Normal), // Caption 2
)

Even though we use bodySmall quite a bit, it doesn't really have a corresponding role in the designs, unless we want to double up on callout.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Amazing, thanks @EmmaSimon!

@@ -107,14 +121,59 @@ fun TripStops(
.defaultMinSize(minHeight = 48.dp),
verticalAlignment = Alignment.CenterVertically
) {
AnimatedContent(
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

@KaylaBrady KaylaBrady merged commit 8f6c491 into main Feb 4, 2025
5 checks passed
@KaylaBrady KaylaBrady deleted the kb-trip-details-ui-2 branch February 4, 2025 21:11
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.

3 participants