Skip to content

Commit 28f3a46

Browse files
committed
merge main
2 parents db86b4b + 46f3d2c commit 28f3a46

File tree

46 files changed

+699
-156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+699
-156
lines changed

.github/ISSUE_TEMPLATE/Standard.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ Which of our officially supported platforms is this issue occurring on?
4343

4444
## Screenshots/Videos
4545

46-
Add any screenshot/video evidence
46+
<details>
47+
<summary>Add any screenshot/video evidence</summary>
4748

49+
4850
</details>
4951

5052
[View all open jobs on GitHub](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22)

android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ android {
110110
minSdkVersion rootProject.ext.minSdkVersion
111111
targetSdkVersion rootProject.ext.targetSdkVersion
112112
multiDexEnabled rootProject.ext.multiDexEnabled
113-
versionCode 1009004301
114-
versionName "9.0.43-1"
113+
versionCode 1009004304
114+
versionName "9.0.43-4"
115115
// Supported language variants must be declared here to avoid from being removed during the compilation.
116116
// This also helps us to not include unnecessary language variants in the APK.
117117
resConfigs "en", "es"

ios/NewExpensify/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</dict>
4141
</array>
4242
<key>CFBundleVersion</key>
43-
<string>9.0.43.1</string>
43+
<string>9.0.43.4</string>
4444
<key>FullStory</key>
4545
<dict>
4646
<key>OrgId</key>

ios/NewExpensifyTests/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>9.0.43.1</string>
22+
<string>9.0.43.4</string>
2323
</dict>
2424
</plist>

ios/NotificationServiceExtension/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.0.43</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.0.43.1</string>
16+
<string>9.0.43.4</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.expensify",
3-
"version": "9.0.43-1",
3+
"version": "9.0.43-4",
44
"author": "Expensify, Inc.",
55
"homepage": "https://new.expensify.com",
66
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",

src/ONYXKEYS.ts

+4
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,9 @@ const ONYXKEYS = {
423423
/** Stores the information about the saved searches */
424424
SAVED_SEARCHES: 'nvp_savedSearches',
425425

426+
/** Stores the information about the recent searches */
427+
RECENT_SEARCHES: 'nvp_recentSearches',
428+
426429
/** Stores recently used currencies */
427430
RECENTLY_USED_CURRENCIES: 'nvp_recentlyUsedCurrencies',
428431

@@ -850,6 +853,7 @@ type OnyxValuesMapping = {
850853

851854
// ONYXKEYS.NVP_TRYNEWDOT is HybridApp onboarding data
852855
[ONYXKEYS.NVP_TRYNEWDOT]: OnyxTypes.TryNewDot;
856+
[ONYXKEYS.RECENT_SEARCHES]: Record<string, OnyxTypes.RecentSearchItem>;
853857
[ONYXKEYS.SAVED_SEARCHES]: OnyxTypes.SaveSearch;
854858
[ONYXKEYS.RECENTLY_USED_CURRENCIES]: string[];
855859
[ONYXKEYS.ACTIVE_CLIENTS]: string[];

src/components/Button/index.tsx

+16-3
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,24 @@ type ButtonProps = Partial<ChildrenProps> & {
139139

140140
/** Whether button's content should be centered */
141141
isContentCentered?: boolean;
142+
143+
/** Whether the Enter keyboard listening is active whether or not the screen that contains the button is focused */
144+
isPressOnEnterActive?: boolean;
142145
};
143146

144-
type KeyboardShortcutComponentProps = Pick<ButtonProps, 'isDisabled' | 'isLoading' | 'onPress' | 'pressOnEnter' | 'allowBubble' | 'enterKeyEventListenerPriority'>;
147+
type KeyboardShortcutComponentProps = Pick<ButtonProps, 'isDisabled' | 'isLoading' | 'onPress' | 'pressOnEnter' | 'allowBubble' | 'enterKeyEventListenerPriority' | 'isPressOnEnterActive'>;
145148

146149
const accessibilityRoles: string[] = Object.values(CONST.ROLE);
147150

148-
function KeyboardShortcutComponent({isDisabled = false, isLoading = false, onPress = () => {}, pressOnEnter, allowBubble, enterKeyEventListenerPriority}: KeyboardShortcutComponentProps) {
151+
function KeyboardShortcutComponent({
152+
isDisabled = false,
153+
isLoading = false,
154+
onPress = () => {},
155+
pressOnEnter,
156+
allowBubble,
157+
enterKeyEventListenerPriority,
158+
isPressOnEnterActive = false,
159+
}: KeyboardShortcutComponentProps) {
149160
const isFocused = useIsFocused();
150161
const activeElementRole = useActiveElementRole();
151162

@@ -163,7 +174,7 @@ function KeyboardShortcutComponent({isDisabled = false, isLoading = false, onPre
163174

164175
const config = useMemo(
165176
() => ({
166-
isActive: pressOnEnter && !shouldDisableEnterShortcut && isFocused,
177+
isActive: pressOnEnter && !shouldDisableEnterShortcut && (isFocused || isPressOnEnterActive),
167178
shouldBubble: allowBubble,
168179
priority: enterKeyEventListenerPriority,
169180
shouldPreventDefault: false,
@@ -230,6 +241,7 @@ function Button(
230241
isSplitButton = false,
231242
link = false,
232243
isContentCentered = false,
244+
isPressOnEnterActive,
233245
...rest
234246
}: ButtonProps,
235247
ref: ForwardedRef<View>,
@@ -329,6 +341,7 @@ function Button(
329341
onPress={onPress}
330342
pressOnEnter={pressOnEnter}
331343
enterKeyEventListenerPriority={enterKeyEventListenerPriority}
344+
isPressOnEnterActive={isPressOnEnterActive}
332345
/>
333346
)}
334347
<PressableWithFeedback

src/components/ConfirmContent.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ type ConfirmContentProps = {
9595

9696
/** Image to display with content */
9797
image?: IconAsset;
98+
99+
/** Whether the modal is visibile */
100+
isVisible: boolean;
98101
};
99102

100103
function ConfirmContent({
@@ -123,6 +126,7 @@ function ConfirmContent({
123126
image,
124127
titleContainerStyles,
125128
shouldReverseStackedButtons = false,
129+
isVisible,
126130
}: ConfirmContentProps) {
127131
const styles = useThemeStyles();
128132
const {translate} = useLocalize();
@@ -200,6 +204,7 @@ function ConfirmContent({
200204
style={shouldReverseStackedButtons ? styles.mt3 : styles.mt4}
201205
onPress={onConfirm}
202206
pressOnEnter
207+
isPressOnEnterActive={isVisible}
203208
large
204209
text={confirmText || translate('common.yes')}
205210
isDisabled={isOffline && shouldDisableConfirmButtonWhenOffline}
@@ -228,6 +233,7 @@ function ConfirmContent({
228233
style={[styles.flex1]}
229234
onPress={onConfirm}
230235
pressOnEnter
236+
isPressOnEnterActive={isVisible}
231237
text={confirmText || translate('common.yes')}
232238
isDisabled={isOffline && shouldDisableConfirmButtonWhenOffline}
233239
/>

src/components/ConfirmModal.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ function ConfirmModal({
164164
prompt={prompt}
165165
success={success}
166166
danger={danger}
167+
isVisible={isVisible}
167168
shouldDisableConfirmButtonWhenOffline={shouldDisableConfirmButtonWhenOffline}
168169
shouldShowCancelButton={shouldShowCancelButton}
169170
shouldCenterContent={shouldCenterContent}

src/components/MoneyReportHeader.tsx

+9-2
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,15 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
113113
const isArchivedReport = ReportUtils.isArchivedRoomWithID(moneyRequestReport?.reportID);
114114
const [archiveReason] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${moneyRequestReport?.reportID ?? '-1'}`, {selector: ReportUtils.getArchiveReason});
115115

116-
const shouldShowPayButton = useMemo(
117-
() => IOU.canIOUBePaid(moneyRequestReport, chatReport, policy, transaction ? [transaction] : undefined),
116+
const getCanIOUBePaid = useCallback(
117+
(onlyShowPayElsewhere = false) => IOU.canIOUBePaid(moneyRequestReport, chatReport, policy, transaction ? [transaction] : undefined, onlyShowPayElsewhere),
118118
[moneyRequestReport, chatReport, policy, transaction],
119119
);
120+
const canIOUBePaid = useMemo(() => getCanIOUBePaid(), [getCanIOUBePaid]);
121+
122+
const onlyShowPayElsewhere = useMemo(() => !canIOUBePaid && getCanIOUBePaid(true), [canIOUBePaid, getCanIOUBePaid]);
123+
124+
const shouldShowPayButton = canIOUBePaid || onlyShowPayElsewhere;
120125

121126
const shouldShowApproveButton = useMemo(() => IOU.canApproveIOU(moneyRequestReport, policy), [moneyRequestReport, policy]);
122127

@@ -292,6 +297,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
292297
{shouldShowSettlementButton && !shouldUseNarrowLayout && (
293298
<View style={styles.pv2}>
294299
<SettlementButton
300+
onlyShowPayElsewhere={onlyShowPayElsewhere}
295301
currency={moneyRequestReport?.currency}
296302
confirmApproval={confirmApproval}
297303
policyID={moneyRequestReport?.policyID}
@@ -345,6 +351,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
345351
<View style={[styles.dFlex, styles.flexColumn, styles.gap3, styles.pb3, styles.ph5, styles.borderBottom]}>
346352
{shouldShowSettlementButton && shouldUseNarrowLayout && (
347353
<SettlementButton
354+
onlyShowPayElsewhere={onlyShowPayElsewhere}
348355
currency={moneyRequestReport?.currency}
349356
confirmApproval={confirmApproval}
350357
policyID={moneyRequestReport?.policyID}

src/components/ReportActionItem/ReportPreview.tsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,14 @@ function ReportPreview({
319319
]);
320320

321321
const bankAccountRoute = ReportUtils.getBankAccountRoute(chatReport);
322-
323-
const shouldShowPayButton = useMemo(
324-
() => isPaidAnimationRunning || IOU.canIOUBePaid(iouReport, chatReport, policy, allTransactions),
325-
[isPaidAnimationRunning, iouReport, chatReport, policy, allTransactions],
322+
const getCanIOUBePaid = useCallback(
323+
(onlyShowPayElsewhere = false) => IOU.canIOUBePaid(iouReport, chatReport, policy, allTransactions, onlyShowPayElsewhere),
324+
[iouReport, chatReport, policy, allTransactions],
326325
);
327326

327+
const canIOUBePaid = useMemo(() => getCanIOUBePaid(), [getCanIOUBePaid]);
328+
const onlyShowPayElsewhere = useMemo(() => !canIOUBePaid && getCanIOUBePaid(true), [canIOUBePaid, getCanIOUBePaid]);
329+
const shouldShowPayButton = isPaidAnimationRunning || canIOUBePaid || onlyShowPayElsewhere;
328330
const shouldShowApproveButton = useMemo(() => IOU.canApproveIOU(iouReport, policy), [iouReport, policy]);
329331

330332
const shouldDisableApproveButton = shouldShowApproveButton && !ReportUtils.isAllowedToApproveExpenseReport(iouReport);
@@ -518,6 +520,7 @@ function ReportPreview({
518520
</View>
519521
{shouldShowSettlementButton && (
520522
<AnimatedSettlementButton
523+
onlyShowPayElsewhere={onlyShowPayElsewhere}
521524
isPaidAnimationRunning={isPaidAnimationRunning}
522525
onAnimationFinish={stopAnimation}
523526
formattedAmount={getSettlementAmount() ?? ''}

src/components/Search/SearchPageHeader.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,15 @@ function HeaderWrapper({icon, children, text, isCannedQuery}: HeaderWrapperProps
6969
) : (
7070
<View style={styles.pr5}>
7171
<SearchRouterInput
72+
value={text}
73+
setValue={() => {}}
74+
updateSearch={() => {}}
7275
disabled
7376
isFullWidth
7477
wrapperStyle={[styles.searchRouterInputResults, styles.br2]}
7578
wrapperFocusedStyle={styles.searchRouterInputResultsFocused}
76-
defaultValue={text}
7779
rightComponent={children}
80+
routerListRef={undefined}
7881
/>
7982
</View>
8083
)}

0 commit comments

Comments
 (0)