-
Notifications
You must be signed in to change notification settings - Fork 3k
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: iOS - Distance - Center icon overlaps with compass icon. #44752
Conversation
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
@ahmedGaber93 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@Expensify/design, there were few inconsistency in android and iOS native.
The scale bar is now correctly shown on both, but on iOS, the compass only appears after rotating, while on Android, it is already present when the map initially loads. Pls let me know if thats fine or not. Androidandroid_native.mp4iOSios_native.mp4 |
I saw the original issue, but I still think we should hide the scale bar by default. Not sure what value it adds in our app. Keen on @Expensify/design thoughts here. iOS looks great, but it is possible to only show compass once the map is rotated for Android as well? |
That makes sense to me, I'm down to always hide the scale bar. And I agree that the hide/show behavior for the compass should be consistent everywhere. |
Agree! Down for consistent show/hide compass behavior and never showing the scale bar. |
@Krishna2323 what changes do you think we need to hide compass/scalebar by default and appear it when rotate/scale only? |
@ahmedGaber93, I'm no sure how to hide scale bar on ios because it was displayed even when scaleBarEnabled was false though I will check for solutions very soon. One solution in mind is adding negative positions to scale bar so it gets out out the view. |
@Krishna2323 What is the updates here #44752 (comment)? |
Sorry for the delay :( I upgraded my Mac and have been trying to set up the project since yesterday. I'm still not able to run the Android and iOS simulators. This is my priority, and I will update you as soon as I'm able to test. |
@ahmedGaber93, I have spent a fair amount of time finding a solution for hiding the scale bar and making the compass behavior consistent, but I haven't found any straightforward solution. The compassEnabled and scaleBarEnabled properties only work on Android native and have no effect on iOS. However, we can remove the scale bar on iOS by setting the map_compass_issue.mp4 |
@Krishna2323 Hiding the scale bar solution seem good for me. The problem now is the compass behavior is inconsistent in android and iOS, and I think this comes from the Mapbox library itself. @Expensify/design we think inconsistent in the compass behavior comes from the Mapbox library itself, and we can't find a solution for it right now, we can keep iOS behavior and hide compass in android like the current, also we can show it all time otherwise map is rotated or not in android. What do you think? |
Alternatively, we can also hide the compass on Android using compassEnabled prop and on iOS we can hide it by using |
Yeah it looks like that to me too. I think what's in this comment looks good to me. I'd prefer that the compass wasn't showing on Android until you rotated the map like on iOS, but if that isn't doable, then I guess that's a Mapbox thing and hopefully they'll fix that at some point. |
@dubielzyk-expensify Just for confirmation the current behavior now is disabling compass in android, what we should do in this PR?
|
If we remove it, you can't reset the rotation if we've hidden the compass right? |
Yes, this is correct. User will can't reset the rotation, but he can rotate back using two fingers |
I tend to agree with @dubielzyk-expensify here - I think what's shown here is probably the best compromise for now? |
Yeah I think so too. Its unfortunate that mapbox has it working differently on different platform, but honestly it's not the end of the world and I think we should just roll it. |
@Krishna2323 Bump to update code to match your video here #44752 (comment) |
@ahmedGaber93, build is failing for android/ios native, I'm trying to fix that and will update as soon as it gets fixed. Can you pls check and let me know if you are able to build the app for android/ios native? |
@Krishna2323 yes, it builds without errors with me. Your screenshot not display the full error you faced, you can share the complete error in expensifiy-open-source with other and get help |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@ahmedGaber93, code updated. |
@Krishna2323 Can you update Tests step with expected behavior for android and iOS and other platforms separately |
Reviewer Checklist
Screenshots/VideosAndroid: Nativea.mp4Android: mWeb Chromeaw.mp4iOS: Nativei.mp4iOS: mWeb Safariiw.mp4MacOS: Chrome / Safariw.mp4MacOS: Desktopd.mp4 |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Test steps updated |
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!
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 from a design perspective
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/lakchote in version: 9.0.9-1 🚀
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.0.9-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.9-5 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.10-7 🚀
|
Details
Fixed Issues
$ #44486
PROPOSAL: #44486 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4