[No QA] Add reasonAttributes to ActivityIndicator usages#84724
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@shubham1206agra 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] |
|
@linhvovan29546 @youssef-lr One of you needs to 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] |
|
PR doesn’t need product input as a performance PR. Unassigning and unsubscribing myself. |
src/components/Button/index.tsx
Outdated
|
|
||
| const buttonLoadingReasonAttributes: SkeletonSpanReasonAttributes = { | ||
| context: 'Button', | ||
| isLoading, |
There was a problem hiding this comment.
| isLoading, |
NAB: @sosek108 This variable is always true.
|
|
||
| const copyableTextFieldLoadingReasonAttributes: SkeletonSpanReasonAttributes = { | ||
| context: 'CopyableTextField', | ||
| isLoading, |
There was a problem hiding this comment.
| isLoading, |
NAB: @sosek108 This variable is always true.
| isExpenseReportType, | ||
| isOffline: !!isOffline, | ||
| isLoading: !!transactionsSnapshotMetadata?.isLoading, |
There was a problem hiding this comment.
| isExpenseReportType, | |
| isOffline: !!isOffline, | |
| isLoading: !!transactionsSnapshotMetadata?.isLoading, | |
| isOffline: !!isOffline, |
NAB: @sosek108 isExpenseReportType is always false when displayed and transactionsSnapshotMetadata?.isLoading is always true.
|
|
||
| const helpLoadingReasonAttributes: SkeletonSpanReasonAttributes = { | ||
| context: 'HelpContent', | ||
| isNavigationInitialized: currentState !== undefined, |
There was a problem hiding this comment.
| isNavigationInitialized: currentState !== undefined, |
@sosek108 This variable is always false when displayed
src/components/MenuItem.tsx
Outdated
| const descriptionVerticalMargin = shouldShowDescriptionOnTop ? styles.mb1 : styles.mt1; | ||
| const menuItemLoadingReasonAttributes: SkeletonSpanReasonAttributes = { | ||
| context: 'MenuItem', | ||
| shouldShowLoadingSpinnerIcon, |
There was a problem hiding this comment.
| shouldShowLoadingSpinnerIcon, |
NAB: @sosek108 This variable is always true
src/components/MoneyReportHeader.tsx
Outdated
|
|
||
| const pdfLoadingReasonAttributes: SkeletonSpanReasonAttributes = { | ||
| context: 'MoneyReportHeader.PDFModal', | ||
| hasFinishedPDFDownload: !!hasFinishedPDFDownload, |
There was a problem hiding this comment.
| hasFinishedPDFDownload: !!hasFinishedPDFDownload, |
NAB: @sosek108 This variable is always false
…r-reason-attributes-batch1
|
Removed redundant reasonAttributes that always have constant values when the ActivityIndicator is displayed (e.g. isLoading is always true, hasFinishedPDFDownload is always false). Kept only context identifier and attributes that actually vary, like isOffline in TransactionGroupListExpanded. @shubham1206agra |
…tor-reason-attributes-batch1
Reviewer Checklist
|
|
🚧 @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
reasonAttributesprop withcontextidentifiers toActivityIndicator(andFullscreenLoadingIndicator) usages in:Button— tracksisLoadingstateMenuItem— tracksshouldShowLoadingSpinnerIconstateFullscreenLoadingIndicator— passes through incomingreasonAttributesto innerActivityIndicatorMoneyReportHeader— tracks PDF generation loading stateMapView.website— tracksisOfflinestate for lazy map loadHelpContent— tracks navigation initialization stateCopyableTextField— tracksisLoadingstateTransactionGroupListExpanded— tracks search pagination loading statePart of #81683 — enables engineers to debug infinite skeletons via Sentry spans.
Fixed Issues
$ #83394
Tests
Offline tests
N/A — telemetry-only change, no behavior change.
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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