-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: Use the full-height ReportActionsSkeletonView in all cases #34114
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we have such complex long conditions it is better to split them into flags. For example, !isReportLoadedUntilBeginning && (isLoadingInitialReportActions || isOffline can be one flag.
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.
Thanks, done ✔️
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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-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