diff --git a/src/components/AddressSearch/index.tsx b/src/components/AddressSearch/index.tsx index ff8bf9746bfe..b5e4b9547212 100644 --- a/src/components/AddressSearch/index.tsx +++ b/src/components/AddressSearch/index.tsx @@ -18,6 +18,7 @@ import {getCommandURL} from '@libs/ApiUtils'; import getCurrentPosition from '@libs/getCurrentPosition'; import type {GeolocationErrorCodeType} from '@libs/getCurrentPosition/getCurrentPosition.types'; import {getAddressComponents, getPlaceAutocompleteTerms} from '@libs/GooglePlacesUtils'; +import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan'; import variables from '@styles/variables'; import CONST from '@src/CONST'; import type {Address} from '@src/types/onyx/PrivatePersonalDetails'; @@ -331,14 +332,19 @@ function AddressSearch({ [isTyping, styles, translate], ); - const listLoader = useMemo( - () => ( + const listLoader = useMemo(() => { + const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'AddressSearch.listLoader'}; + return ( - + - ), - [styles.pv4], - ); + ); + }, [styles.pv4]); + + const fetchingLocationReasonAttributes: SkeletonSpanReasonAttributes = { + context: 'AddressSearch.isFetchingCurrentLocation', + isFetchingCurrentLocation, + }; return ( /* @@ -480,7 +486,10 @@ function AddressSearch({ {isFetchingCurrentLocation && ( - + )} diff --git a/src/components/TextInput/BaseTextInput/implementation/index.native.tsx b/src/components/TextInput/BaseTextInput/implementation/index.native.tsx index 7bd7d1b169f0..78620a2c4159 100644 --- a/src/components/TextInput/BaseTextInput/implementation/index.native.tsx +++ b/src/components/TextInput/BaseTextInput/implementation/index.native.tsx @@ -26,6 +26,7 @@ import useStyleUtils from '@hooks/useStyleUtils'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import isInputAutoFilled from '@libs/isInputAutoFilled'; +import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan'; import variables from '@styles/variables'; import CONST from '@src/CONST'; @@ -288,6 +289,10 @@ function BaseTextInput({ // Height fix is needed only for Text single line inputs const shouldApplyHeight = !shouldUseFullInputHeight && !isMultiline && !isMarkdownEnabled; const accessibilityLabel = [label, hint].filter(Boolean).join(', '); + const loadingSpinnerReasonAttributes: SkeletonSpanReasonAttributes = { + context: 'BaseTextInput.isLoading', + isLoading: !!inputProps.isLoading, + }; return ( <> @@ -443,6 +448,7 @@ function BaseTextInput({ )} {!!inputProps.secureTextEntry && ( diff --git a/src/components/TextInput/BaseTextInput/implementation/index.tsx b/src/components/TextInput/BaseTextInput/implementation/index.tsx index 0adb1eaa6049..a42aecebf6f8 100644 --- a/src/components/TextInput/BaseTextInput/implementation/index.tsx +++ b/src/components/TextInput/BaseTextInput/implementation/index.tsx @@ -30,6 +30,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import {isMobileChrome, isMobileSafari, isSafari} from '@libs/Browser'; import {scrollToRight} from '@libs/InputUtils'; import isInputAutoFilled from '@libs/isInputAutoFilled'; +import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan'; import variables from '@styles/variables'; import CONST from '@src/CONST'; @@ -327,6 +328,11 @@ function BaseTextInput({ // If we need some other inputMode (eg. 'decimal'), then the autocomplete bar will show, but we can do nothing about it as it's a known Chrome bug. const inputMode = inputProps.inputMode ?? (isMobileChrome() ? 'search' : undefined); const accessibilityLabel = [label, hint, errorText ? translate('common.yourReviewIsRequired') : ''].filter(Boolean).join(', '); + const loadingSpinnerReasonAttributes: SkeletonSpanReasonAttributes = { + context: 'BaseTextInput.isLoading', + isLoading: !!inputProps.isLoading, + }; + return ( <> )} {!!inputProps.secureTextEntry && ( diff --git a/src/pages/domain/Saml/SamlConfigurationDetailsSectionContent.tsx b/src/pages/domain/Saml/SamlConfigurationDetailsSectionContent.tsx index 0941bbbc3b28..473e416cfa6c 100644 --- a/src/pages/domain/Saml/SamlConfigurationDetailsSectionContent.tsx +++ b/src/pages/domain/Saml/SamlConfigurationDetailsSectionContent.tsx @@ -10,6 +10,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import {getSamlSettings, setSamlIdentity} from '@libs/actions/Domain'; import {getLatestErrorMessage} from '@libs/ErrorUtils'; import StringUtils from '@libs/StringUtils'; +import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan'; import variables from '@styles/variables'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -41,7 +42,17 @@ function SamlConfigurationDetailsSectionContent({accountID, domainName, shouldSh }, [accountID, domainName]); if (samlMetadata?.isLoading || isLoadingOnyxValue(samlMetadataResults)) { - return ; + const reasonAttributes: SkeletonSpanReasonAttributes = { + context: 'SamlConfigurationDetailsSectionContent.loading', + isSamlMetadataLoading: !!samlMetadata?.isLoading, + isLoadingOnyxValue: isLoadingOnyxValue(samlMetadataResults), + }; + return ( + + ); } if (samlMetadata?.errors) { diff --git a/src/pages/inbox/report/ListBoundaryLoader.tsx b/src/pages/inbox/report/ListBoundaryLoader.tsx index 36f9289152d8..01a893906026 100644 --- a/src/pages/inbox/report/ListBoundaryLoader.tsx +++ b/src/pages/inbox/report/ListBoundaryLoader.tsx @@ -8,6 +8,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; +import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan'; import CONST from '@src/CONST'; type ListBoundaryLoaderProps = { @@ -99,9 +100,13 @@ function ListBoundaryLoader({ if (type === CONST.LIST_COMPONENTS.HEADER && isLoadingNewerReportActions) { // applied for a header of the list, i.e. when you scroll to the bottom of the list // the styles for android and the rest components are different that's why we use two different components + const reasonAttributes: SkeletonSpanReasonAttributes = { + context: 'ListBoundaryLoader.header', + isLoadingNewerReportActions, + }; return ( - + ); } diff --git a/src/pages/settings/Profile/ProfilePage.tsx b/src/pages/settings/Profile/ProfilePage.tsx index 90f6d57371c7..b7e716c8c7bb 100755 --- a/src/pages/settings/Profile/ProfilePage.tsx +++ b/src/pages/settings/Profile/ProfilePage.tsx @@ -28,6 +28,7 @@ import Navigation from '@libs/Navigation/Navigation'; import type {PlatformStackRouteProp} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsSplitNavigatorParamList} from '@libs/Navigation/types'; import {getDisplayNameOrDefault, getFormattedAddress} from '@libs/PersonalDetailsUtils'; +import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan'; import {getContactMethodsOptions, getLoginListBrickRoadIndicator} from '@libs/UserUtils'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; @@ -161,6 +162,11 @@ function ProfilePage() { }, ]; + const privateSectionReasonAttributes: SkeletonSpanReasonAttributes = { + context: 'ProfilePage.privateSection', + isLoadingApp: !!isLoadingApp, + }; + return ( {isLoadingApp ? ( - + ) : ( diff --git a/src/pages/settings/Rules/ExpenseRulesPage.tsx b/src/pages/settings/Rules/ExpenseRulesPage.tsx index 143a6029bf37..3585d78b1129 100644 --- a/src/pages/settings/Rules/ExpenseRulesPage.tsx +++ b/src/pages/settings/Rules/ExpenseRulesPage.tsx @@ -31,6 +31,7 @@ import {canUseTouchScreen} from '@libs/DeviceCapabilities'; import {formatExpenseRuleChanges, getKeyForRule} from '@libs/ExpenseRuleUtils'; import Navigation from '@libs/Navigation/Navigation'; import Parser from '@libs/Parser'; +import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan'; import tokenizedSearch from '@libs/tokenizedSearch'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -228,6 +229,11 @@ function ExpenseRulesPage() { /> ); + const loadingReasonAttributes: SkeletonSpanReasonAttributes = { + context: 'ExpenseRulesPage.loading', + isLoading, + }; + return ( )} {hasRules && (