[No QA] Add GPS key to Onyx - #77249
Conversation
|
@chuckdries 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] |
|
I believe that @dukenv0307 should've been assigned for review, I will ask Andrew to take a look and see if he can be assigned automatically to GPS feature PRs. Sorry @chuckdries and @joekaufmanexpensify for the review ping |
|
Thank you @GCyganek, I'll review it. I don't know why I wasn't assigned to this PR |
| type GpsDraftDetails = { | ||
| /** Captured GPS points */ | ||
| gpsPoints: Array<{ | ||
| /** Longitude */ |
There was a problem hiding this comment.
| /** Longitude */ | |
| /** Latitude */ |
| gpsPoints: Array<{ | ||
| /** Longitude */ | ||
| lat: number; | ||
| /** Latitude */ |
There was a problem hiding this comment.
| /** Latitude */ | |
| /** Longitude */ |
| long: number; | ||
| }>; | ||
|
|
||
| /** Distance between all consecutive points from gpsPoints in meters */ |
There was a problem hiding this comment.
| /** Distance between all consecutive points from gpsPoints in meters */ | |
| /** Sum of geodesic distances between all consecutive points from gpsPoints in meters */ |
| /** Start address derived from coordinates of the first point from gpsPoints */ | ||
| startAddress: { | ||
| /** Start address string shown to the user */ | ||
| value: string; |
There was a problem hiding this comment.
If the type is coordinates, I think the value shouldn't be a string, right?
There was a problem hiding this comment.
It should be, as in case of type: "coordinates" value will be a stringified {lat: number; long: number} object. We need to keep the type in case we try to get human readable address from coordinates while offline (which will not work), so that when user reconnects we know that we can try again.
| /** End address derived from coordinates of the last point from gpsPoints */ | ||
| endAddress: { | ||
| /** End address string shown to the user */ | ||
| value: string; |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🎯 @dukenv0307, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #77398. |
chuckdries
left a comment
There was a problem hiding this comment.
@GCyganek These changes look fine to me, but I'm curious: why we're adding the types and onyx keys now rather than waiting for whatever code that actually needs them?
|
FYI @joekaufmanexpensify this PR has no user-visible changes, so I'm just going to merge |
This is a part of the GPS feature implementation and this is split just as in the design doc, I'll be posting follow-ups to this that will be using this code. I wanted the PRs to be split just as the sub-issues for this feature, but if that's a problem I can put together bigger PRs to avoid similar cases where there is nothing that can be tested. Also, hopefully my next PRs won't ping people not working on the feature for reviews 🙏 |
|
✋ 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/chuckdries in version: 9.2.78-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.78-8 🚀
|
Explanation of Change
Adding
gpsDraftDetailsOnyx key where the GPS trip state will be stored for the GPS distance requestFixed Issues
$ #77213
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari