Fix: Infinite loading in policy expense chat when changing from auditor to employee#35923
Fix: Infinite loading in policy expense chat when changing from auditor to employee#35923roryabraham merged 16 commits intoExpensify:mainfrom
Conversation
|
@aimane-chnaif 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] |
src/pages/home/ReportScreen.js
Outdated
| selector: (parentReportActions, props) => { | ||
| const parentReportActionID = lodashGet(props, 'report.parentReportActionID'); | ||
| if (!parentReportActionID) { | ||
| if (!parentReportActionID || !parentReportActions) { |
There was a problem hiding this comment.
Please pull main. This change seems redundant thanks to https://github.com/Expensify/App/pull/34106/files#diff-dd4bfa50713397aca8cb40145317936ab0affe19abc2a9c24d6c8849ed75dc9bR649
Reviewer Checklist
Screenshots/VideosAndroid: Nativeall.movAndroid: mWeb Chromeall.moviOS: Nativeall.moviOS: mWeb Safariall.movMacOS: Chrome / Safariall.movMacOS: Desktopall.mov |
src/pages/home/ReportScreen.js
Outdated
| prevReport.statusNum === CONST.REPORT.STATUS_NUM.OPEN && | ||
| (report.statusNum === CONST.REPORT.STATUS_NUM.CLOSED || (!report.statusNum && !prevReport.parentReportID && prevReport.chatType === CONST.REPORT.CHAT_TYPE.POLICY_ROOM))) || | ||
| ((ReportUtils.isMoneyRequest(prevReport) || ReportUtils.isMoneyRequestReport(prevReport)) && _.isEmpty(report)) | ||
| ((ReportUtils.isMoneyRequest(prevReport) || ReportUtils.isMoneyRequestReport(prevReport) || ReportUtils.isPolicyExpenseChat(prevReport)) && _.isEmpty(report)) |
There was a problem hiding this comment.
This change itself doesn't fix the infinite loading issue. One more change is needed after #30168.
Screen.Recording.2024-02-11.at.6.27.02.PM.mov
|
@aimane-chnaif I just merged main and resolved all your feedbacks. |
src/pages/home/ReportScreen.js
Outdated
| * @param {Object} report | ||
| * @returns {Boolean} | ||
| */ | ||
| function isDeletedReport(report) { |
There was a problem hiding this comment.
Will this still be true when report is real empty?
I suggest this return true when report is null, undefined, {} as well.
And function name can just be isEmpty
There was a problem hiding this comment.
Will this still be true when report is real empty?
Yes it will still be true with null, undefined and {}.
And function name can just be isEmpty
Updated!
|
Waiting feedback from @aimane-chnaif. |
|
Code looks good. Please merge main |
|
I've merged |
|
While testing, I found weird bug.
Screen.Recording.2024-02-29.at.1.43.44.PM.mov@tienifr can you investigate why |
The Pusher reset the report by first |
|
This is also out of scope. User display name and avatar are broken in report preview action before opening expense report. Screen.Recording.2024-03-03.at.3.32.17.PM.mov |
|
@roryabraham Please have a look. |
|
@roryabraham Kindly check this when you have time. |
|
@aimane-chnaif |
Looks good |
|
@aimane-chnaif Please hold up, |
oh bad TS migration |
I asked confirmation in that PR - https://github.com/Expensify/App/pull/35566/files#r1521561705 |
|
@aimane-chnaif I got the reply from TS migration author and seems like that was a mandantory change. I updated Screen.Recording.2024-03-13.at.12.21.00-compressed.mov |
Looks good, though it's a bit weird |
|
Awating input from @roryabraham. |
|
@roryabraham looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
not sure what wasn't passing? Looked all 🟢 to me? |
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 1.4.54-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.4.54-4 🚀
|
Details
This PR fixes the issue that app crashes when changing the role of user from auditor to employee.
Fixed Issues
$ #34879
PROPOSAL: #34879 (comment)
Tests
Pre-condition: User submitted an expense as an employee to a collect workspace and invited another user as an auditor.
Offline tests
NA
QA Steps
Pre-condition: User submitted an expense as an employee to a collect workspace and invited another user as an auditor.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.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 so 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-02-08.at.15.13.35-compressed.mov
Android: mWeb Chrome
Screen.Recording.2024-02-08.at.15.13.35-compressed.mov
iOS: Native
Screen.Recording.2024-02-08.at.15.15.50-compressed.mov
iOS: mWeb Safari
Screen.Recording.2024-02-08.at.15.16.54-compressed.mov
MacOS: Chrome / Safari
Screen.Recording.2024-02-07.at.12.23.03-compressed.mov
Screen.Recording.2024-02-24.at.14.43.01-compressed.mov
MacOS: Desktop
Screen.Recording.2024-02-07.at.12.23.03-compressed.mov
Screen.Recording.2024-02-24.at.14.43.01-compressed.mov