[No QA] Add reasonAttributes to FullscreenLoadingIndicator usage sites#84715
Conversation
|
@bernhardoj 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] |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
src/pages/LogOutPreviousUserPage.tsx
Outdated
| return <FullScreenLoadingIndicator />; | ||
| const reasonAttributes: SkeletonSpanReasonAttributes = { | ||
| context: 'LogOutPreviousUserPage', | ||
| isAccountLoading: !!isAccountLoading, |
There was a problem hiding this comment.
Do we need isAccountLoading? We always render the loader here, no matter the isAccountLoading value.
src/pages/UnlinkLoginPage.tsx
Outdated
| return <FullScreenLoadingIndicator />; | ||
| const reasonAttributes: SkeletonSpanReasonAttributes = { | ||
| context: 'UnlinkLoginPage', | ||
| isAccountLoading: !!account?.isLoading, |
| reasonAttributes={{ | ||
| context: 'ValidateLoginPage', | ||
| isSigningIn: autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.SIGNING_IN, | ||
| shouldStartSignInWithValidateCode, |
There was a problem hiding this comment.
I think we can add hasAutoAuthState: !!autoAuthState
| context: 'withReportOrNotFound', | ||
| isLoadingReportData: isLoadingReportData !== false, | ||
| shouldFetchReport, | ||
| isReportLoaded, |
There was a problem hiding this comment.
This just comes to my mind. shouldShowFullScreenLoadingIndicator will be true if isReportLoaded is false, so the isReportLoaded sent to span will always be false, making it irrelevant, I guess? (All the previous PR I reviewed include all conditions ,though)
If we still want to include it, then I think we should include shouldHideReport here too.
| return <FullScreenLoadingIndicator />; | ||
| const reasonAttributes: SkeletonSpanReasonAttributes = { | ||
| context: 'BaseVerifyDomainPage', | ||
| isLoadingDomain: isLoadingOnyxValue(domainMetadata), |
There was a problem hiding this comment.
Do you think we should store isLoadingOnyxValue(domainMetadata) in a variable so we don't need to call it twice here?
const isLoadingDomain = isLoadingOnyxValue(domainMetadata);
if (isLoadingDomain) {
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'BaseVerifyDomainPage',
isLoadingDomain,
}There was a problem hiding this comment.
Other files:
src/pages/domain/DomainAccessRestrictedPage.tsx
src/pages/domain/DomainAddedPage.tsx
src/pages/domain/DomainNotFoundPageWrapper.tsx
src/pages/EnablePayments/EnablePayments.tsx
src/pages/EnablePayments/EnablePaymentsPage.tsx
There was a problem hiding this comment.
other files are in different PR
There was a problem hiding this comment.
It's on this PR.
https://github.com/Expensify/App/pull/84715/changes#diff-beea75314c0736bd40f17d8a90cd3b08a2a6e9aeea108d0df660f4ddfcadbe5aR48-R51
https://github.com/Expensify/App/pull/84715/changes#diff-817936329328fbad66f2cf6bd971190f2e1ac9ee6bb3ddf60dd40ffbec58d468R30-R33
https://github.com/Expensify/App/pull/84715/changes#diff-84499d73871406eb5c60944f9534030b608f6a2cae3c9dcee82e4d6829caaa0dR49-R53
https://github.com/Expensify/App/pull/84715/changes#diff-4543378d1478c7c6c4268637468e465c9ef40354fb45fb233c83e12b7d085778R43-R47
https://github.com/Expensify/App/pull/84715/changes#diff-6dae28063bdedc77a256a5d4d0f1c86b8c7fb5c3022c314a94bcafc5505d1b16R47-R50
|
No product review needed |
|
@bernhardoj I've addressed your comments |
bernhardoj
left a comment
There was a problem hiding this comment.
Just a small request left here. Gonna approve now so it can be merged while I'm away.
…screen-loading-reason-attributes # Conflicts: # src/pages/LogOutPreviousUserPage.tsx
|
Updated the branch and resolved conflicts. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
🚧 @youssef-lr has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.3.38-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.38-4 🚀
|
Explanation of Change
Adds
reasonAttributesto allFullscreenLoadingIndicatorusages across 16 files insrc/pages/. Each call site now passes acontextstring (e.g.'BaseDomainVerifiedPage.FullscreenLoadingIndicator') so that Sentry skeleton spans include structured metadata identifying which component triggered the loading state. This makes it possible to pinpoint the exact component responsible for an infinite skeleton in Sentry, rather than seeing an anonymous span.This is part of the broader effort tracked in issue #81683 to add
reasonAttributesacross all skeleton/loading indicator usages.Fixed Issues
$ #83395
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari