-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2023-09-11] [$2000] Fix issue with Map panning behavior #25732
Comments
Triggered auto assignment to @NicMendonca ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~0167825771cb68ae59 |
Current assignee @NicMendonca is eligible for the External assigner, not assigning anyone new. |
Current assignee @allroundexperts is eligible for the External assigner, not assigning anyone new. |
@NicMendonca I created this issue from this Slack discussion. This is probably regression from a PR that I created for the Wave 5 Distance Request project. You don't have to reproduce this issue. I already confirmed that the issue exists. I assigned @allroundexperts because they're very involved in the Wave 5 project and has the necessary context. @allroundexperts if you come up with the solution, you can also create a PR yourself 🙇 |
I have an error: |
thank you for reporting but this issue is known and the fix should be merged soon |
ProposalPlease re-state the problem that we are trying to solve in this issue.Map panning behaviour not working as expected on native mobile devices. Also, Add Stop continuously moves the map for the same location after a marker has been placed. What is the root cause of that problem?There are two issues:
What changes do you think we should make in order to solve the problem?1. Replace flyTo and zoomTo with setCamera
2. Camera update on iOS when the screen is not in focus The following changes will need to be made. react-native-x-maps changes
DistanceRequest changes
What alternative solutions did you explore? (Optional)None. 25732-demo-2.mp4 |
@akinwale Thanks for your proposal. I can not understand your RCA. Can you please elaborate it further? Specifically, why does it work on Android/web and not on iOS? |
There are two issues here.
"Add Stop" button Since MapView.Camera not updating
The marker location will be displayed on the map, but since the DistanceRequest screen containing the map view was not visible on the screen during the Onyx update, none of the camera operations to adjust the view will work (flyTo, zoomTo, etc). Setting any of the props (bounds, centerCoordinate, zoomLevel) on the camera will also do nothing. The map has to be visible on the screen before the camera view can be adjusted. The difference in behaviour is probably due to the underlying rnmapbox implementation for the different platforms. Perhaps, when the map is not visible, visual updates or camera operations are suspended on iOS to save memory usage or for improved performance? I would have to dive really deep into the native implementation to understand why there is a difference. Hope this helps. Please let me know if you require further clarifications and I'll be happy to explain. |
Thank you very much @akinwale for your detailed explanations. I like how you identified two issues and address each of them separately. I will do the same and write my response for the two issue and suggested solutions separately
This is not actually an issue. I'd say this is an expected behavior. As long as there is a single waypoint, the map keeps adjusting itself to zoom into that single waypoint. But, if the user doesn't move the map, the map stays the same. This issue is also a little bit different from the original issue: "Map doesn't zoom in to a single waypoint location unless Add stop button is clicked." Please see the following video: VideoScreen.Recording.2023-08-24.at.8.46.28.AM.mov
This is actually not true. The map is still mounted even when the waypoint editor page (the page with text input for address) is visible. The iOS maps used to work normally (cc: @allroundexperts) so this probably is not the reason. |
Ah, maybe I misunderstood. I was referring to the issue in this comment which you linked in the original post: #25161 (comment). This currently happens on iOS native.
This is what I observed based on my testing. The map remains mounted (I verified this by subscribing to available map events, etc), but the camera operations (zoom, move, fly) won't work. I have a branch with my Solution 2 (which is bad because |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
@hayata-suenaga @allroundexperts To summarise the fixes to get the map to work as expected:
25732-demo-2.mp4 |
📣 @gegham-khachatryan! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Upwork job price has been updated to $2000 |
doubled the price 💰 |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.62-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-09-11. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
The percentages are against the original offer price. @NicMendonca gonna be back with you about payment after the regression period is over. |
|
@gegham-khachatryan sent you the offer in Upwork @allroundexperts @parasharrajat can you please request payment via Expensify? |
Did we open a new PR for follow-up changes? #25977 (comment) I wouldn't call that a new issue or out of the scope of this issue as those are code suggestions and technically must be solved in the PR itself. (part of documented C+ review process). cc: @allroundexperts |
Payment requested as per #25732 (comment) |
@parasharrajat not yet, I'm on vacation. |
@allroundexperts don't forget to request payment! @parasharrajat am I keeping this open until this happens?
|
Requested payment. |
@parasharrajat The changes you've requested aren't relevant to the current issue. Initially, this code was housed in a separate library, but I received a request to simply move it from the library to the app. However, addressing these changes is not within the scope of the current issue or my assigned task. |
We have a standard for code being merged to the main repo. and any code suggestion to adhere to that is counted in the scope of each issue. I understand that you moved the code from some repo to our App but now it is part of the app so it should follow best practices. We skipped these suggestions in the main PR due to the urgency of the task at hand. In general case, those changes should have been followed before merging the PR. Anyways, I leave that decision to @luacmartins @allroundexperts |
I'd like to clarify that the repository is an internal company repository, not a third-party one. You can find it at the following URL: https://github.com/Expensify/react-native-x-maps |
@parasharrajat I think @gegham-khachatryan has a very fair point. Initially, this ticket was just about fixing the map panning behaviour. However, as we went into the PR stage, it was decided that we should just simply stop using the library and include all its code in the main repository. In my opinion, the expectation was to just move the library code into the main repository without any refactoring of the actual library code. I would also like to highlight that we went above and beyond the scope of this issue and made several other un-related fixes as well since this was such an important feature for our release. Ref, Ref |
Thanks for making extra efforts to get this done quickly. No worries, I will create the PR for those suggestions as soon as I get the time to do so. |
We can create a follow up issue. |
Cool! Thanks everyone! @allroundexperts don't forget BZ checklist please! |
Started a PR #27507 for follow up changes. |
Checklist
Regression test steps
Do we 👍 or 👎 ? |
Thanks!
|
$500 payment for @parasharrajat approved based on BZ summary. |
$2,000 payment for @allroundexperts approved based on BZ summary. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Context
A new feature was added in this PR recently where we display a map. We discovered an issue with the map's behavior though. We need a fix as soon as possible.
We also introduced a new library for this map feature. The library's repo is here: https://github.com/Expensify/react-native-x-maps.
The map should zoom into an area when a single waypoint is passed. When several waypoints are passed, the map should pan out to fix all waypoints passed on map. These zoom in and pan out movements are not working on iOS and Android.
The last version of the library above is
1.0.10
and the version specified in App'spackage.json
on the main branch is1.0.9
. But this should not be the cause of the issue, I believeRelated issues
Hint
The root cause of this issue might be inside
react-native-x-maps
. If you need to modify the library code and test changes inApp
, you can push changes inx-maps
to a forked repo on GitHub and use the link of your branch on GitHub to install the changed code in yourApp
. More info on this hereAction Performed:
This issue exists on the main branch. It should be re-producible on iOS and Android.
Pull the latest main
Open NewDot on iOS simulator or Android emulator
Go to any chat room where you can request money (i.e. IOU)
Click the "+" icon next to the chat message text field. Click "Request Money" on the pop up menu that appears.
Check "Distance" tab on the Right Hand Panel that appears
Click the "Start" item from the list of waypoints.
In the text field that appears in the next screen, type "88 Kearny Street". Click the first option "88 Kearny Street, San Francisco, CA, USA" that appears.
Check that the map doesn't move when it should zoom into a part of San Francisco. Check the video below for the expected behavior of the map (taken on Web).
Current behavior
Screen.Recording.2023-08-23.at.1.25.35.PM.mov
Expected behavior
Screen.Recording.2023-08-22.at.4.01.02.PM.mov
Click the "Stop" item from the list of waypoints.
In the text field that appears in the next screen, type "Golden Gate Park". Click the first option "88 Kearny Street, San Francisco, CA, USA" that appears.
Check that the map doesn't move at all when it should pan out to fix the new point added. Check the video below for the expected behavior of the map (taken on Web).
Current behavior
Screen.Recording.2023-08-23.at.1.28.41.PM.mov
Expected behavior
Screen.Recording.2023-08-22.at.4.08.56.PM.mov
Platforms:
Which of our officially supported platforms is this issue occurring on?
Reproducible in staging?: Only on main
Reproducible in production?: Nop
Slack conversation: #25161 (comment)
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: