-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Integrate Mapbox in App #24306
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
Integrate Mapbox in App #24306
Conversation
|
I linked this PR to the issue for you. Please do that right away when you create your next draft PR since it makes the organization easier. |
|
I also changed the base branch to make it easier to review. When my PR is merged it will automatically update the base branch to main. |
neil-marcellini
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.
Looking good so far. Please also handle the set up of the secret tokens during deployment.
| echo -e "1. \033[1m$NETRC_PATH\033[0m" | ||
| echo -e "2. \033[1m$GRADLE_PROPERTIES_PATH\033[0m" | ||
| echo -e "\nYou can grant permissions using the commands:" | ||
| echo -e "\033[1mchmod u+rw $NETRC_PATH\033[0m" | ||
| echo -e "\033[1mchmod u+rw $GRADLE_PROPERTIES_PATH\033[0m" |
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 check and update the permissions in the script?
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 don't know if that's a good idea. I don't want to mess with contributor's file system with my script 😭 also I think I have to deal with other edge cases if I want to change the permissions in the script
so maybe it's better if a contributor change directory/file permissions by themselves
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.
Fair enough, but what about when it's running in an GH action? We need to make sure the permissions are correct in that case. Idk if it's bad to change permissions from a script, but in the interactive version they would probably have to enter their login password to authorize it anyways.
|
@parasharrajat 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] |
|
if other things look good, could you complete the Reviewer Checklist 🙇 @parasharrajat |
|
@hayata-suenaga As I can we all the bugs we've discussed would be picked up in the next issues, I am not blocking the checklist for the issue list, we can look at it once the PR is merged. |
|
@hayata-suenaga I can still reproduce that immediately opening the Mapview after sign-in doesn't load the Map. I think this is being addressed with Api.read change here? web-first-load-map.mov |
|
@mananjadhav yes that's right it's being addressed in a separate PR 👍 |
Reviewer Checklist
Screenshots/VideosiOSios-mapbox.movAndroidandroid-mapbox.moviOS and Android builds are running. |
|
Still running the Android build. |
|
@hayata-suenaga Finally completed the checklist 😌 |
|
Created the issue for rewriting bash scripts in node: #25442 |
tgolen
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.
Looks good!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Thanks @mananjadhav for covering up the checklist, I fell asleep. But I already tested so all good. |
|
We should have tested the AdHoc builds here as the script was modified. The AdHoc build fails with these changes which are blocking us from testing lots of PRs and delaying the App deployment. Can we revert? |
|
Reverted here |
| echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc | ||
|
|
||
| - uses: Expensify/App/.github/actions/composite/setupNode@main | ||
| - uses: ./.github/actions/composite/setupNode |
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.
here
|
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.3.56-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
|
Thanks! updated PR description |









Details
This PR does three things
Add scripts necessary to setup the environment to download Mapbox iOS and Android SDKs
You have to get credentials from Mapbox and add them to appropriate files to download Mapbox SDKs. Added scripts to streamline that process.
Configure the project for Mapbox SDKs
Mapbox SDKs requires configurations in
build.gradleandPodfile.Install
react-native-x-mapswhich uses Mapbox mobile and web SDKs under the hood to display mapsAdded a map in the Distance Request page (where users can report expenses for automobile transportations).
Fixed Issues
$ #22703
PROPOSAL: N/A
Tests / QA Steps
Map test
For engineers, if you're building and testing this PR in the development environment, you first need to run
npm run configure-mapboxto setup the development environment.Bash script test (This doesn't have to be QAed by the QA team)
Run
npm run configure-mapboxfor the project root.Check you see an output like below.

Don't enter anything for the secret token prompt and hit enter. Check you receive the following message

Run

npm run configure-mapbox. Type something for the secret token prompt (it doesn't have to be the actual token). Note that you don't see what's you're typing. Check you see an output like below.Open
~/.netrc. Check that you have an entry like the followingOpen
~/.gradle/gradle.properties. Check you have an entry like the following.Offline tests
If you open
DistanceRequestpage by following the test instruction for "Map test" while offline, you should not see the map.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android