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: Refactor color utilities and add background color helper #314

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

ksharma-xyz
Copy link
Owner

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

TL;DR

Improved color handling in the trip planner UI by introducing a new composable function for background colors and making color utility functions private.

What changed?

  • Added new backgroundColorOf composable function to handle theme-aware color adjustments
  • Made color utility functions (brightenColor, brighten, darkenColor, darken) private
  • Simplified color gradient logic in SearchStopScreen by using the new backgroundColorOf function
  • Improved code formatting in color conversion functions

How to test?

  1. Launch the app and navigate to the trip planner
  2. Toggle between light and dark themes
  3. Verify that background colors adjust appropriately based on the theme
  4. Check that color gradients in the search stop screen appear correctly in both themes

Why make this change?

To encapsulate color manipulation logic and provide a more maintainable, theme-aware approach to handling background colors. This change reduces code duplication and improves the consistency of color handling across the app.

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 Add resuable backgroundColorOf UI: Refactor color utilities and add background color helper Nov 7, 2024
@ksharma-xyz ksharma-xyz marked this pull request as ready for review November 7, 2024 08:38
@ksharma-xyz ksharma-xyz force-pushed the 11-07-add_resuable_backgroundcolorof branch from 37a0827 to 85efb99 Compare November 7, 2024 08:44
Copy link
Owner Author

ksharma-xyz commented Nov 7, 2024

Merge activity

  • Nov 7, 3:45 AM EST: Graphite rebased this pull request as part of a merge.
  • Nov 7, 3:52 AM EST: A user merged this pull request with Graphite.

@ksharma-xyz ksharma-xyz merged commit b38e89d into main Nov 7, 2024
3 checks passed
@ksharma-xyz ksharma-xyz deleted the 11-07-add_resuable_backgroundcolorof branch November 7, 2024 08:52
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