-
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
Map panning fix #25977
Map panning fix #25977
Conversation
Added new props to avoid introducing unnecessary dependencies ('@react-navigation/native') to the 'react-native-x-maps' library.
@allroundexperts 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] |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Hi @gegham-khachatryan! |
I have read the CLA Document and I hereby sign the CLA |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-09-01.at.2.30.23.AM.movMobile Web - ChromeScreen.Recording.2023-09-01.at.2.48.03.AM.movMobile Web - SafariScreen.Recording.2023-09-01.at.2.37.04.AM.movDesktopScreen.Recording.2023-09-01.at.3.07.59.AM.moviOSScreen.Recording.2023-09-01.at.2.33.23.AM.movAndroidScreen.Recording.2023-09-01.at.3.03.36.AM.mov |
Hi @allroundexperts Testing done, screen recordings attached. |
is this one good to go once this PR is merged? |
We'll still need to do a final round of testing IMO. |
…ning-fix # Conflicts: # src/CONST.ts # src/components/DistanceRequest.js
Hey, I noticed you changed some webpack configuration files. This can break production builds. Did you remember to run a production build locally to verify they still work? |
I added #25977 to the fixed issues. @gegham-khachatryan Would you please include a test a video showing that it's solved? |
@neil-marcellini screen recordings here #25977 (comment) |
@gegham-khachatryan is this ready for review? |
Yes @hayata-suenaga It's ready. I fixed also regression issue. |
Thanks. Starting the testing again. |
How's testing going? |
Good so far! @gegham-khachatryan Can you make sure that your commits are signed? This is causing a check to fail. |
|
Take a look at this guide. |
id="route" | ||
type="geojson" | ||
data={{ | ||
type: 'Feature', | ||
properties: {}, | ||
geometry: { | ||
type: 'LineString', | ||
coordinates, | ||
}, | ||
}} | ||
> | ||
<Layer | ||
id="route" |
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.
Use different ids for layer and source and keep these the same as native varient.
Technically, we don't need to pass these ids. given that we are not using this our logic and lib will assign default ones.
<Layer | ||
id="route" | ||
type="line" | ||
source="route" |
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.
source="route" |
Beacuse it is nested in a Source so let's remove it for less confusion.
data={{ | ||
type: 'Feature', | ||
properties: {}, | ||
geometry: { | ||
type: 'LineString', | ||
coordinates, | ||
}, | ||
}} |
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.
Better to move this data in mapView utils.ts file as a function which takes coordinates
as parameter.
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.
let's rename it to index.tsx. This is also used for desktop right? It is good to follow existing patterns.
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.
Rename it to index.native.tsx
.
return ( | ||
<View style={style}> | ||
<Mapbox.MapView | ||
style={{flex: 1}} |
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.
No line styles , use Styles.flex1
map.fitBounds([northEast, southWest], {padding: mapPadding}); | ||
}, [waypoints, mapRef, mapPadding]); | ||
|
||
useImperativeHandle( |
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.
Same here we can pass type parameters.
return; | ||
} | ||
|
||
if (waypoints.length === 1) { |
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.
Please add comment for explanation.
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.
Please create a child folder Direction
in Mapview and then create this file as index.tsx
. for native file, name would be index.native.tsx
yes it's fine 👍 not a blocker
No one drives from the US to India 😅 It's fine |
@gegham-khachatryan please urgently address the review comments @allroundexperts @gegham-khachatryan I think all review comments right now are not blocker. If the CI tests pass, I think it's good to merge. What do you think? We can address all these review comments in a follow up PR |
But people do travel by air. Would that mean that they'll not be able to refund there ticket? |
Sounds good to me @hayata-suenaga. Also, I think we're increasing scope of this PR by keep on adding new things to it. Would be best to create a followup PR. |
This distance request is mainly to reimburse expenses for gas when people travel by car
I agree 👍 |
Sure, @hayata-suenaga, I'll review the comments. I'm not sure if it's a good time to implement @parasharrajat's recommendations. |
@allroundexperts I cannot sign previous commits. I would greatly appreciate it if you could assist me in doing so. |
yes let's open another PR to implement @parasharrajat's suggestions |
@gegham-khachatryan I would use something like Lemme know if this works. PS: I took this from https://stackoverflow.com/questions/13043357/git-sign-off-previous-commits |
@gegham-khachatryan ⬆️ 😃 |
So I understand that no one will travel from India to the US but that was just a step to reproduce the issue. The main issue is that afterward when we add/remove waypoints in the US itself. The map does not work. Due to an error, it stops functioning. We should definitely fix my suggestions as there are some architectural gaps which break our standards. It is fine to do this in follow-up. |
@allroundexperts I looks impossible 😃 need to solve 463 conflicts, I don't know why)) I can create PR inside my fork, merge with squash, and open new PR with single commit to Expensify/main |
@hayata-suenaga Would that work? cc @parasharrajat since you're the more experienced here. |
Yeah, merge with squash is fine. let's try that. It is helpful for the future to keep the original PR where the discussion happened so I won't suggest creating a new one. |
…ning-fix # Conflicts: # src/components/DistanceRequest.js
@gegham-khachatryan we have another set of ESLint issues now 😓 |
@hayata-suenaga #26500 |
Closed in favor of the new PR |
Details
Fixed Issues
$ #25732
PROPOSAL: #25732 (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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Web.-.Screen.Recording.2023-08-26.at.09.52.07.mov
Mobile Web - Chrome
Web.Mobile.Chrome.-.iPhone.14.Pro.MP4
Mobile Web - Safari
Web.Mobile.Safari.-.Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-08-26.at.09.39.49.mp4
Desktop
Screen.Recording.2023-08-26.at.10.28.32.mov
iOS
Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-08-26.at.00.58.04.mp4
Android
Screen.Recording.2023-08-26.at.16.34.28.mov