Fix skeleton display on transaction thread report in offline#38829
Conversation
|
Can you please apply changes from #38825 as requested? |
|
@situchan Updated. |
|
@nkdengineer I am still getting infinite loading Screen.Recording.2024-03-23.at.2.05.03.AM.mov |
|
I found another regression (not related to this PR but happening on main)
Screen.Recording.2024-03-23.at.2.07.21.AM.mov |
|
@situchan I think that you don't open this report before offline so skeleton is displayed. |
It's bug. We should create report optimistically without skeleton but grayed out. This doesn't happen on production:
|
| index = sortedReportActions.findIndex((obj) => obj.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD || obj.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED); | ||
| } | ||
|
|
||
| if (index === -1) { |
There was a problem hiding this comment.
@situchan In your case, it will return an empty array since we don't find the report actions that is created action or pending action is not add.
There was a problem hiding this comment.
It's bug. We should create report optimistically without skeleton but grayed out.
To cover all case above I think we can do my alternative solution which will return the current sortedReportActions if the id is empty and index is -1
There was a problem hiding this comment.
@roryabraham what do you think?
And this case should also be added in unit test
There was a problem hiding this comment.
@situchan Updated the solution and unit test.
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: Nativeios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
|
overall changes look good, just want to clarify them with a couple comments. Thanks ❤️ |
Co-authored-by: Rory Abraham <47436092+roryabraham@users.noreply.github.com>
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
(cherry picked from commit 32a4d9f)
|
🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 1.4.56-1 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.56-8 🚀
|

Details
Fix skeleton display on transaction thread report in offline
Fixed Issues
$ #38781
PROPOSAL: #38781 (comment)
Tests
Offline tests
Same as above
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-03-23.at.02.13.25.mov
Android: mWeb Chrome
Screen.Recording.2024-03-23.at.02.16.43.mov
iOS: Native
iOS: mWeb Safari
Screen.Recording.2024-03-23.at.02.09.44.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-23.at.02.05.56.mov
MacOS: Desktop
Screen.Recording.2024-03-23.at.02.20.18.mov