Repository navigation
Conversation
|
@hoangzinh 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] |
|
Thanks for spin-up PR. I will review it tomorrow |
|
In meanwhile, could you take a look at failed unit tests? @FitseTLT |
|
Hi @FitseTLT what about changes in App/src/libs/OptionsListUtils.ts Lines 1284 to 1287 in 823e9c9 and App/src/libs/OptionsListUtils.ts Lines 1332 to 1333 in 823e9c9 as you mentioned in your solution? would they cause any bugs? |
|
@hoangzinh I am not getting your last question at all. |
|
Ah based on your proposal here #39709 (comment), you mentioned adding isSelected in 2 places above. My question is why I don't see them in this PR |
They are both included. It a pretty large file so we have a continuous change and hence the difference between the line number of the code. Here are they App/src/libs/OptionsListUtils.ts Lines 1385 to 1386 in 8d01905 App/src/libs/OptionsListUtils.ts Line 1430 in 8d01905 |
|
I see, thanks for explanation @FitseTLT |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-04-26.at.17.55.29.android.movAndroid: mWeb ChromeScreen.Recording.2024-04-26.at.17.53.05.android.chrome.moviOS: NativeScreen.Recording.2024-04-26.at.17.51.59.ios.moviOS: mWeb SafariScreen.Recording.2024-04-26.at.17.46.55.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2024-04-26.at.17.38.25.web.movMacOS: DesktopScreen.Recording.2024-04-26.at.17.40.33.desktop.mov |
| const enabledTaxRates = sortedTaxRates.filter((taxRate) => !taxRate.isDisabled); | ||
| const enabledTaxRates = sortedTaxRates | ||
| .filter((taxRate) => !taxRate.isDisabled) | ||
| .map((taxRate) => ({...taxRate, isSelected: selectedOptions.some((option) => option.name === taxRate.modifiedName)})); |
There was a problem hiding this comment.
Can we compare id's here instead?
There was a problem hiding this comment.
@MonilBhavsar we don't have id in selectedOptions as we constructed it only from selectedTax here
App/src/components/TaxPicker.tsx
Lines 49 to 59 in 34434a5
There was a problem hiding this comment.
Can we add taxCode there and compare it?
There was a problem hiding this comment.
@MonilBhavsar there are different places we use tax picker and not straightforward to get taxCode for instance here
App/src/pages/iou/request/step/IOURequestStepTaxRatePage.tsx
Lines 63 to 64 in 8fbf52e
there is not taxCode in
transaction.taxRate (for creating request in confirmation page)
{
"text": "Tax 3 (3%) • Default",
"keyForList": "Tax 3 (3%) • Default",
"searchText": "Tax 3 (3%) • Default",
"tooltipText": "Tax 3 (3%) • Default",
"isDisabled": false,
"data": {
"modifiedName": "Tax 3 (3%) • Default",
"isDisabled": false
},
"isSelected": true
}
Maybe we need some other refactoring pr and I don't think it would be appropriate to handle in the scope of this pr, in terms of what we are trying to fix here
|
This PR has overlapped with a pr recently merged #37397 and everything has been handled there it can be closed. |
Details
Fixed Issues
$ #39709
PROPOSAL: #39709 (comment)
Tests
Precondition:
Offline tests
QA Steps
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)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
nat.mp4
Android: mWeb Chrome
2024-04-20.16-41-58.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.web.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desk.mp4