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
79 changes: 76 additions & 3 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8762,9 +8762,6 @@ const CONST = {
INTERACTIVE_STEP_SUB_HEADER: {
STEP_BUTTON: 'InteractiveStepSubHeader-StepButton',
},
WALLET: {
ADD_BANK_ACCOUNT: 'Wallet-AddBankAccount',
},
SOCIALS: {
LINK: 'Socials',
},
Expand All @@ -8780,6 +8777,82 @@ const CONST = {
SEND: 'SignIn-Send',
CONFIRM: 'SignIn-Confirm',
},
SETTINGS_GENERAL: {
HELP: 'SettingsGeneral-Help',
WHATS_NEW: 'SettingsGeneral-WhatsNew',
ABOUT: 'SettingsGeneral-About',
TROUBLESHOOT: 'SettingsGeneral-Troubleshoot',
SAVE_THE_WORLD: 'SettingsGeneral-SaveTheWorld',
SIGN_OUT: 'SettingsGeneral-SignOut',
GO_TO_CLASSIC: 'SettingsGeneral-GoToExpensifyClassic',
},
SETTINGS_PROFILE: {
AVATAR: 'SettingsProfile-Avatar',
DISPLAY_NAME: 'SettingsProfile-DisplayName',
CONTACT_METHODS: 'SettingsProfile-ContactMethods',
STATUS: 'SettingsProfile-Status',
PRONOUNS: 'SettingsProfile-Pronouns',
TIMEZONE: 'SettingsProfile-Timezone',
SHARE_CODE: 'SettingsProfile-ShareCode',
LEGAL_NAME: 'SettingsProfile-LegalName',
DATE_OF_BIRTH: 'SettingsProfile-DateOfBirth',
PHONE_NUMBER: 'SettingsProfile-PhoneNumber',
ADDRESS: 'SettingsProfile-Address',
},
SETTINGS_PREFERENCES: {
PRIORITY_MODE: 'SettingsPreferences-PriorityMode',
LANGUAGE: 'SettingsPreferences-Language',
PAYMENT_CURRENCY: 'SettingsPreferences-PaymentCurrency',
THEME: 'SettingsPreferences-Theme',
},
SETTINGS_SECURITY: {
TWO_FACTOR_AUTH: 'SettingsSecurity-TwoFactorAuth',
REVOKE_MFA: 'SettingsSecurity-RevokeMFA',
MERGE_ACCOUNTS: 'SettingsSecurity-MergeAccounts',
LOCK_UNLOCK_ACCOUNT: 'SettingsSecurity-LockUnlockAccount',
CLOSE_ACCOUNT: 'SettingsSecurity-CloseAccount',
ADD_COPILOT: 'SettingsSecurity-AddCopilot',
DELEGATE_ITEM: 'SettingsSecurity-DelegateItem',
DELEGATE_CHANGE_ACCESS: 'SettingsSecurity-DelegateChangeAccess',
DELEGATE_REMOVE: 'SettingsSecurity-DelegateRemove',
},
SETTINGS_WALLET: {
ADD_BANK_ACCOUNT: 'SettingsWallet-AddBankAccount',
IMPORT_TRANSACTIONS: 'SettingsWallet-ImportTransactions',
TRANSFER_BALANCE: 'SettingsWallet-TransferBalance',
ENABLE_WALLET: 'SettingsWallet-EnableWallet',
},
SETTINGS_RULES: {
NEW_RULE: 'SettingsRules-NewRule',
},
SETTINGS_TEACHERS_UNITE: {
I_KNOW_A_TEACHER: 'SettingsTeachersUnite-IKnowATeacher',
I_AM_A_TEACHER: 'SettingsTeachersUnite-IAmATeacher',
},
SETTINGS_SUBSCRIPTION: {
EXPLORE_PLANS: 'SettingsSubscription-ExplorePlans',
SAVE_WITH_EXPENSIFY: 'SettingsSubscription-SaveWithExpensify',
RETRY_PAYMENT: 'SettingsSubscription-RetryPayment',
AUTHENTICATE_PAYMENT: 'SettingsSubscription-AuthenticatePayment',
VIEW_PAYMENT_HISTORY: 'SettingsSubscription-ViewPaymentHistory',
REQUEST_REFUND: 'SettingsSubscription-RequestRefund',
REQUEST_EARLY_CANCELLATION: 'SettingsSubscription-RequestEarlyCancellation',
},
SETTINGS_ABOUT: {
APP_DOWNLOAD_LINKS: 'SettingsAbout-AppDownloadLinks',
VIEW_KEYBOARD_SHORTCUTS: 'SettingsAbout-ViewKeyboardShortcuts',
VIEW_THE_CODE: 'SettingsAbout-ViewTheCode',
VIEW_OPEN_JOBS: 'SettingsAbout-ViewOpenJobs',
REPORT_A_BUG: 'SettingsAbout-ReportABug',
},
SETTINGS_TROUBLESHOOT: {
CLEAR_CACHE: 'SettingsTroubleshoot-ClearCache',
EXPORT_ONYX: 'SettingsTroubleshoot-ExportOnyx',
GO_TO_CLASSIC: 'SettingsTroubleshoot-GoToExpensifyClassic',
},
SETTINGS_EXIT_SURVEY: {
GO_TO_CLASSIC: 'SettingsExitSurvey-GoToExpensifyClassic',
},
},

DOMAIN: {
Expand Down
4 changes: 4 additions & 0 deletions src/pages/TeachersUnite/SaveTheWorldPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import useWaitForNavigation from '@hooks/useWaitForNavigation';
import Navigation from '@libs/Navigation/Navigation';
import CONST from '@src/CONST';
import type {TranslationPaths} from '@src/languages/types';
import ROUTES from '@src/ROUTES';
import SCREENS from '@src/SCREENS';
Expand All @@ -30,10 +31,12 @@ function SaveTheWorldPage() {
{
translationKey: 'teachersUnitePage.iKnowATeacher',
action: waitForNavigate(() => Navigation.navigate(ROUTES.I_KNOW_A_TEACHER)),
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_TEACHERS_UNITE.I_KNOW_A_TEACHER,
},
{
translationKey: 'teachersUnitePage.iAmATeacher',
action: waitForNavigate(() => Navigation.navigate(ROUTES.I_AM_A_TEACHER)),
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_TEACHERS_UNITE.I_AM_A_TEACHER,
},
];

Expand All @@ -44,6 +47,7 @@ function SaveTheWorldPage() {
shouldShowRightIcon: true,
link: '',
wrapperStyle: [styles.sectionMenuItemTopDescription],
sentryLabel: item.sentryLabel,
}));
}, [translate, waitForNavigate, styles]);

Expand Down
11 changes: 9 additions & 2 deletions src/pages/settings/AboutPage/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import type {TranslationPaths} from '@src/languages/types';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type IconAsset from '@src/types/utils/IconAsset';
import type WithSentryLabel from '@src/types/utils/SentryLabel';
import pkg from '../../../../package.json';
import useAboutSectionIllustration from './useAboutSectionIllustration';

Expand All @@ -41,7 +42,7 @@ function getFlavor(): string {
return '';
}

type MenuItem = {
type MenuItem = WithSentryLabel & {
translationKey: TranslationPaths;
icon: IconAsset;
iconRight?: IconAsset;
Expand All @@ -66,17 +67,20 @@ function AboutPage() {
{
translationKey: 'initialSettingsPage.aboutPage.appDownloadLinks',
icon: icons.Link,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_ABOUT.APP_DOWNLOAD_LINKS,
action: waitForNavigate(() => Navigation.navigate(ROUTES.SETTINGS_APP_DOWNLOAD_LINKS)),
},
{
translationKey: 'initialSettingsPage.aboutPage.viewKeyboardShortcuts',
icon: icons.Keyboard,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_ABOUT.VIEW_KEYBOARD_SHORTCUTS,
action: waitForNavigate(() => Navigation.navigate(ROUTES.KEYBOARD_SHORTCUTS.getRoute(Navigation.getActiveRoute()))),
},
{
translationKey: 'initialSettingsPage.aboutPage.viewTheCode',
icon: icons.Eye,
iconRight: icons.NewWindow,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_ABOUT.VIEW_THE_CODE,
action: () => {
openExternalLink(CONST.GITHUB_URL);
return Promise.resolve();
Expand All @@ -87,6 +91,7 @@ function AboutPage() {
translationKey: 'initialSettingsPage.aboutPage.viewOpenJobs',
icon: icons.MoneyBag,
iconRight: icons.NewWindow,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_ABOUT.VIEW_OPEN_JOBS,
action: () => {
openExternalLink(CONST.UPWORK_URL);
return Promise.resolve();
Expand All @@ -96,11 +101,12 @@ function AboutPage() {
{
translationKey: 'initialSettingsPage.aboutPage.reportABug',
icon: icons.Bug,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_ABOUT.REPORT_A_BUG,
action: waitForNavigate(() => navigateToConciergeChat(conciergeReportID, false)),
},
];

return baseMenuItems.map(({translationKey, icon, iconRight, action, link}: MenuItem) => ({
return baseMenuItems.map(({translationKey, icon, iconRight, action, link, sentryLabel}: MenuItem) => ({
key: translationKey,
title: translate(translationKey),
icon,
Expand All @@ -119,6 +125,7 @@ function AboutPage() {
ref: popoverAnchor,
shouldBlockSelection: !!link,
wrapperStyle: [styles.sectionMenuItemTopDescription],
sentryLabel,
}));
}, [icons, styles, translate, waitForNavigate, conciergeReportID]);

Expand Down
1 change: 1 addition & 0 deletions src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function ExitSurveyConfirmPage({route, navigation}: ExitSurveyConfirmPageProps)
large
text={translate(shouldShowQuickTips ? 'exitSurvey.takeMeToExpensifyClassic' : 'exitSurvey.goToExpensifyClassic')}
pressOnEnter
sentryLabel={CONST.SENTRY_LABEL.SETTINGS_EXIT_SURVEY.GO_TO_CLASSIC}
onPress={() => {
switchToOldDot(exitSurveyResponse);
Navigation.dismissModal();
Expand Down
7 changes: 7 additions & 0 deletions src/pages/settings/InitialSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
classicRedirectMenuItem = {
translationKey: 'exitSurvey.goToExpensifyClassic',
icon: icons.ExpensifyLogoNew,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_GENERAL.GO_TO_CLASSIC,
...(CONFIG.IS_HYBRID_APP
? {
action: () => closeReactNativeApp({shouldSetNVP: true, isTrackingGPS}),
Expand Down Expand Up @@ -341,6 +342,7 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
icon: icons.QuestionMark,
iconRight: icons.NewWindow,
shouldShowRightIcon: true,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_GENERAL.HELP,
link: CONST.NEWHELP_URL,
action: () => {
openExternalLink(CONST.NEWHELP_URL);
Expand All @@ -351,6 +353,7 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
icon: icons.TreasureChest,
iconRight: icons.NewWindow,
shouldShowRightIcon: true,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_GENERAL.WHATS_NEW,
link: CONST.WHATS_NEW_URL,
action: () => {
openExternalLink(CONST.WHATS_NEW_URL);
Expand All @@ -360,23 +363,27 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
translationKey: 'initialSettingsPage.about',
icon: icons.Info,
screenName: SCREENS.SETTINGS.ABOUT,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_GENERAL.ABOUT,
action: () => Navigation.navigate(ROUTES.SETTINGS_ABOUT),
},
{
translationKey: 'initialSettingsPage.aboutPage.troubleshoot',
icon: icons.Lightbulb,
screenName: SCREENS.SETTINGS.TROUBLESHOOT,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_GENERAL.TROUBLESHOOT,
action: () => Navigation.navigate(ROUTES.SETTINGS_TROUBLESHOOT),
},
{
translationKey: 'sidebarScreen.saveTheWorld',
icon: icons.Heart,
screenName: SCREENS.SETTINGS.SAVE_THE_WORLD,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_GENERAL.SAVE_THE_WORLD,
action: () => Navigation.navigate(ROUTES.SETTINGS_SAVE_THE_WORLD),
},
{
translationKey: signOutTranslationKey,
icon: icons.Exit,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_GENERAL.SIGN_OUT,
action: () => {
signOut(false);
},
Expand Down
4 changes: 4 additions & 0 deletions src/pages/settings/Preferences/PreferencesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function PreferencesPage() {
description={translate('priorityModePage.priorityMode')}
onPress={() => Navigation.navigate(ROUTES.SETTINGS_PRIORITY_MODE)}
wrapperStyle={styles.sectionMenuItemTopDescription}
sentryLabel={CONST.SENTRY_LABEL.SETTINGS_PREFERENCES.PRIORITY_MODE}
/>
<MenuItemWithTopDescription
shouldShowRightIcon
Expand All @@ -113,20 +114,23 @@ function PreferencesPage() {
onPress={() => Navigation.navigate(ROUTES.SETTINGS_LANGUAGE)}
wrapperStyle={styles.sectionMenuItemTopDescription}
hintText={!preferredLocale || !isFullySupportedLocale(preferredLocale) ? translate('languagePage.aiGenerated') : ''}
sentryLabel={CONST.SENTRY_LABEL.SETTINGS_PREFERENCES.LANGUAGE}
/>
<MenuItemWithTopDescription
shouldShowRightIcon
title={`${paymentCurrency} - ${getCurrencySymbol(paymentCurrency)}`}
description={translate('billingCurrency.paymentCurrency')}
onPress={() => Navigation.navigate(ROUTES.SETTINGS_PAYMENT_CURRENCY)}
wrapperStyle={styles.sectionMenuItemTopDescription}
sentryLabel={CONST.SENTRY_LABEL.SETTINGS_PREFERENCES.PAYMENT_CURRENCY}
/>
<MenuItemWithTopDescription
shouldShowRightIcon
title={translate(`themePage.themes.${preferredTheme ?? CONST.THEME.DEFAULT}.label`)}
description={translate('themePage.theme')}
onPress={() => Navigation.navigate(ROUTES.SETTINGS_THEME)}
wrapperStyle={styles.sectionMenuItemTopDescription}
sentryLabel={CONST.SENTRY_LABEL.SETTINGS_PREFERENCES.THEME}
/>
</View>
</Section>
Expand Down
13 changes: 13 additions & 0 deletions src/pages/settings/Profile/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function ProfilePage() {
description: translate('displayNamePage.headerTitle'),
title: formatPhoneNumber(getDisplayNameOrDefault(currentUserPersonalDetails)),
pageRoute: ROUTES.SETTINGS_DISPLAY_NAME,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_PROFILE.DISPLAY_NAME,
},
{
description: translate('contacts.contactMethods'),
Expand All @@ -85,29 +86,34 @@ function ProfilePage() {
pageRoute: ROUTES.SETTINGS_CONTACT_METHODS.route,
brickRoadIndicator: contactMethodBrickRoadIndicator,
testID: 'contact-method-menu-item',
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_PROFILE.CONTACT_METHODS,
},
{
description: translate('statusPage.status'),
title: emojiCode ? `${emojiCode} ${currentUserPersonalDetails?.status?.text ?? ''}` : '',
pageRoute: ROUTES.SETTINGS_STATUS,
brickRoadIndicator: isEmptyObject(vacationDelegate?.errors) ? undefined : CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_PROFILE.STATUS,
},
{
description: translate('pronounsPage.pronouns'),
title: getPronouns(),
pageRoute: ROUTES.SETTINGS_PRONOUNS,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_PROFILE.PRONOUNS,
},
{
description: translate('timezonePage.timezone'),
title: currentUserPersonalDetails?.timezone?.selected ?? '',
pageRoute: ROUTES.SETTINGS_TIMEZONE,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_PROFILE.TIMEZONE,
},
];

const privateOptions = [
{
description: translate('privatePersonalDetails.legalName'),
title: legalName,
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_PROFILE.LEGAL_NAME,
action: () => {
if (isActingAsDelegate) {
showDelegateNoAccessModal();
Expand All @@ -119,6 +125,7 @@ function ProfilePage() {
{
description: translate('common.dob'),
title: privateDetails.dob ?? '',
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_PROFILE.DATE_OF_BIRTH,
action: () => {
if (isActingAsDelegate) {
showDelegateNoAccessModal();
Expand All @@ -130,6 +137,7 @@ function ProfilePage() {
{
description: translate('common.phoneNumber'),
title: privateDetails.phoneNumber ?? '',
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_PROFILE.PHONE_NUMBER,
action: () => {
if (isActingAsDelegate) {
showDelegateNoAccessModal();
Expand All @@ -142,6 +150,7 @@ function ProfilePage() {
{
description: translate('privatePersonalDetails.address'),
title: getFormattedAddress(privateDetails),
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_PROFILE.ADDRESS,
action: () => {
if (isActingAsDelegate) {
showDelegateNoAccessModal();
Expand Down Expand Up @@ -202,6 +211,7 @@ function ProfilePage() {
pendingAction={currentUserPersonalDetails?.pendingFields?.avatar ?? undefined}
fallbackIcon={currentUserPersonalDetails?.fallbackIcon}
editIconStyle={styles.profilePageAvatar}
sentryLabel={CONST.SENTRY_LABEL.SETTINGS_PROFILE.AVATAR}
/>
</MenuItemGroup>
)}
Expand All @@ -217,6 +227,7 @@ function ProfilePage() {
onPress={() => Navigation.navigate(detail.pageRoute)}
brickRoadIndicator={detail.brickRoadIndicator}
pressableTestID={detail?.testID}
sentryLabel={detail.sentryLabel}
/>
))}
<Button
Expand All @@ -225,6 +236,7 @@ function ProfilePage() {
onPress={() => Navigation.navigate(ROUTES.SETTINGS_SHARE_CODE)}
icon={icons.QrCode}
style={[styles.alignSelfStart, styles.mt6]}
sentryLabel={CONST.SENTRY_LABEL.SETTINGS_PROFILE.SHARE_CODE}
/>
</Section>
<Section
Expand All @@ -251,6 +263,7 @@ function ProfilePage() {
wrapperStyle={styles.sectionMenuItemTopDescription}
onPress={detail.action}
brickRoadIndicator={detail.brickRoadIndicator}
sentryLabel={detail.sentryLabel}
/>
))}
</MenuItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/pages/settings/Rules/ExpenseRulesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ function ExpenseRulesPage() {
icon={icons.Plus}
text={translate('expenseRulesPage.newRule')}
style={[shouldUseNarrowLayout && styles.flex1]}
sentryLabel={CONST.SENTRY_LABEL.SETTINGS_RULES.NEW_RULE}
/>
</View>
);
Expand Down
Loading
Loading