-
Notifications
You must be signed in to change notification settings - Fork 319
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
[Drop-In UI] Changes RoadName positioning and customization #6792
[Drop-In UI] Changes RoadName positioning and customization #6792
Conversation
…View height and made it customizable via ViewStyleCustomization.infoPanelGuidelineMaxPosPercent.
Codecov Report
@@ Coverage Diff @@
## main #6792 +/- ##
============================================
- Coverage 72.64% 72.64% -0.01%
- Complexity 5566 5569 +3
============================================
Files 780 780
Lines 30091 30104 +13
Branches 3551 3553 +2
============================================
+ Hits 21860 21869 +9
- Misses 6805 6808 +3
- Partials 1426 1427 +1
|
val maxPos = (parentHeight * GUIDELINE_MAX_POSITION_PERCENT).toInt() | ||
val pos = parentHeight - infoPanelTop - systemBarsInsets.bottom | ||
guidelineBottom.setGuidelineEnd(pos.coerceIn(0, maxPos)) | ||
val maxPos = (parentHeight * maxPosPercent).toInt() - systemBarsInsets.bottom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You didn't subtract systemBarsInsets.bottom
for maxPos before. Is this behaviour change intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
@@ -81,6 +81,14 @@ internal class InfoPanelCoordinator( | |||
coroutineScope.launch { | |||
context.systemBarsInsets.collect { updateGuidelinePosition(systemBarsInsets = it) } | |||
} | |||
coroutineScope.launch { | |||
context.styles.infoPanelGuidelineMaxPosPercent.collect { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you want to test it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried, but unfortunately, Robolectric was throwing exceptions when I tried to layout the view (parentLayout.layout(0, 0, 200, 300)
) to get concrete measurements in tests. After fighting with this for over 4 hrs I had to throw the towel.
* Increased InfoPanel bottom guideline max pos to 50% of the NavigationView height and made it customizable via ViewStyleCustomization.infoPanelGuidelineMaxPosPercent. * CHANGELOG entry * Rename changelog files Co-authored-by: runner <runner@fv-az465-655>
* Increased InfoPanel bottom guideline max pos to 50% of the NavigationView height and made it customizable via ViewStyleCustomization.infoPanelGuidelineMaxPosPercent. * CHANGELOG entry * Rename changelog files Co-authored-by: runner <runner@fv-az465-655>
Closes NAVAND-923
Description
InfoPanel
bottom guideline max pos to 50% of theNavigationView
height and made it customizable viaViewStyleCustomization.infoPanelGuidelineMaxPosPercent