-
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
One-expense-report old chat messages stays in chat #44529
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 |
@@ -213,7 +213,7 @@ function ReportActionsView({ | |||
createdAction.pendingAction = CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE; | |||
} | |||
|
|||
return [...actions, createdAction]; | |||
return moneyRequestActions.length === 1 ? ReportActionsUtils.getFilteredForOneTransactionView([...actions, createdAction]) : [...actions, createdAction]; |
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.
NAB: Please add comment what moneyRequestActions.length === 1
means
src/libs/ReportActionsUtils.ts
Outdated
@@ -373,6 +373,14 @@ function shouldIgnoreGap(currentReportAction: ReportAction | undefined, nextRepo | |||
); | |||
} | |||
|
|||
/** | |||
* Returns filtered list for one transaction view |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
MoneyReportView
was 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 theMoneyReportView
is only displayed when there are transactions to show.The second issue was with the
IOU
message 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 theIOU
action 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 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop