-
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
[CP Staging] Feat/36985 create new rate field followups #40711
[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] |
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
@@ -49,6 +37,7 @@ Onyx.connect({ | |||
|
|||
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 / mi
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.
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 |
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.
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 |
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!
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 🚀
|
@@ -283,13 +285,14 @@ function MoneyRequestView({ | |||
<OfflineWithFeedback pendingAction={getPendingFieldAction('waypoints')}> | |||
<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 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
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)Design
label so the design team can review the changes.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop