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/make icon change color in function of nb event #229

Merged
merged 5 commits into from
Dec 17, 2024

Conversation

kzepfl
Copy link
Contributor

@kzepfl kzepfl commented Dec 16, 2024

this PR is a cutdown version of PR #226, where i only keep the functionning functionality

Feature

Icon color will go from : blue (0 event) ==> pink (5+ event)

image

Changes

  • MapUi, made so icon change color depending on number of event and 2 helper function for the color gradient of the icon gradientColor and colorToHue
    Change variable hotPlace to change the number of event needed for maximum hotness

Testing

  • ColorTest in Unite test, map folder. Test the helper function : gradientColor and colorToHue

@kzepfl kzepfl marked this pull request as ready for review December 16, 2024 09:54
@kzepfl kzepfl self-assigned this Dec 16, 2024
@kzepfl kzepfl added this to the Milestone M3 milestone Dec 16, 2024
@kzepfl kzepfl linked an issue Dec 16, 2024 that may be closed by this pull request
Copy link
Contributor

@alvaro1080 alvaro1080 left a comment

Choose a reason for hiding this comment

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

Thank you for this Pull Request! In terms of UI, your Pull Request is particularly beautiful and the fact that the color are an echo to the logo is really appreciable. It reinforce the overall coherence of the app. On top of that, we have now an easy way to see the park with a lot of event which is good in terms of UX.

I have a few details that I would like to highlight, but otherwise really good job!

@@ -222,3 +252,36 @@ fun MarkerInfoWindowContent(park: Park) {
}
}
}

fun gradientColor(startColor: Color, endColor: Color, fraction: Float): Color {
Copy link
Contributor

Choose a reason for hiding this comment

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

Docs: the documentation is missing for this function

return Color(r, g, b, a)
}

fun colorToHue(color: Color): Float {
Copy link
Contributor

Choose a reason for hiding this comment

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

Docs: same as the last comment, the documentation is also missing

Copy link
Contributor

@alvaro1080 alvaro1080 left a comment

Choose a reason for hiding this comment

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

Thank you for the update! I approve this Pull Request.

@alvaro1080 alvaro1080 added the Enhancement ✨ New feature or request label Dec 16, 2024
@kzepfl kzepfl merged commit 9928233 into main Dec 17, 2024
3 checks passed
@kzepfl kzepfl deleted the feat/make-icon-change-color-in-function-of-nb-event branch December 17, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Icon color change in fonction of the number of event
2 participants