-
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
Display the message for last requests with foreign currency that are created in offline mode #34011
Conversation
@cubuspl42 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 started a discussion on Slack, as this is a slight change of a user-observable behavior. I think it's a minor one, so we should be good, but it's better to confirm it. |
No replies; let's just move forward. This is an edge case. |
Please merge |
Updated. |
Hey, I'm sorry, but I think we'll have to pivot. The solution works different form what I understood earlier. I thought that we'll display the "Total will update..." under each entry which isn't included in the total. That made sense to me. In practice, we also display the mentioned message under entires which are included in the total. Screen.Recording.2024-01-11.at.12.31.09.movI might've misunderstood "to display the message for all requests with foreign currency that are created in offline mode". I thought that it means all non-PLN requests (in my example). |
@cubuspl42 Updated. |
Thank you for your update. Please note that very short responses make me unsure whether we're on the same page. The vast majority of the questions I ask on PRs are not rhetorical, i.e., I actually expect an answer. I'd prefer to know whether I misunderstood a detail in the proposal, or if I got it right, but the implementation had a bug that made the code not equivalent to the original idea. |
) { | ||
shouldShowPendingConversionMessage = IOUUtils.isIOUReportPendingCurrencyConversion(iouReport); | ||
if (!_.isEmpty(iouReport) && !_.isEmpty(reportActions) && chatReport.iouReportID && action.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD && network.isOffline) { | ||
shouldShowPendingConversionMessage = IOUUtils.isTransactionPendingCurrencyConversion(iouReport, (action && action.originalMessage && action.originalMessage.IOUTransactionID) || 0); |
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.
Commenting on || 0
...
The relevant function argument is typed: transactionID: string
So I think that either the argument type or the passed value is not correct
I think that is good to only display the pending message for the transaction with foreign currency. Actually, |
I'm sorry about the back-and-forth, but I'd like to confirm one thing. I never had strong opinions about this issue. I just want a simple fix with reasonable behavior. In your proposal, you sketched two options:
Option 2 sounded like a cool idea that is very easy to implement and has resonable behavior. I suggested "cool, let's go with option 2 then", as I thought that we're gonna remove one check and fix the issue this way. At this point, it doesn't seem like it was removing one expression. What is your perspective on pivoting back to Option 1? Do I understand correctly, that it would be less invasive, both in the user-perceived behavior and the amount of modified code? |
Again, this wasn't a rhetorical question! 🙂 I always want to know the Contributor's perspective on my suggestions. If they disagree, it can go both ways: either I accept their perspective or insist if I believe that it's necessary. |
About the commit message: I'm 90% sure that this one won't do any harm (as it's missing the For now, you can leave it as is, but let's have this in mind. |
Sorry about this problem, I will pay attention in the next commit |
@cubuspl42 I agree with the decision to return to option 1. It would be less invasive and less amount of modified code. I changed the code according to option 1, please check again. |
Please change the PR title |
In the Tests let's specify that the message should appear on the last entry. We pivoted our approach, it's not good that the tests still "pass". |
Reviewer Checklist
Screenshots/VideosAndroid: mWeb Chrometotal-update-2-android-web-compressed.mp4iOS: Nativetotal-update-2-ios-compressed.mp4iOS: mWeb Safaritotal-update-2-ios-web-compressed.mp4MacOS: Chrome / Safaritotal-update-2-web-converted.mp4MacOS: Desktop |
@@ -346,7 +346,7 @@ function ReportActionItem(props) { | |||
const iouReportID = originalMessage.IOUReportID ? originalMessage.IOUReportID.toString() : '0'; | |||
children = ( | |||
<MoneyRequestAction | |||
chatReportID={props.report.reportID} | |||
chatReportID={originalMessage.IOUReportID ? props.report.chatReportID : props.report.reportID} |
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 you just add a comment explaining this check so the next person knows why we needed to do this?
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.
Added 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.
Please ensure that this is in proper English. You can use freely available tools like ChatGPT 3.
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.
Try this
If originalMessage.iouReportID is set, this is a 1:1 money request in a DM chat whose reportID is props.report.chatReportID
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 updated the comment.
Unrelated error in the performance test. I re-ran it hopefully it passes now. |
@arosiclair Checks passing 👍 |
✋ 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/arosiclair in version: 1.4.32-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.32-5 🚀
|
Details
Fixed Issues
$ #33073
PROPOSAL: #33073 (comment)
Tests
3.Click FAB > Request money > Manual.
Offline tests
QA Steps
3.Click FAB > Request money > Manual.
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)StyleUtils.getBackgroundAndBorderStyle(theme.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.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov