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

Fix LaneView styling on CarPlay. #3975

Merged
merged 6 commits into from Jul 7, 2022
Merged

Conversation

MaximAlien
Copy link
Contributor

Description

PR fixes #3974.

CarPlay was using incorrect LaneView styling due to two issues:

  • Actual colors for CarPlay were not selected correctly. This created effect of colors inversion.
  • CPImageSet uses lightContentImage for dark appearance and darkContentImage for light appearance (looks like a system bug).

@MaximAlien MaximAlien added bug Something isn’t working UI Work related to visual components, Android Auto, Camera, 3D, voice, etc. CarPlay Bugs, improvements and feature requests on Apple CarPlay labels Jun 29, 2022
@MaximAlien MaximAlien added this to the v2.6 milestone Jun 29, 2022
@MaximAlien MaximAlien requested a review from a team June 29, 2022 22:19
@MaximAlien MaximAlien self-assigned this Jun 29, 2022
/**
Returns hex representation of a `UIColor`.
*/
var hexString: String {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added for debugging purposes to simplify detection of color differences.

let darkImage = darkLanesImage {
// `CPImageSet` applies `lightContentImage` for dark appearance and `d`arkContentImage`
// for light appearance, because of this `darkImage` is set for `lightContentImage` parameter.
return CPImageSet(lightContentImage: darkImage, darkContentImage: lightImage)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This looks like a system bug, basically colors are inverted. CPImageSet was also deprecated in iOS 13. I'll create a separate ticket to find a suitable replacement.

@MaximAlien MaximAlien force-pushed the maxim/3974-fix-lane-view-styling branch from 58d8b74 to 70ae4e2 Compare July 6, 2022 01:13
@MaximAlien MaximAlien force-pushed the maxim/3974-fix-lane-view-styling branch from 215af69 to 6fed0a0 Compare July 7, 2022 19:50
@MaximAlien MaximAlien merged commit e73a45f into main Jul 7, 2022
@MaximAlien MaximAlien deleted the maxim/3974-fix-lane-view-styling branch July 7, 2022 20:29
MaximAlien added a commit that referenced this pull request Jul 7, 2022
* Remove `LaneView` styling in case if it's contained in `LanesView`, since it has no effect.

* Fix issues with `ExitView` and `GenericRouteShield` styling on iOS and CarPlay.

(cherry picked from commit e73a45f)
@MaximAlien
Copy link
Contributor Author

Cherry-picked to release-v2.6 branch in 9f8676b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working CarPlay Bugs, improvements and feature requests on Apple CarPlay UI Work related to visual components, Android Auto, Camera, 3D, voice, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: LaneView is drawn incorrectly on iOS and CarPlay.
2 participants