-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix just display track expense of selfDM is loaded #40409
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
Conversation
|
@hungvu193 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] |
| onSelected: () => interceptAnonymousUser(Report.startNewChat), | ||
| }, | ||
| ...(canUseTrackExpense | ||
| ...(canUseTrackExpense && selfDMReportID |
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'm not sure how did you record the video in the checklist author but this line completely broke the current logic, it will make the Track expense button disappear if it's not selfDMReportID 😱
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.
tbh, I prefer disable that button while report is loading, because even when you can go to next page when report is loading, you still can't get the personal detail 🤔 , yeah I'm talking about slow 3g case.
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.
Screen.Recording.2024-04-19.at.08.16.46.mov
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.
It will make the Track expense button disappear if it's not selfDMReportID
You mean in case the selfDMReportID is undefined, the Track expense button will disappear, right?
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.
Yeah
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 don't think this is BE bug, revert the change make it worked as expected
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.
OK, I see the problem now. For some accounts, ie my high traffic account, selfDMReport is not added to our allReports, I tried both reseting cache and logging out but no luck.
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.
Related slack thread:
https://expensify.slack.com/archives/C049HHMV9SM/p1711754709599749
GH:
#39765
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.
Yeah there definitely is a BE component to it - however I think we should also handle it better in the FE.
I like the idea of hiding the option
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.
Ok cool. I'll complete the checklist then
| } | ||
| }; | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps | ||
| const selfDMReportID = useMemo(() => ReportUtils.findSelfDMReportID(), [isLoading]); |
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 useMemo cause the issue I mentioned.
selfDMReportID here 's always undefined, even I logout 🤔
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.
Did you test the PR with high traffic account? @nkdengineer
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 just tested with the account I used to test other issues. What is the high-traffic account?
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.
Ideally, you should test your PR with a high traffic account, it's account with ton of reports, check it out here:
https://github.com/Expensify/App/blob/68e69623a8bca0dce5f384fa351d5cbb2214aeb4/contributingGuides/CONTRIBUTING.md#high-traffic-accounts
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.
@hungvu193 I just tested it in high traffic account and it works well
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-04-20.at.02.26.35.movAndroid: mWeb ChromeScreen.Recording.2024-04-20.at.02.31.22.moviOS: Nativeios.moviOS: mWeb SafarimSafari.movMacOS: Chrome / Safarichrome.movMacOS: Desktopdesktop.mov |
hungvu193
left 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.
LGTM 🚀
thienlnam
left 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.
Great! Thanks for the quick work here
|
✋ 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 production by https://github.com/mountiny in version: 1.4.64-6 🚀
|
Details
Fixed Issues
$ #40257
PROPOSAL: #40257 (comment)
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
Screen.Recording.2024-04-18.at.16.52.10.mov
Android: mWeb Chrome
Screen.Recording.2024-04-18.at.16.58.12.mov
iOS: Native
Screen.Recording.2024-04-18.at.17.02.25.mov
iOS: mWeb Safari
Screen.Recording.2024-04-18.at.17.00.42.mov
MacOS: Chrome / Safari
output.mp4
MacOS: Desktop
output.mp4