[No QA] Add reasonAttributes to FullscreenLoadingIndicator usage sites#84719
Conversation
|
@hoangzinh 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✅ Changes either increased or maintained existing code coverage, great job!
|
|
PR doesn’t need product input as a performance PR. Unassigning and unsubscribing myself. |
| return ( | ||
| <> | ||
| {isLoading && <FullScreenLoadingIndicator />} | ||
| {isLoading && <FullScreenLoadingIndicator reasonAttributes={{context: 'WalletStatementModal', isLoading}} />} |
There was a problem hiding this comment.
| {isLoading && <FullScreenLoadingIndicator reasonAttributes={{context: 'WalletStatementModal', isLoading}} />} | |
| {isLoading && <FullScreenLoadingIndicator reasonAttributes={{context: 'WalletStatementModal'}} />} |
NAB: I think we don't need this attribute; it's always true
| <FullScreenLoaderStateContext.Provider value={stateContextValue}> | ||
| {children} | ||
| {isLoaderVisible && <FullScreenLoadingIndicator />} | ||
| {isLoaderVisible && <FullScreenLoadingIndicator reasonAttributes={{context: 'FullScreenLoaderContext', isLoaderVisible}} />} |
There was a problem hiding this comment.
| {isLoaderVisible && <FullScreenLoadingIndicator reasonAttributes={{context: 'FullScreenLoaderContext', isLoaderVisible}} />} | |
| {isLoaderVisible && <FullScreenLoadingIndicator reasonAttributes={{context: 'FullScreenLoaderContext'}} />} |
NAB: I think we don't need this attribute; it's always true
| {isLoading && ( | ||
| <FullScreenLoadingIndicator | ||
| testID="attachment-loading-spinner" | ||
| reasonAttributes={{context: 'AttachmentModalBaseContent', isLoading}} |
There was a problem hiding this comment.
| reasonAttributes={{context: 'AttachmentModalBaseContent', isLoading}} | |
| reasonAttributes={{context: 'AttachmentModalBaseContent'}} |
NAB: I think we don't need this attribute; it's always true
|
|
||
| if (isLoading) { | ||
| return <FullScreenLoadingIndicator />; | ||
| const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'MissingPersonalDetails', isLoading}; |
There was a problem hiding this comment.
| const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'MissingPersonalDetails', isLoading}; | |
| const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'MissingPersonalDetails'}; |
NAB: I think we don't need this attribute; it's always true
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
Fixed |
…n-loading-reason-attributes # Conflicts: # src/pages/LoadingPage.tsx
|
Updated the branch and resolved conflicts. |
|
🚧 @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! 🧪🧪
|
|
✋ 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/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 allFullscreenLoadingIndicatorusage sites so that Sentry skeleton spans carry structured metadata (acontextstring and relevant boolean state flags). This makes it possible to identify which component is showing a loading state and why, enabling engineers to debug infinite skeleton issues in Sentry.The
reasonAttributesprop is also threaded through the image component chain (Image/types.ts→ImageWithSizeCalculation→ThumbnailImage→ReceiptImage) so image-loading skeletons carry context too.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