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

UI: Improve route summary layout in LegView #296

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Nov 4, 2024

TL;DR

Improved route summary layout in trip planner to better handle long text and different font scales.

What changed?

  • Extracted route summary section into a separate composable function RouteSummary
  • Implemented proper text wrapping for route descriptions
  • Added end alignment for duration text
  • Improved spacing and alignment between route text and duration
  • Added new preview for testing different font scales

How to test?

  1. Navigate to the trip planner
  2. Verify route descriptions wrap properly when text is long
  3. Check that duration stays right-aligned
  4. Test with different font scales (particularly 2x) to ensure layout remains consistent
  5. Verify clock icon and duration text remain properly aligned

Why make this change?

The previous implementation had issues with text overflow and inconsistent alignment when dealing with long route descriptions or larger font sizes. This change improves accessibility and readability by properly handling text wrapping and maintaining consistent alignment regardless of content length or font scale.

Screenshots

Screenshot 2024-11-04 at 1 32 25 pm Screenshot 2024-11-04 at 1 32 10 pm

Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ksharma-xyz and the rest of your teammates on Graphite Graphite

@ksharma-xyz ksharma-xyz changed the title Update LegView- extract RouteSummary as separate composable UI: Improve route summary layout in LegView Nov 4, 2024
@ksharma-xyz ksharma-xyz marked this pull request as ready for review November 4, 2024 02:31
@ksharma-xyz ksharma-xyz force-pushed the 11-04-update_legview-_extract_routesummary_as_separate_composable branch from a34f519 to b2f4112 Compare November 4, 2024 02:43
@ksharma-xyz ksharma-xyz merged commit 05dadbf into main Nov 4, 2024
3 checks passed
@ksharma-xyz ksharma-xyz deleted the 11-04-update_legview-_extract_routesummary_as_separate_composable branch November 4, 2024 03:19
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.

1 participant