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: Set White color to TransportModeBadge and TransportModeIcon #591

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Feb 7, 2025

TL;DR

Added LocalTextColor provider to transport mode components to ensure consistent text coloring.

What changed?

  • Added CompositionLocalProvider for LocalTextColor in TransportModeBadge and TransportModeIcon
  • Set text color to white for both components through the composition local
  • Maintained existing content alpha settings

How to test?

  1. Navigate to any screen displaying transport mode badges or icons
  2. Verify that text appears in white color
  3. Confirm that the text remains visible against the component backgrounds
  4. Check that the styling is consistent across different transport modes

Why make this change?

To establish a consistent text color implementation across transport-related components using Compose's composition locals, rather than setting the color directly on individual Text components. This approach provides better maintainability and ensures color consistency throughout the application.

Copy link
Owner Author

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

@ksharma-xyz ksharma-xyz changed the title Fix text color in transport mode and transportmodebadge UI: Add LocalTextColor provider to transport mode components Feb 7, 2025
@ksharma-xyz ksharma-xyz marked this pull request as ready for review February 7, 2025 06:04
@ksharma-xyz ksharma-xyz changed the title UI: Add LocalTextColor provider to transport mode components UI: Set White color to TransportModeBadge and TransportModeIcon Feb 7, 2025
@ksharma-xyz ksharma-xyz force-pushed the 02-07-fix_text_color_in_transport_mode_and_transportmodebadge branch from 22d92ac to bf00e24 Compare February 7, 2025 21:56
@ksharma-xyz ksharma-xyz enabled auto-merge (squash) February 7, 2025 21:56
@ksharma-xyz ksharma-xyz merged commit ff1c8e1 into main Feb 7, 2025
2 checks passed
@ksharma-xyz ksharma-xyz deleted the 02-07-fix_text_color_in_transport_mode_and_transportmodebadge branch February 7, 2025 22:06
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