Repository navigation
fix: Use the full-height ReportActionsSkeletonView in all cases - #34114
Conversation
|
@mananjadhav 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] |
|
@mananjadhav I tried to separate the Please let me know if you'd prefer me to squash both returns into one with a unified if-condition (I thought it may be less readable). |
|
There's a way to simplify your code, especially since both conditions return the same component if (type === CONST.LIST_COMPONENTS.FOOTER) {
const isReportLoadedUntilBeginning = lastReportActionName === CONST.REPORT.ACTIONS.TYPE.CREATED;
if (isLoadingOlderReportActions || (!isReportLoadedUntilBeginning && (isLoadingInitialReportActions || isOffline))) {
return <ReportActionsSkeletonView />;
}
} |
Of course, that's what I was referring to here: #34114 (comment) |
|
@paultsimura It's best we have one condition and return the SkeletonView only once. When we have such complex long conditions it is better to split them into flags. For example, |
| const isReportLoadedUntilBeginning = lastReportActionName === CONST.REPORT.ACTIONS.TYPE.CREATED; | ||
| if (!isReportLoadedUntilBeginning && (isLoadingInitialReportActions || isOffline)) { |
There was a problem hiding this comment.
When we have such complex long conditions it is better to split them into flags. For example, !isReportLoadedUntilBeginning && (isLoadingInitialReportActions || isOffline can be one flag.
|
Thanks this looks good. I'll start with the checklist in a while. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-offline-report-skeleton.movAndroid: mWeb Chromemweb-chrome-offline-report-skeleton.moviOS: Nativeios-offline-report-skeleton.moviOS: mWeb Safarimweb-safari-offline-report-skeleton.movMacOS: Chrome / Safaridesktop-offline-report-skeleton.movMacOS: Desktopdesktop-offline-report-skeleton.mov |
|
✋ 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/madmax330 in version: 1.4.24-4 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.24-8 🚀
|
|
@dragnoir Yes, that's expected. |
|
@paultsimura you can't scroll to the top even the scroll bar exist. |
|
What device & browser do you use? |

Details
This PR brings consistency to displaying the ReportActions Skeleton View: makes it take the full-screen height in all scenarios
Fixed Issues
$ #33659
PROPOSAL: #33659 (comment)
Tests
Same as QA
Offline tests
Same as QA
QA Steps
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
android-compressed.mp4
Android: mWeb Chrome
chrome-compressed.mp4
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-01-08.at.22.21.36-compressed.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-01-08.at.22.23.05-compressed.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-01-08.at.22.11.50.mov
MacOS: Desktop
Screen.Recording.2024-01-08.at.22.34.40-compressed.mp4