Skip to content

Commit

Permalink
Merge branch 'main' into blimpich-makeAutomatedIssueHourly
Browse files Browse the repository at this point in the history
  • Loading branch information
blimpich authored Feb 22, 2024
2 parents a8ee7a2 + 8c17a70 commit 13f52c6
Show file tree
Hide file tree
Showing 95 changed files with 1,563 additions and 1,489 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001044309
versionName "1.4.43-9"
versionCode 1001044312
versionName "1.4.43-12"
}

flavorDimensions "default"
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.4.43.9</string>
<string>1.4.43.12</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.4.43.9</string>
<string>1.4.43.12</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>1.4.43</string>
<key>CFBundleVersion</key>
<string>1.4.43.9</string>
<string>1.4.43.12</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
43 changes: 30 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.4.43-9",
"version": "1.4.43-12",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down Expand Up @@ -86,6 +86,7 @@
"@react-native-picker/picker": "2.5.1",
"@react-navigation/material-top-tabs": "^6.6.3",
"@react-navigation/native": "6.1.8",
"@react-navigation/native-stack": "^6.9.17",
"@react-navigation/stack": "6.3.16",
"@react-ng/bounds-observer": "^0.2.1",
"@rnmapbox/maps": "^10.1.11",
Expand Down
39 changes: 39 additions & 0 deletions patches/@react-navigation+native-stack+6.9.17.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/node_modules/@react-navigation/native-stack/src/types.tsx b/node_modules/@react-navigation/native-stack/src/types.tsx
index 206fb0b..7a34a8e 100644
--- a/node_modules/@react-navigation/native-stack/src/types.tsx
+++ b/node_modules/@react-navigation/native-stack/src/types.tsx
@@ -490,6 +490,14 @@ export type NativeStackNavigationOptions = {
* Only supported on iOS and Android.
*/
freezeOnBlur?: boolean;
+ // partial changes from https://github.com/react-navigation/react-navigation/commit/90cfbf23bcc5259f3262691a9eec6c5b906e5262
+ // patch can be removed when new version of `native-stack` will be released
+ /**
+ * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`.
+ *
+ * Only supported on iOS
+ */
+ keyboardHandlingEnabled?: boolean;
};

export type NativeStackNavigatorProps = DefaultNavigatorOptions<
diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx
index a005c43..03d8b50 100644
--- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx
+++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx
@@ -161,6 +161,7 @@ const SceneView = ({
statusBarTranslucent,
statusBarColor,
freezeOnBlur,
+ keyboardHandlingEnabled,
} = options;

let {
@@ -289,6 +290,7 @@ const SceneView = ({
onNativeDismissCancelled={onNativeDismissCancelled}
// this prop is available since rn-screens 3.16
freezeOnBlur={freezeOnBlur}
+ hideKeyboardOnSwipe={keyboardHandlingEnabled}
>
<NavigationContext.Provider value={navigation}>
<NavigationRouteContext.Provider value={route}>
17 changes: 17 additions & 0 deletions patches/expo-av+13.10.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/node_modules/expo-av/android/build.gradle b/node_modules/expo-av/android/build.gradle
index 2d68ca6..c3fa3c5 100644
--- a/node_modules/expo-av/android/build.gradle
+++ b/node_modules/expo-av/android/build.gradle
@@ -7,10 +7,11 @@ apply plugin: 'maven-publish'
group = 'host.exp.exponent'
version = '13.10.4'

+def REACT_NATIVE_PATH = this.hasProperty('reactNativeProject') ? this.reactNativeProject + '/node_modules/react-native/package.json' : 'react-native/package.json'
def REACT_NATIVE_BUILD_FROM_SOURCE = findProject(":ReactAndroid") != null
def REACT_NATIVE_DIR = REACT_NATIVE_BUILD_FROM_SOURCE
? findProject(":ReactAndroid").getProjectDir().parent
- : new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).parent
+ : new File(["node", "--print", "require.resolve('${REACT_NATIVE_PATH}')"].execute(null, rootDir).text.trim()).parent

def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
2 changes: 2 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,7 @@ const CONST = {
DEFAULT_TIME_ZONE: {automatic: true, selected: 'America/Los_Angeles'},
DEFAULT_ACCOUNT_DATA: {errors: null, success: '', isLoading: false},
DEFAULT_CLOSE_ACCOUNT_DATA: {errors: null, success: '', isLoading: false},
DEFAULT_NETWORK_DATA: {isOffline: false},
FORMS: {
LOGIN_FORM: 'LoginForm',
VALIDATE_CODE_FORM: 'ValidateCodeForm',
Expand Down Expand Up @@ -1555,6 +1556,7 @@ const CONST = {
WORKSPACE_TRAVEL: 'WorkspaceBookTravel',
WORKSPACE_MEMBERS: 'WorkspaceManageMembers',
WORKSPACE_BANK_ACCOUNT: 'WorkspaceBankAccount',
WORKSPACE_SETTINGS: 'WorkspaceSettings',
},
get EXPENSIFY_EMAILS() {
return [
Expand Down
4 changes: 2 additions & 2 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.MONEY_REQUEST_AMOUNT_FORM]: FormTypes.Form;
[ONYXKEYS.FORMS.MONEY_REQUEST_DATE_FORM]: FormTypes.Form;
[ONYXKEYS.FORMS.MONEY_REQUEST_HOLD_FORM]: FormTypes.MoneyRequestHoldReasonForm;
[ONYXKEYS.FORMS.NEW_CONTACT_METHOD_FORM]: FormTypes.Form;
[ONYXKEYS.FORMS.NEW_CONTACT_METHOD_FORM]: FormTypes.NewContactMethodForm;
[ONYXKEYS.FORMS.WAYPOINT_FORM]: FormTypes.Form;
[ONYXKEYS.FORMS.SETTINGS_STATUS_SET_FORM]: FormTypes.Form;
[ONYXKEYS.FORMS.SETTINGS_STATUS_CLEAR_DATE_FORM]: FormTypes.Form;
Expand Down Expand Up @@ -491,7 +491,7 @@ type OnyxValuesMapping = {
[ONYXKEYS.PRIVATE_PERSONAL_DETAILS]: OnyxTypes.PrivatePersonalDetails;
[ONYXKEYS.TASK]: OnyxTypes.Task;
[ONYXKEYS.WORKSPACE_RATE_AND_UNIT]: OnyxTypes.WorkspaceRateAndUnit;
[ONYXKEYS.CURRENCY_LIST]: Record<string, OnyxTypes.Currency>;
[ONYXKEYS.CURRENCY_LIST]: OnyxTypes.CurrencyList;
[ONYXKEYS.UPDATE_AVAILABLE]: boolean;
[ONYXKEYS.SCREEN_SHARE_REQUEST]: OnyxTypes.ScreenShareRequest;
[ONYXKEYS.COUNTRY_CODE]: number;
Expand Down
4 changes: 4 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ const ROUTES = {
route: 'workspace/:policyID/profile/description',
getRoute: (policyID: string) => `workspace/${policyID}/profile/description` as const,
},
WORKSPACE_PROFILE_SHARE: {
route: 'workspace/:policyID/profile/share',
getRoute: (policyID: string) => `workspace/${policyID}/profile/share` as const,
},
WORKSPACE_AVATAR: {
route: 'workspace/:policyID/avatar',
getRoute: (policyID: string) => `workspace/${policyID}/avatar` as const,
Expand Down
1 change: 1 addition & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ const SCREENS = {
INVITE_MESSAGE: 'Workspace_Invite_Message',
CURRENCY: 'Workspace_Profile_Currency',
DESCRIPTION: 'Workspace_Profile_Description',
SHARE: 'Workspace_Profile_Share',
NAME: 'Workspace_Profile_Name',
},

Expand Down
2 changes: 2 additions & 0 deletions src/components/CategoryPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, {useMemo} from 'react';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import SelectionList from '@components/SelectionList';
import RadioListItem from '@components/SelectionList/RadioListItem';
import useDebouncedState from '@hooks/useDebouncedState';
import useLocalize from '@hooks/useLocalize';
import * as OptionsListUtils from '@libs/OptionsListUtils';
Expand Down Expand Up @@ -67,6 +68,7 @@ function CategoryPicker({selectedCategory, policyCategories, policyRecentlyUsedC
textInputLabel={shouldShowTextInput && translate('common.search')}
onChangeText={setSearchValue}
onSelectRow={onSubmit}
ListItem={RadioListItem}
initiallyFocusedOptionKey={selectedOptionKey}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/LocaleContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type LocaleContextProps = {

/** Returns a locally converted phone number for numbers from the same region
* and an internationally converted phone number with the country code for numbers from other regions */
formatPhoneNumber: (phoneNumber: string | undefined) => string;
formatPhoneNumber: (phoneNumber: string) => string;

/** Gets the locale digit corresponding to a standard digit */
toLocaleDigit: (digit: string) => string;
Expand Down
1 change: 1 addition & 0 deletions src/components/MagicCodeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -430,3 +430,4 @@ function MagicCodeInput(
MagicCodeInput.displayName = 'MagicCodeInput';

export default forwardRef(MagicCodeInput);
export type {AutoCompleteVariant, MagicCodeInputHandle};
13 changes: 8 additions & 5 deletions src/components/PopoverProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ function PopoverContextProvider(props: PopoverContextProps) {
const [isOpen, setIsOpen] = useState(false);
const activePopoverRef = useRef<AnchorRef | null>(null);

const closePopover = useCallback((anchorRef?: RefObject<View | HTMLElement>) => {
const closePopover = useCallback((anchorRef?: RefObject<View | HTMLElement>): boolean => {
if (!activePopoverRef.current || (anchorRef && anchorRef !== activePopoverRef.current.anchorRef)) {
return;
return false;
}

activePopoverRef.current.close();
activePopoverRef.current = null;
setIsOpen(false);
return true;
}, []);

useEffect(() => {
Expand Down Expand Up @@ -63,11 +64,13 @@ function PopoverContextProvider(props: PopoverContextProps) {
if (e.key !== 'Escape') {
return;
}
closePopover();
if (closePopover()) {
e.stopImmediatePropagation();
}
};
document.addEventListener('keydown', listener, true);
document.addEventListener('keyup', listener, true);
return () => {
document.removeEventListener('keydown', listener, true);
document.removeEventListener('keyup', listener, true);
};
}, [closePopover]);

Expand Down
4 changes: 4 additions & 0 deletions src/components/Pressable/PressableWithFeedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, {forwardRef, useState} from 'react';
import type {StyleProp, ViewStyle} from 'react-native';
import type {AnimatedStyle} from 'react-native-reanimated';
import OpacityView from '@components/OpacityView';
import type {Color} from '@styles/theme/types';
import variables from '@styles/variables';
import GenericPressable from './GenericPressable';
import type {PressableRef} from './GenericPressable/types';
Expand All @@ -27,6 +28,9 @@ type PressableWithFeedbackProps = PressableProps & {

/** Whether the view needs to be rendered offscreen (for Android only) */
needsOffscreenAlphaCompositing?: boolean;

/** The color of the underlay that will show through when the Pressable is active. */
underlayColor?: Color;
};

function PressableWithFeedback(
Expand Down
14 changes: 12 additions & 2 deletions src/components/ScreenWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import SafeAreaConsumer from './SafeAreaConsumer';
import TestToolsModal from './TestToolsModal';

type ChildrenProps = {
insets?: EdgeInsets;
insets: EdgeInsets;
safeAreaPaddingBottomStyle?: {
paddingBottom?: DimensionValue;
};
Expand Down Expand Up @@ -201,7 +201,17 @@ function ScreenWrapper(

return (
<SafeAreaConsumer>
{({insets, paddingTop, paddingBottom, safeAreaPaddingBottomStyle}) => {
{({
insets = {
top: 0,
bottom: 0,
left: 0,
right: 0,
},
paddingTop,
paddingBottom,
safeAreaPaddingBottomStyle,
}) => {
const paddingStyle: StyleProp<ViewStyle> = {};

if (includePaddingTop) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ function BaseSelectionList<TItem extends ListItem>(
showTooltip={showTooltip}
canSelectMultiple={canSelectMultiple}
onSelectRow={() => selectRow(item)}
onDismissError={onDismissError}
onDismissError={() => onDismissError?.(item)}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
rightHandSideComponent={rightHandSideComponent}
keyForList={item.keyForList}
Expand Down
2 changes: 1 addition & 1 deletion src/components/SelectionList/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ type BaseSelectionListProps<TItem extends ListItem> = Partial<ChildrenProps> & {
onSelectAll?: () => void;

/** Callback to fire when an error is dismissed */
onDismissError?: () => void;
onDismissError?: (item: TItem) => void;

/** Label for the text input */
textInputLabel?: string;
Expand Down
Loading

0 comments on commit 13f52c6

Please sign in to comment.