-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[CP Staging] Feat/36985 create new rate field followups #40711
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
[CP Staging] Feat/36985 create new rate field followups #40711
Conversation
|
@shawnborton @getusha One of you needs to 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] |
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, a couple small things and one very important consideration. Also, I wouldn't expect editing distance on a tracked expense to work yet, since it's still in progress on the backend.
Would you please add some tests for verifying the merchant format with the regex? You can manually edit the merchant to whatever you want if you open the transaction in OldDot.
src/libs/DistanceRequestUtils.ts
Outdated
|
|
||
| const METERS_TO_KM = 0.001; // 1 kilometer is 1000 meters | ||
| const METERS_TO_MILES = 0.000621371; // There are approximately 0.000621371 miles in a meter | ||
| const distanceMerchantRegex = /^[0-9.]+ \w+ @ (-|-\()?(\p{Sc}|\p{L}|\w){1,3} ?[0-9.]+\)? \/ \w+$/u; |
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 a comment explaining what this does. Something like this.
// Validates that the merchant for a distance request transaction is in the expected format.
// <distance> <unit> @ <formatted rate with currency> / <unit>
// Example: 1.45 miles @ $0.67 / miThere 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.
it'd be nice if we can move this to CONST.ts
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.
@getusha no longer necessary - we decided to remove this
|
Design-wise, this looks good to me. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-04-23.at.3.00.01.in.the.afternoon.movAndroid: mWeb ChromeScreen.Recording.2024-04-23.at.12.23.08.at.night.moviOS: NativeScreen.Recording.2024-04-23.at.2.44.14.in.the.afternoon.moviOS: mWeb SafariScreen.Recording.2024-04-23.at.2.49.42.in.the.afternoon.movMacOS: Chrome / SafariScreen.Recording.2024-04-23.at.2.29.24.in.the.afternoon.1.movMacOS: DesktopScreen.Recording.2024-04-23.at.3.12.10.in.the.afternoon.1.mov |
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.
Nice looks great, thank you. We're still working on the test steps as you said in Slack.
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.
Nice, and it's more simple now too
|
@neil-marcellini it should be already fixed |
|
the expense view page is flickering, @koko57 can you check the page from your side? 😄 Screen.Recording.2024-04-23.at.6.59.02.in.the.evening.mov |
|
@getusha it's when you're clicking on the distance field? |
|
@getusha I cannot recreate |
…nce for tracked expense
|
@getusha @neil-marcellini PR ready for (I hope) last round of review |
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.
Great thanks!
amyevans
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.
LGTM just 1 non-blocking question/comment
…d-followups [CP Staging] Feat/36985 create new rate field followups (cherry picked from commit 7e5b436)
…-40711-1 🍒 Cherry pick PR #40711 to staging 🍒
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.4.64-4 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.64-6 🚀
|
| <MenuItemWithTopDescription | ||
| description={translate('common.distance')} | ||
| title={distanceToDisplay} | ||
| title={getPendingFieldAction('waypoints') ? translate('iou.fieldPending') : distanceToDisplay} |
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.
We don't need this now. #43569
Details
Fixed Issues
$ #36985
$ #40712
$ #40722
PROPOSAL: #36985 (comment)
Tests
Verify that changes don't break these areas:
MoneyRequestConfirmationList
Rate highlighting
MoneyRequestView
-> edit distance
Offline tests
MoneyRequestConfirmationList
MoneyRequestView
QA Steps
Verify that changes don't break these areas:
MoneyRequestConfirmationList
Rate highlighting
MoneyRequestView
-> edit distance
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)Designlabel so 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
MacOS: Desktop