-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 loading skeleton appears in the workspace expense thread after sending an IOU expense request #46864
Conversation
Signed-off-by: Tsaqif <[email protected]>
Signed-off-by: Tsaqif <[email protected]>
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-08-07_16.51.28.mp4Android: mWeb Chromeandroid-chrome-2024-08-07_16.54.53.mp4iOS: Nativeios-app-2024-08-07_16.46.31.mp4iOS: mWeb Safariios-safari-2024-08-07_16.44.57.mp4MacOS: Chrome / Safaridesktop-chrome-2024-08-07_15.59.49.mp4MacOS: Desktopdesktop-app-2024-08-07_16.26.16.mp4 |
isLoadingReportOnyx || | ||
!isCurrentReportLoadedFromOnyx || | ||
isLoading; | ||
(isLinkingToMessage && !isLinkedMessagePageReady) || (!isLinkingToMessage && !isInitialPageReady) || isLoadingReportOnyx || !isCurrentReportLoadedFromOnyx || 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.
Could you explain a bit more why you made this change? I see you mentioned it here, but since it was never part of your proposal, I'd like to get a better understanding of why the change is needed.
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.
@jjcoffee I remove this (!!reportActionIDFromRoute && !!reportMetadata?.isLoadingInitialReportActions) ||
condition.
After the changes made here in my previous PR:
App/src/pages/home/ReportScreen.tsx
Lines 781 to 782 in 934797e
{!shouldShowSkeleton && ( | |
<ReportActionsView |
the blank list will no longer be displayed; instead, the loading skeleton will appear. I updated the code so that the ReportActionsView
depends on shouldShowSkeleton
rather than shouldShowReportActionsList
. The previous code can be found here:
App/src/pages/home/ReportScreen.tsx
Lines 748 to 766 in 7557e45
{shouldShowReportActionList && ( | |
<ReportActionsView | |
reportActions={reportActions} | |
report={report} | |
parentReportAction={parentReportAction} | |
isLoadingInitialReportActions={reportMetadata?.isLoadingInitialReportActions} | |
isLoadingNewerReportActions={reportMetadata?.isLoadingNewerReportActions} | |
hasLoadingNewerReportActionsError={reportMetadata?.hasLoadingNewerReportActionsError} | |
isLoadingOlderReportActions={reportMetadata?.isLoadingOlderReportActions} | |
hasLoadingOlderReportActionsError={reportMetadata?.hasLoadingOlderReportActionsError} | |
isReadyForCommentLinking={!shouldShowSkeleton} | |
transactionThreadReportID={transactionThreadReportID} | |
/> | |
)} | |
{/* Note: The ReportActionsSkeletonView should be allowed to mount even if the initial report actions are not loaded. | |
If we prevent rendering the report while they are loading then | |
we'll unnecessarily unmount the ReportActionsView which will clear the new marker lines initial state. */} | |
{shouldShowSkeleton && <ReportActionsSkeletonView />} |
Before my previous PR, both shouldShowSkeleton
and shouldShowReportActionsList
were true, but ReportSkeletonView
was rendered below ReportActionsView
. This meant that ReportSkeletonView
was hidden behind ReportActionsView
. In my previous PR, I removed shouldShowReportActionsList
and made the display of ReportActionsView
depend on shouldShowSkeleton
.
To verify you could try to reproduce the issue in staging. It will display loading skeleton instead of blank list.
Continuing with the review tomorrow, as I'm currently having issues getting signed out whilst testing. |
@tsa321 Sorry could you also clarify why the preconditions are required in your test steps? |
@jjcoffee, to make the related reports data available in Onyx: if it is not cached in Onyx, the report will not open immediately when accessed. Instead, it will wait for the |
Just noting that I've reported a separate comment linking bug on Slack here. It is present on staging so not to do with this PR, but involves a fresh sign-in causing the comment to jump around on the screen. desktop-chrome-2024-08-07_15.42.47.mp4 |
@tsa321 I see on your native recordings you had the same issue where you can't scroll past the comment-linked item. I think this is also reproducible on main, but could you check? Or do you have any ideas how we could quickly fix within this PR? ISSUE-android-app-2024-08-07_17.25.43.mp4 |
Signed-off-by: Tsaqif <[email protected]>
@jjcoffee I have fixed the bug in the latest commit. In Android, the issue is caused by the following:
The
where App/src/pages/home/report/ReportActionsView.tsx Lines 419 to 421 in cc4626f
Thus, The
but in Android, it updates too late when the first |
@tsa321 Great detective work! I'm actually thinking now that it might be better to split this out into a new issue as it's not really within scope of this PR (since the issue is there on main) and it would be good to keep it separate in case of regressions. Could you revert the change for now and we'll come back to it as a follow-up? |
Signed-off-by: Tsaqif <[email protected]>
@jjcoffee I have reverted the last commit |
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 PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
FYI I believe this was deployed to prod yesterday, from this checklist - #47219 |
Details
Fixed Issues
$ #40937
PROPOSAL: #40937 (comment)
Tests
Precondition:
Test:
+
button on the left side of the composer.Offline tests
QA Steps
Precondition:
Test:
+
button on the left side of the composer.PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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-native-d.mp4
Android: mWeb Chrome
android-mweb_d.mp4
iOS: Native
ios-native_d.mp4
iOS: mWeb Safari
ios-msfari_d.mp4
MacOS: Chrome / Safari
macos-web-d.mp4
MacOS: Desktop
macos-desktop_d.mp4