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
50 changes: 50 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7582,6 +7582,56 @@ const CONST = {
REPORTS: 'NavigationTabBar-Reports',
WORKSPACES: 'NavigationTabBar-Workspaces',
ACCOUNT: 'NavigationTabBar-Account',
FLOATING_ACTION_BUTTON: 'NavigationTabBar-FloatingActionButton',
FLOATING_RECEIPT_BUTTON: 'NavigationTabBar-FloatingReceiptButton',
},
FAB_MENU: {
CREATE_EXPENSE: 'FABMenu-CreateExpense',
TRACK_DISTANCE: 'FABMenu-TrackDistance',
CREATE_REPORT: 'FABMenu-CreateReport',
START_CHAT: 'FABMenu-StartChat',
SEND_INVOICE: 'FABMenu-SendInvoice',
BOOK_TRAVEL: 'FABMenu-BookTravel',
TEST_DRIVE: 'FABMenu-TestDrive',
NEW_WORKSPACE: 'FABMenu-NewWorkspace',
QUICK_ACTION: 'FABMenu-QuickAction',
},
ATTACHMENT_CAROUSEL: {
PREVIOUS_BUTTON: 'AttachmentCarousel-PreviousButton',
NEXT_BUTTON: 'AttachmentCarousel-NextButton',
ITEM: 'AttachmentCarousel-Item',
MODERATION_BUTTON: 'AttachmentCarousel-ModerationButton',
RETRY_BUTTON: 'AttachmentView-RetryButton',
},
ATTACHMENT_MODAL: {
SEND_BUTTON: 'AttachmentModal-SendButton',
IMAGE_ZOOM: 'AttachmentModal-ImageZoom',
},
HEADER: {
BACK_BUTTON: 'Header-BackButton',
DOWNLOAD_BUTTON: 'Header-DownloadButton',
CLOSE_BUTTON: 'Header-CloseButton',
MORE_BUTTON: 'Header-MoreButton',
},
VIDEO_PLAYER: {
PLAY_PAUSE_BUTTON: 'VideoPlayer-PlayPauseButton',
FULLSCREEN_BUTTON: 'VideoPlayer-FullscreenButton',
MORE_BUTTON: 'VideoPlayer-MoreButton',
EXPAND_BUTTON: 'VideoPlayer-ExpandButton',
THUMBNAIL: 'VideoPlayer-Thumbnail',
MUTE_BUTTON: 'VideoPlayer-MuteButton',
VIDEO: 'VideoPlayer-Video',
},
HTML_RENDERER: {
IMAGE: 'HTMLRenderer-Image',
},
RECEIPT: {
IMAGE: 'Receipt-Image',
},
RECEIPT_MODAL: {
REPLACE_RECEIPT: 'ReceiptModal-ReplaceReceipt',
DOWNLOAD_RECEIPT: 'ReceiptModal-DownloadReceipt',
DELETE_RECEIPT: 'ReceiptModal-DeleteReceipt',
},
HEADER_VIEW: {
BACK_BUTTON: 'HeaderView-BackButton',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
import {View} from 'react-native';
import type {Attachment} from '@components/Attachments/types';
import Button from '@components/Button';
import * as Expensicons from '@components/Icon/Expensicons';

Check warning on line 5 in src/components/Attachments/AttachmentCarousel/CarouselButtons.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used by a pattern. Direct imports from Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details

Check warning on line 5 in src/components/Attachments/AttachmentCarousel/CarouselButtons.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used. Direct imports from @components/Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details
import Tooltip from '@components/Tooltip';
import useLocalize from '@hooks/useLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import CONST from '@src/CONST';

type CarouselButtonsProps = {
/** Where the arrows should be visible */
Expand Down Expand Up @@ -53,6 +54,7 @@
onPress={onBack}
onPressIn={cancelAutoHideArrow}
onPressOut={autoHideArrow}
sentryLabel={CONST.SENTRY_LABEL.ATTACHMENT_CAROUSEL.PREVIOUS_BUTTON}
/>
</View>
</Tooltip>
Expand All @@ -68,6 +70,7 @@
onPress={onForward}
onPressIn={cancelAutoHideArrow}
onPressOut={autoHideArrow}
sentryLabel={CONST.SENTRY_LABEL.ATTACHMENT_CAROUSEL.NEXT_BUTTON}
/>
</View>
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import AttachmentView from '@components/Attachments/AttachmentView';
import type {Attachment} from '@components/Attachments/types';
import Button from '@components/Button';
import * as Expensicons from '@components/Icon/Expensicons';

Check warning on line 7 in src/components/Attachments/AttachmentCarousel/CarouselItem.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used by a pattern. Direct imports from Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details

Check warning on line 7 in src/components/Attachments/AttachmentCarousel/CarouselItem.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used. Direct imports from @components/Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details
import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback';
import SafeAreaConsumer from '@components/SafeAreaConsumer';
import Text from '@components/Text';
Expand Down Expand Up @@ -46,6 +46,7 @@
style={style}
onPress={() => setIsHidden(!isHidden)}
testID="moderationButton"
sentryLabel={CONST.SENTRY_LABEL.ATTACHMENT_CAROUSEL.MODERATION_BUTTON}
>
<Text
style={[styles.buttonSmallText, styles.userSelectNone]}
Expand All @@ -70,6 +71,7 @@
accessibilityRole={CONST.ROLE.BUTTON}
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
accessibilityLabel={item.file?.name || translate('attachmentView.unknownFilename')}
sentryLabel={CONST.SENTRY_LABEL.ATTACHMENT_CAROUSEL.ITEM}
>
{children}
</PressableWithoutFeedback>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function AttachmentViewImage({attachmentID, url, file, isAuthTokenRequired, load
accessibilityRole={CONST.ROLE.BUTTON}
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
accessibilityLabel={file?.name || translate('attachmentView.unknownFilename')}
sentryLabel={CONST.SENTRY_LABEL.ATTACHMENT_CAROUSEL.ITEM}
>
{children}
</PressableWithoutFeedback>
Expand Down
1 change: 1 addition & 0 deletions src/components/Attachments/AttachmentView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ function AttachmentView({
}
setImageError(false);
}}
sentryLabel={CONST.SENTRY_LABEL.ATTACHMENT_CAROUSEL.RETRY_BUTTON}
/>
</View>
);
Expand Down
8 changes: 2 additions & 6 deletions src/components/BaseMiniContextMenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import getButtonState from '@libs/getButtonState';
import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import type WithSentryLabel from '@src/types/utils/SentryLabel';
import type {PressableRef} from './Pressable/GenericPressable/types';
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import Tooltip from './Tooltip/PopoverAnchorTooltip';

type BaseMiniContextMenuItemProps = {
type BaseMiniContextMenuItemProps = WithSentryLabel & {
/**
* Text to display when hovering the menu item
*/
Expand Down Expand Up @@ -41,11 +42,6 @@ type BaseMiniContextMenuItemProps = {
* Reference to the outer element
*/
ref?: PressableRef;

/**
* Label for Sentry tracking
*/
sentryLabel?: string;
};

/**
Expand Down
Loading
Loading