One-expense-report old chat messages stays in chat #44529
Conversation
|
@mkhutornyi 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] |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
|
Ok nice. I tried it out in my account and it seems to work quite well. Here's a video. Screen.Recording.2024-06-28.at.2.01.41.PM.mov |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safariweb1.movweb2.movMacOS: Desktop |
|
@puneetlath thats great! Thank you for verifying ❤️ @mkhutornyi are you able to proceed with the review? |
|
@rinej please add Tests / QA Steps |
| } | ||
|
|
||
| return [...actions, createdAction]; | ||
| return moneyRequestActions.length === 1 ? ReportActionsUtils.getFilteredForOneTransactionView([...actions, createdAction]) : [...actions, createdAction]; |
There was a problem hiding this comment.
NAB: Please add comment what moneyRequestActions.length === 1 means
src/libs/ReportActionsUtils.ts
Outdated
| } | ||
|
|
||
| /** | ||
| * Returns filtered list for one transaction view |
There was a problem hiding this comment.
NAB: Please explain what is filtered exactly.
|
Thank you @mkhutornyi for review, I added requested comments and QA steps |
|
✋ 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/puneetlath in version: 9.0.5-0 🚀
|
|
🚀 Deployed to staging by https://github.com/puneetlath in version: 9.0.5-2 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.6-8 🚀
|
| function getFilteredForOneTransactionView(reportActions: ReportAction[]): ReportAction[] { | ||
| return reportActions.filter((action) => !isSentMoneyReportAction(action)); | ||
| } |
There was a problem hiding this comment.
This caused an issue where paid system message was not showing #45203
Details
Problem
When opening one transaction report there is weird UI flickering bug, and it appears to load slow
Solution
The first was that the
MoneyReportViewwas being displayed even when there were no transactions in the current state (optimistic approach). This led to the view covering the screen unnecessarily, and once the transactions were fetched, it disappeared, causing a flickering effect. To address this, I adjusted the logic to ensure that theMoneyReportViewis only displayed when there are transactions to show.The second issue was with the
IOUmessage action in the one-view transaction screen. By default, the IOU action was displayed, even though it was not supposed to be shown. It would only be removed after several re-renders, which caused the flickering effect. To fix this, I implemented filtering logic to remove theIOUaction before the view is rendered.Video before fix on Main:
BAD.ON.MAIN.mp4
After the fix:
Fixed.One.mp4
Fixed Issues
$ #44162
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso 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