Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ScreenWrapper from '@components/ScreenWrapper';
import useOnyx from '@hooks/useOnyx';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {clearPaymentCard3dsVerification, verifySetupIntent} from '@userActions/PaymentMethods';
import {verifySetupIntentAndRequestPolicyOwnerChange} from '@userActions/Policy/Policy';
import CONFIG from '@src/CONFIG';
Expand All @@ -31,6 +32,7 @@ function CardAuthenticationModal({headerTitle, policyID}: CardAuthenticationModa
const [session] = useOnyx(ONYXKEYS.SESSION);
const [isLoading, setIsLoading] = useState(true);
const [isVisible, setIsVisible] = useState(false);
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'CardAuthenticationModal', isLoading};

const onModalClose = useCallback(() => {
setIsVisible(false);
Expand Down Expand Up @@ -90,7 +92,7 @@ function CardAuthenticationModal({headerTitle, policyID}: CardAuthenticationModa
onBackButtonPress={onModalClose}
shouldDisplayHelpButton={false}
/>
{isLoading && <FullScreenLoadingIndicator />}
{isLoading && <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />}
<View style={[styles.flex1]}>
<iframe
src={authenticationLink}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {openLink} from '@libs/actions/Link';
import {convertToShortDisplayString} from '@libs/CurrencyUtils';
import {isPolicyAdmin} from '@libs/PolicyUtils';
import {getSubscriptionPrice, isSubscriptionTypeOfInvoicing} from '@libs/SubscriptionUtils';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import Navigation from '@navigation/Navigation';
import NotFoundPage from '@pages/ErrorPage/NotFoundPage';
import variables from '@styles/variables';
Expand Down Expand Up @@ -82,7 +83,8 @@ function SubscriptionSettings() {
}

if (!privateSubscription) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'SubscriptionSettings', privateSubscriptionLoaded: false};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {openLink} from '@libs/actions/Link';
import {convertToShortDisplayString} from '@libs/CurrencyUtils';
import {isPolicyAdmin} from '@libs/PolicyUtils';
import {getSubscriptionPrice, isSubscriptionTypeOfInvoicing} from '@libs/SubscriptionUtils';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import Navigation from '@navigation/Navigation';
import NotFoundPage from '@pages/ErrorPage/NotFoundPage';
import {formatSubscriptionEndDate} from '@pages/settings/Subscription/utils';
Expand Down Expand Up @@ -202,7 +203,8 @@ function SubscriptionSettings() {
}

if (!privateSubscription) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'SubscriptionSettings', privateSubscriptionLoaded: false};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {openSubscriptionPage} from '@libs/actions/Subscription';
import Navigation from '@libs/Navigation/Navigation';
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
import type {SettingsSplitNavigatorParamList} from '@libs/Navigation/types';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import ONYXKEYS from '@src/ONYXKEYS';
import SCREENS from '@src/SCREENS';
import CardSection from './CardSection/CardSection';
Expand Down Expand Up @@ -43,7 +44,8 @@ function SubscriptionSettingsPage({route}: SubscriptionSettingsPageProps) {
}, [isAppLoading, shouldShowPage]);

if (!shouldShowPage && isAppLoading) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'SubscriptionSettingsPage', isAppLoading: !!isAppLoading, shouldShowPage};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

if (!shouldShowPage) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import useSubPage from '@hooks/useSubPage';
import {clearDraftValues} from '@libs/actions/FormActions';
import Navigation from '@libs/Navigation/Navigation';
import {isSubscriptionTypeOfInvoicing} from '@libs/SubscriptionUtils';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import NotFoundPage from '@pages/ErrorPage/NotFoundPage';
import {updateSubscriptionSize} from '@userActions/Subscription';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -61,7 +62,8 @@ function SubscriptionSizePage() {
}

if (!privateSubscription) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'SubscriptionSize', privateSubscriptionLoaded: false};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
4 changes: 3 additions & 1 deletion src/pages/settings/Wallet/ChooseTransferAccountPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import useOnyx from '@hooks/useOnyx';
import useThemeStyles from '@hooks/useThemeStyles';
import {getLastFourDigits} from '@libs/BankAccountUtils';
import Navigation from '@libs/Navigation/Navigation';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {openPersonalBankAccountSetupView} from '@userActions/BankAccounts';
import {saveWalletTransferAccountTypeAndID} from '@userActions/PaymentMethods';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -96,7 +97,8 @@ function ChooseTransferAccountPage() {
}, [bankAccountOptions, selectedAccountID]);

if (isLoadingOnyxValue(walletTransferResult)) {
return <FullscreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'ChooseTransferAccountPage', walletTransferLoaded: false};
return <FullscreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {isFullScreenName} from '@libs/Navigation/helpers/isNavigatorName';
import Navigation from '@libs/Navigation/Navigation';
import type {PlatformStackRouteProp} from '@libs/Navigation/PlatformStackNavigation/types';
import type {SettingsNavigatorParamList} from '@libs/Navigation/types';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import CONST from '@src/CONST';
import NAVIGATORS from '@src/NAVIGATORS';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -166,7 +167,9 @@ function InternationalDepositAccountContent({
shouldShowOfflineIndicatorInWideScreen={pageIndex === CONST.CORPAY_FIELDS.INDEXES.MAPPING.CONFIRMATION}
>
{isRedirecting || isAccountLoading ? (
<FullScreenLoadingIndicator />
<FullScreenLoadingIndicator
reasonAttributes={{context: 'InternationalDepositAccountContent', isRedirecting: !!isRedirecting, isAccountLoading} satisfies SkeletonSpanReasonAttributes}
/>
) : (
<>
<HeaderWithBackButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
import useOnyx from '@hooks/useOnyx';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import type {PlatformStackScreenProps} from '@navigation/PlatformStackNavigation/types';
import type {SettingsNavigatorParamList} from '@navigation/types';
import ONYXKEYS from '@src/ONYXKEYS';
Expand All @@ -26,7 +27,8 @@ function InternationalDepositAccount({route}: InternationalDepositAccountProps)
const isLoading = isLoadingOnyxValue(privatePersonalDetailsMetadata, corpayFieldsMetadata, bankAccountListMetadata, draftValuesMetadata, countryMetadata, isLoadingMetadata);

if (isLoading) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'InternationalDepositAccount', isLoading};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
3 changes: 2 additions & 1 deletion src/pages/settings/Wallet/WalletPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -602,14 +602,15 @@ function WalletPage() {
}, [bottomMountItem, confirmDeleteCard, isBetaEnabled, icons.MoneySearch, icons.Table, icons.Trashcan, paymentMethod.methodID, selectedCard?.bank, shouldUseNarrowLayout, translate]);

if (isLoadingApp) {
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'WalletPage', isLoadingApp: !!isLoadingApp};
return (
<ScreenWrapper
testID="WalletPage"
shouldShowOfflineIndicatorInWideScreen
>
{headerWithBackButton}
<View style={styles.flex1}>
<FullScreenLoadingIndicator />
<FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />
</View>
</ScreenWrapper>
);
Expand Down
Loading