-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: optimistic iou report date not matching #39665
fix: optimistic iou report date not matching #39665
Conversation
…u-report-date-not-matching
@rushatgabhane 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] |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
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.
@cleverjam the issue is still reproducible. Please merge latest main
to reproduce the issue
Screen.Recording.2024-04-11.at.05.03.06.mov
…u-report-date-not-matching
@rushatgabhane There is a bit of a discrepancy here:
I believe the issue scope was on IOU creation and not on IOU update, however there are several ways we can proceed here, but I need guidance.
Please advise on how to proceed |
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.
@cleverjam okayy let's get this sorted. I noticed that on staging
this issue doesn't occur anymore. Could you please confirm?
Screen.Recording.2024-04-15.at.19.59.27.mov
@rushatgabhane I can still reproduce in staging when requesting money from another user, it seems your screen capture you are requesting in a workspace... Edit: would you like me to update render method or provide the optimistic chat report update that matches temporarily until the money request is completed? |
@rushatgabhane I have updated my PR, the optimistic report's However, when |
@cleverjam thank you i agree I don't have much of a clue. Let's discuss this on slack? I'll attach a link soon |
…u-report-date-not-matching
@rushatgabhane any updates? |
…u-report-date-not-matching
@cleverjam I don't think this is a good idea because the messages are paginated. We don't have all the messages on frontend. |
We'll need help with backend on it. @yuwenmemon we need your help on #39665 (comment) |
@rushatgabhane what kind of back end change were you envisoning? |
@yuwenmemon sorry about the delayed response, in essence the issue is that the report's 'lastVisibleActionCreated' does not match the most recent action in the money request response. This occurs when a new request is added to an existing one. Note: I am responding on GH Mobile app and can add more detail if needed once I am at my desk. |
Gotcha 👍 I can take a look! Feel free to add more detail though, always welcome 😄 |
@yuwenmemon Yes! 😄 The reason why I believe the backend needs to be updated is because I was able to fix the issue (until BE update comes in) by updating the optimistic report here. The change prevents the optimist report from merging a new When testing this change we get no "New message" button during the time I was able to fully test this by adding this code in the report list, basically looking in the report action list we have for the new I apologize if my assumption is incorrect here, perhaps there are other things I can do in the FE to fix the issue? this is my first contribution to this project and I am still learning its ways. |
…u-report-date-not-matching
@yuwenmemon did you get a chance to look into this? |
Ah jeez, sorry I did not! Assigned myself so I don't forget about this. |
no problem, just checking, let me know if any of this doesn't make sense or needs to be reconsidered in the FE, thanks! |
Closing as per: #38848 (comment) |
Details
The "New Messages" button is incorrectly displayed when creating an IOU, caused by a date discrepancy between the report and the sorted actions and the following expression:
App/src/pages/home/report/ReportActionsList.tsx
Line 191 in 665a8ad
Fixed Issues
$ #38848
PROPOSAL: #38848 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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.native.mov
Android: mWeb Chrome
android.mChrome.mov
iOS: Native
ios.native.mp4
iOS: mWeb Safari
mSafari.mp4
MacOS: Chrome / Safari
desktop.chrome.mov
macos.safari.mov
MacOS: Desktop
macos.desktop.mov