-
Notifications
You must be signed in to change notification settings - Fork 319
[Drop-In UI] Updated the default navigation puck vector asset #6678
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] Updated the default navigation puck vector asset #6678
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6678 +/- ##
============================================
- Coverage 72.54% 72.50% -0.05%
+ Complexity 5522 5510 -12
============================================
Files 772 772
Lines 29899 29891 -8
Branches 3533 3529 -4
============================================
- Hits 21691 21673 -18
- Misses 6793 6806 +13
+ Partials 1415 1412 -3
|
| bearingImage = ContextCompat.getDrawable( | ||
| context, | ||
| R.drawable.mapbox_navigation_puck_icon, | ||
| R.drawable.mapbox_navigation_puck_icon2, |
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.
Can we use a more appropriate name? Like mapbox_navigation_puck_icon_themed or sth like that?
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.
Why? mapbox_navigation_puck_icon2 says it all. Version 2 of mapbox_navigation_puck_icon.
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.
Because later we'll have mapbox_navigation_puck_icon3, mapbox_navigation_puck_icon4, mapbox_navigation_puck_icon10. How will we know which one stands for what? While "themed" describes it: the one that supports different themes.
But you've worked with UI and resources on the project much more that I did so no strong objections here, just a suggestion.
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.
Do we need the old drawable at all? Can we simply update mapbox_navigation_puck_icon instead of adding a new drawable?
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.
@dzinad We'll address this later if needed. mapbox_navigation_puck_icon2 is a good enough name for this asset.
Do we need the old drawable at all? Can we simply update mapbox_navigation_puck_icon instead of adding a new drawable?
@Zayankovsky We... no. Customers that already integrated Drop-In UI... yes. To allow those customers to switch back to the old puck easily, we should keep it. Besides, the asset is a vector graphic that weighs only 926 bytes.
|
LGTM. @stnikita1 Can you please take a look and let us know if this is fine before we merge it? |
|
@abhishek1508 can we also update the generic puck please? And I reduced the size of the guidance puck |
|
@stnikita1 Thanks for adding the comment. @stnikita1 We will address the round generic puck to have a better shadow in a follow up PR. |
Done. I've updated the navigation puck to the one mentioned here #6678 (comment), and changed its fill colour to device-2022-12-08-133041.mp4Unfortunately, Android doesn't support drop shadows in Vector Drawables. We'll have to figure something out and do this as a follow-up. |
34fcde4 to
d62ce0e
Compare
|
@stnikita1 Can you take another look at it? The size of the puck has now been changed. I have shared the updated |
abhishek1508
left a comment
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.
LGTM. We should wait for an approval from @stnikita1 before we merge
d62ce0e to
f987d51
Compare
The resized The one you just shared in your last comment has the following dimensions I just want to make sure that a value of 5px would make a difference. cc @stnikita1 |
|
@abhishek1508 The previous iteration wasn't radical too but we didnt notice any difference. So, maybe this time it will work) |
|
@stnikita1 @abhishek1508 I've updated the navigation puck to the one attached here Here's a comparison of all pucks
|
57adb8f to
2f2604e
Compare
|
@tomaszrybakiewicz thank you for the screens. I think we definitely should stay with the puck B (61x65, stroke width 3) It's better visible on the map. I fix the size, now the container is square. |
Yes we do. These are the colors we use as our primary color for Drop-In UI in day and night mode: We will be using the color above for the puck to maintain consistency cc @stnikita1 |
|
@stnikita1 Updated. What do you think?
|
|
@tomaszrybakiewicz thanks for the screenshots! It looks great. But the shadow is gone for some reason. I double check the svg, the shadow should be there |
|
@stnikita1 I've mentioned it in my previous comment. Android doesn't support drop shadows in Vector Drawables. We'll have to figure something out and do this as a follow-up. Few alternatives: |
cf00fdf to
d8896bd
Compare
|
@stnikita1 Did some wizardry and applied a blur effect to the shadow asset using RenderScript.
|
d8896bd to
af356e4
Compare
|
@tomaszrybakiewicz awesome! Thank you! |
Added QA-Test-App “use legacy puck” toggle. Updated navigation puck vector drawable. CHANGELOG entry Updated navigation puck asset. Added NavPuck spinner to QA-Test-App. More changes to puck asset Using RenderScript to apply blurred shadow to new navigation puck.
af356e4 to
cfec898
Compare
Added QA-Test-App “use legacy puck” toggle. Updated navigation puck vector drawable. CHANGELOG entry Updated navigation puck asset. Added NavPuck spinner to QA-Test-App. More changes to puck asset Using RenderScript to apply blurred shadow to new navigation puck.
Added QA-Test-App “use legacy puck” toggle. Updated navigation puck vector drawable. CHANGELOG entry Updated navigation puck asset. Added NavPuck spinner to QA-Test-App. More changes to puck asset Using RenderScript to apply blurred shadow to new navigation puck.
Added QA-Test-App “use legacy puck” toggle. Updated navigation puck vector drawable. CHANGELOG entry Updated navigation puck asset. Added NavPuck spinner to QA-Test-App. More changes to puck asset Using RenderScript to apply blurred shadow to new navigation puck.











Closes NAVAND-921
Description
(
LocationPuckOptions.Builder.navigationPuck(context: Context))NOTE: Use of legacy puck can be restored as following:
navigationView.customizeViewStyles { locationPuckOptions = LocationPuckOptions.Builder(context) .defaultPuck( LocationPuck2D( bearingImage = ContextCompat.getDrawable( context, com.mapbox.navigation.ui.maps.R.drawable.mapbox_navigation_puck_icon, ) ) ) .idlePuck(LocationPuckOptions.Builder.regularPuck(context)) .build() }Screenshots or Gifs
QA-Test-App recording captured on Pixel 6
device-2022-12-02-113431.mp4