Skip to content
Open
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
10 changes: 7 additions & 3 deletions src/components/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ type MenuItemBaseProps = ForwardedFSClassProps &
/** A right-aligned subtitle for this menu option */
subtitle?: string | number;

/** Any additional styles to apply to the subtitle */
subtitleStyle?: StyleProp<TextStyle>;

/** Should the title show with normal font weight (not bold) */
shouldShowBasicTitle?: boolean;

Expand Down Expand Up @@ -526,6 +529,7 @@ function MenuItem({
titleComponent,
titleContainerStyle,
subtitle,
subtitleStyle,
shouldShowBasicTitle,
rightLabelIcon,
label,
Expand Down Expand Up @@ -1068,7 +1072,7 @@ function MenuItem({
{/* Since subtitle can be of type number, we should allow 0 to be shown */}
{(subtitle === 0 || !!subtitle) && (
<View style={[styles.justifyContentCenter, styles.mr1]}>
<Text style={[styles.textLabelSupporting, ...(combinedStyle as TextStyle[])]}>{subtitle}</Text>
<Text style={[styles.textLabelSupporting, ...(combinedStyle as TextStyle[]), subtitleStyle]}>{subtitle}</Text>
</View>
)}
{(!!rightIconAccountID || !!rightIconReportID) && (
Expand All @@ -1090,7 +1094,7 @@ function MenuItem({
</View>
)}
{!!brickRoadIndicator && (
<View style={[styles.alignItemsCenter, styles.justifyContentCenter, styles.ml1]}>
<View style={[styles.alignItemsCenter, styles.justifyContentCenter, styles.ml1, styles.mr2]}>
<Icon
src={icons.DotIndicator}
fill={brickRoadIndicator === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR ? theme.danger : theme.success}
Expand All @@ -1114,7 +1118,7 @@ function MenuItem({
<View
style={[
styles.pointerEventsAuto,
StyleUtils.getMenuItemIconStyle(isCompact),
StyleUtils.getMenuItemIconStyle(true),
disabled && !shouldUseDefaultCursorWhenDisabled && styles.cursorDisabled,
hasSubMenuItems && styles.pl6,
!isHovered && shouldDimIconRight && styles.opacitySemiTransparent,
Expand Down
8 changes: 4 additions & 4 deletions src/components/PrevNextButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function PrevNextButtons({isPrevButtonDisabled, isNextButtonDisabled, onNext, on
<View style={[styles.reportActionContextMenuMiniButton, {backgroundColor: theme.borderLighter}, isPrevButtonDisabled && styles.buttonOpacityDisabled]}>
<Icon
src={icons.BackArrow}
width={variables.iconSizeNormal}
height={variables.iconSizeNormal}
width={variables.iconSizeExtraSmall}
height={variables.iconSizeExtraSmall}
fill={theme.icon}
/>
</View>
Expand All @@ -61,8 +61,8 @@ function PrevNextButtons({isPrevButtonDisabled, isNextButtonDisabled, onNext, on
<Icon
src={icons.ArrowRight}
fill={theme.icon}
width={variables.iconSizeNormal}
height={variables.iconSizeNormal}
width={variables.iconSizeExtraSmall}
height={variables.iconSizeExtraSmall}
/>
</View>
</PressableWithFeedback>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ function MoneyRequestReportPreviewContent({
<Icon
src={expensifyIcons.BackArrow}
fill={theme.icon}
width={variables.iconSizeNormal}
height={variables.iconSizeNormal}
width={variables.iconSizeExtraSmall}
height={variables.iconSizeExtraSmall}
/>
</PressableWithFeedback>
<PressableWithFeedback
Expand All @@ -625,8 +625,8 @@ function MoneyRequestReportPreviewContent({
<Icon
src={expensifyIcons.ArrowRight}
fill={theme.icon}
width={variables.iconSizeNormal}
height={variables.iconSizeNormal}
width={variables.iconSizeExtraSmall}
height={variables.iconSizeExtraSmall}
/>
</PressableWithFeedback>
</View>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ function MoneyRequestView({
{shouldShowReimbursable && (
<OfflineWithFeedback
pendingAction={getPendingFieldAction('reimbursable')}
contentContainerStyle={[styles.flexRow, styles.optionRow, styles.justifyContentBetween, styles.alignItemsCenter, styles.ml5, styles.mr8]}
contentContainerStyle={[styles.flexRow, styles.optionRow, styles.justifyContentBetween, styles.alignItemsCenter, styles.m5]}
>
<View>
<Text
Expand All @@ -1168,7 +1168,7 @@ function MoneyRequestView({
{shouldShowBillable && (
<OfflineWithFeedback
pendingAction={getPendingFieldAction('billable')}
contentContainerStyle={[styles.flexRow, styles.optionRow, styles.justifyContentBetween, styles.alignItemsCenter, styles.ml5, styles.mr8]}
contentContainerStyle={[styles.flexRow, styles.optionRow, styles.justifyContentBetween, styles.alignItemsCenter, styles.m5]}
>
<View>
<Text
Expand Down
2 changes: 1 addition & 1 deletion src/components/ThreeDotsMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function ThreeDotsMenu({
e.preventDefault();
}}
ref={buttonRef}
style={[styles.touchableButtonImage, iconStyles]}
style={[styles.touchableButtonImage, styles.threeDotsMenuIconWidth, iconStyles]}
role={getButtonRole(isNested)}
isNested={isNested}
accessibilityLabel={translate(iconTooltip)}
Expand Down
5 changes: 5 additions & 0 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {StackActions} from '@react-navigation/native';
import {validTransactionDraftIDsSelector} from '@selectors/TransactionDraft';
import React, {useCallback, useEffect, useMemo} from 'react';
import type {StyleProp, TextStyle} from 'react-native';
import {InteractionManager, View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import type {ValueOf} from 'type-fest';
Expand Down Expand Up @@ -146,6 +147,7 @@ type ReportDetailsPageMenuItem = {
brickRoadIndicator?: ValueOf<typeof CONST.BRICK_ROAD_INDICATOR_STATUS>;
subtitle?: number;
shouldShowRightIcon?: boolean;
subtitleStyle?: StyleProp<TextStyle>;
};

type ReportDetailsPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps<ReportDetailsNavigatorParamList, typeof SCREENS.REPORT_DETAILS.ROOT>;
Expand Down Expand Up @@ -409,6 +411,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
translationKey: 'common.members',
icon: expensifyIcons.Users,
subtitle: activeChatMembers.length,
subtitleStyle: [styles.ph2],
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
Expand Down Expand Up @@ -642,6 +645,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
amountOwed,
ownerBillingGracePeriodEnd,
iouTransaction,
styles.ph2,
]);

const displayNamesWithTooltips = useMemo(() => {
Expand Down Expand Up @@ -1108,6 +1112,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
isAnonymousAction={item.isAnonymousAction}
shouldShowRightIcon={item.shouldShowRightIcon}
brickRoadIndicator={item.brickRoadIndicator}
subtitleStyle={item.subtitleStyle}
/>
))}

Expand Down
4 changes: 4 additions & 0 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,10 @@ const staticStyles = (theme: ThemeColors) =>
height: variables.componentSizeXSmall,
},

threeDotsMenuIconWidth: {
width: variables.componentSizeXSmall,
},

touchableButtonImage: {
alignItems: 'center',
height: variables.componentSizeNormal,
Expand Down
Loading