Skip to content

Commit

Permalink
Merge branch 'main' into expo-image
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekBoman committed Dec 13, 2023
2 parents 45c8e31 + 7f7cfb3 commit 4900127
Show file tree
Hide file tree
Showing 174 changed files with 957 additions and 718 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001041114
versionName "1.4.11-14"
versionCode 1001041123
versionName "1.4.11-23"
}

flavorDimensions "default"
Expand Down
30 changes: 15 additions & 15 deletions desktop/package-lock.json

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

2 changes: 1 addition & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"electron-context-menu": "^2.3.0",
"electron-log": "^4.4.7",
"electron-serve": "^1.0.0",
"electron-updater": "^6.1.4",
"electron-updater": "^6.1.6",
"node-machine-id": "^1.1.12"
},
"author": "Expensify, Inc.",
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.11.14</string>
<string>1.4.11.23</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.11.14</string>
<string>1.4.11.23</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.4.11-14",
"version": "1.4.11-23",
"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
121 changes: 112 additions & 9 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1099,11 +1099,6 @@ const CONST = {
USER_CANCELLED: 'User canceled flow.',
USER_TAPPED_BACK: 'User exited by clicking the back button.',
USER_EXITED: 'User exited by manual action.',
USER_CAMERA_DENINED: 'Onfido.OnfidoFlowError',
USER_CAMERA_PERMISSION: 'Encountered an error: cameraPermission',
// eslint-disable-next-line max-len
USER_CAMERA_CONSENT_DENIED:
'Unexpected result Intent. It might be a result of incorrect integration, make sure you only pass Onfido intent to handleActivityResult. It might be due to unpredictable crash or error. Please report the problem to [email protected]. Intent: null \n resultCode: 0',
},
},

Expand Down Expand Up @@ -2731,17 +2726,125 @@ const CONST = {
EXPENSIFY_LOGO_SIZE_RATIO: 0.22,
EXPENSIFY_LOGO_MARGIN_RATIO: 0.03,
},
/**
* Acceptable values for the `accessibilityRole` prop on react native components.
*
* **IMPORTANT:** Do not use with the `role` prop as it can cause errors.
*
* @deprecated ACCESSIBILITY_ROLE is deprecated. Please use CONST.ROLE instead.
*/
ACCESSIBILITY_ROLE: {
/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
BUTTON: 'button',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
LINK: 'link',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
MENUITEM: 'menuitem',
TEXT: 'presentation',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
TEXT: 'text',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
RADIO: 'radio',
IMAGEBUTTON: 'img button',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
IMAGEBUTTON: 'imagebutton',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
CHECKBOX: 'checkbox',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
SWITCH: 'switch',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
ADJUSTABLE: 'adjustable',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
IMAGE: 'image',
},
/**
* Acceptable values for the `role` attribute on react native components.
*
* **IMPORTANT:** Not for use with the `accessibilityRole` prop, as it accepts different values, and new components
* should use the `role` prop instead.
*/
ROLE: {
/** Use for elements with important, time-sensitive information. */
ALERT: 'alert',
/** Use for elements that act as buttons. */
BUTTON: 'button',
/** Use for elements representing checkboxes. */
CHECKBOX: 'checkbox',
/** Use for elements that allow a choice from multiple options. */
COMBOBOX: 'combobox',
/** Use with scrollable lists to represent a grid layout. */
GRID: 'grid',
/** Use for section headers or titles. */
HEADING: 'heading',
/** Use for image elements. */
IMG: 'img',
/** Use for elements that navigate to other pages or content. */
LINK: 'link',
/** Use to identify a list of items. */
LIST: 'list',
/** Use for a list of choices or options. */
MENU: 'menu',
/** Use for a container of multiple menus. */
MENUBAR: 'menubar',
/** Use for items within a menu. */
MENUITEM: 'menuitem',
/** Use when no specific role is needed. */
NONE: 'none',
/** Use for elements that don't require a specific role. */
PRESENTATION: 'presentation',
/** Use for elements showing progress of a task. */
PROGRESSBAR: 'progressbar',
/** Use for radio buttons. */
RADIO: 'radio',
/** Use for groups of radio buttons. */
RADIOGROUP: 'radiogroup',
/** Use for scrollbar elements. */
SCROLLBAR: 'scrollbar',
/** Use for text fields that are used for searching. */
SEARCHBOX: 'searchbox',
/** Use for adjustable elements like sliders. */
SLIDER: 'slider',
/** Use for a button that opens a list of choices. */
SPINBUTTON: 'spinbutton',
/** Use for elements providing a summary of app conditions. */
SUMMARY: 'summary',
/** Use for on/off switch elements. */
SWITCH: 'switch',
ADJUSTABLE: 'slider',
IMAGE: 'img',
/** Use for tab elements in a tab list. */
TAB: 'tab',
/** Use for a list of tabs. */
TABLIST: 'tablist',
/** Use for timer elements. */
TIMER: 'timer',
/** Use for toolbars containing action buttons or components. */
TOOLBAR: 'toolbar',
},
TRANSLATION_KEYS: {
ATTACHMENT: 'common.attachment',
Expand Down
6 changes: 5 additions & 1 deletion src/Expensify.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function Expensify(props) {
}, [props.isCheckingPublicRoom]);

const isAuthenticated = useMemo(() => Boolean(lodashGet(props.session, 'authToken', null)), [props.session]);
const autoAuthState = useMemo(() => lodashGet(props.session, 'autoAuthState', ''), [props.session]);

const contextValue = useMemo(
() => ({
Expand Down Expand Up @@ -207,7 +208,10 @@ function Expensify(props) {
}

return (
<DeeplinkWrapper isAuthenticated={isAuthenticated}>
<DeeplinkWrapper
isAuthenticated={isAuthenticated}
autoAuthState={autoAuthState}
>
{shouldInit && (
<>
<GrowlNotification ref={Growl.growlRef} />
Expand Down
8 changes: 4 additions & 4 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ type OnyxValues = {
[ONYXKEYS.COUNTRY]: string;
[ONYXKEYS.USER]: OnyxTypes.User;
[ONYXKEYS.USER_LOCATION]: OnyxTypes.UserLocation;
[ONYXKEYS.LOGIN_LIST]: Record<string, OnyxTypes.Login>;
[ONYXKEYS.LOGIN_LIST]: OnyxTypes.LoginList;
[ONYXKEYS.SESSION]: OnyxTypes.Session;
[ONYXKEYS.BETAS]: OnyxTypes.Beta[];
[ONYXKEYS.NVP_PRIORITY_MODE]: ValueOf<typeof CONST.PRIORITY_MODE>;
Expand All @@ -403,8 +403,8 @@ type OnyxValues = {
[ONYXKEYS.WALLET_ONFIDO]: OnyxTypes.WalletOnfido;
[ONYXKEYS.WALLET_ADDITIONAL_DETAILS]: OnyxTypes.WalletAdditionalDetails;
[ONYXKEYS.WALLET_TERMS]: OnyxTypes.WalletTerms;
[ONYXKEYS.BANK_ACCOUNT_LIST]: Record<string, OnyxTypes.BankAccount>;
[ONYXKEYS.FUND_LIST]: Record<string, OnyxTypes.Fund>;
[ONYXKEYS.BANK_ACCOUNT_LIST]: OnyxTypes.BankAccountList;
[ONYXKEYS.FUND_LIST]: OnyxTypes.FundList;
[ONYXKEYS.CARD_LIST]: Record<string, OnyxTypes.Card>;
[ONYXKEYS.WALLET_STATEMENT]: OnyxTypes.WalletStatement;
[ONYXKEYS.PERSONAL_BANK_ACCOUNT]: OnyxTypes.PersonalBankAccount;
Expand Down Expand Up @@ -440,7 +440,7 @@ type OnyxValues = {
[ONYXKEYS.COLLECTION.POLICY_DRAFTS]: OnyxTypes.Policy;
[ONYXKEYS.COLLECTION.POLICY_CATEGORIES]: OnyxTypes.PolicyCategory;
[ONYXKEYS.COLLECTION.POLICY_TAGS]: OnyxTypes.PolicyTags;
[ONYXKEYS.COLLECTION.POLICY_MEMBERS]: OnyxTypes.PolicyMember;
[ONYXKEYS.COLLECTION.POLICY_MEMBERS]: OnyxTypes.PolicyMembers;
[ONYXKEYS.COLLECTION.POLICY_MEMBERS_DRAFTS]: OnyxTypes.PolicyMember;
[ONYXKEYS.COLLECTION.POLICY_RECENTLY_USED_CATEGORIES]: OnyxTypes.RecentlyUsedCategories;
[ONYXKEYS.COLLECTION.DEPRECATED_POLICY_MEMBER_LIST]: OnyxTypes.PolicyMembers;
Expand Down
2 changes: 1 addition & 1 deletion src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ROUTES = {
VALIDATE_LOGIN: 'v/:accountID/:validateCode',
GET_ASSISTANCE: {
route: 'get-assistance/:taskID',
getRoute: (taskID: string) => `get-assistance/${taskID}` as const,
getRoute: (taskID: string, backTo: string) => getUrlWithBackToParam(`get-assistance/${taskID}`, backTo),
},
UNLINK_LOGIN: 'u/:accountID/:validateCode',
APPLE_SIGN_IN: 'sign-in-with-apple',
Expand Down
2 changes: 1 addition & 1 deletion src/components/AmountTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function AmountTextInput(props) {
blurOnSubmit={false}
selection={props.selection}
onSelectionChange={props.onSelectionChange}
role={CONST.ACCESSIBILITY_ROLE.TEXT}
role={CONST.ROLE.PRESENTATION}
onKeyPress={props.onKeyPress}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function BaseAnchorForAttachmentsOnly(props) {
onPressOut={props.onPressOut}
onLongPress={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))}
accessibilityLabel={fileName}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
>
<AttachmentView
source={sourceURLWithAuth}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ function BaseAnchorForCommentsOnly({onPressIn, onPressOut, href = '', rel = '',
}}
onPressIn={onPressIn}
onPressOut={onPressOut}
role={CONST.ACCESSIBILITY_ROLE.LINK}
role={CONST.ROLE.LINK}
accessibilityLabel={href}
>
<Tooltip text={href}>
<Text
ref={(el) => (linkRef = el)}
style={StyleSheet.flatten([style, defaultTextStyle])}
role={CONST.ACCESSIBILITY_ROLE.LINK}
role={CONST.ROLE.LINK}
hrefAttrs={{
rel,
target: isEmail || !linkProps.href ? '_self' : target,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function CarouselItem({item, isFocused, onPress}) {
<PressableWithoutFeedback
style={[styles.attachmentRevealButtonContainer]}
onPress={onPress}
role={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityLabel={item.file.name || translate('attachmentView.unknownFilename')}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function AttachmentViewImage({source, file, isAuthTokenRequired, loadComplete, o
onPress={onPress}
disabled={loadComplete}
style={[styles.flex1, styles.flexRow, styles.alignSelfStretch]}
role={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityLabel={file.name || translate('attachmentView.unknownFilename')}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function AttachmentViewImage({source, file, isAuthTokenRequired, isFocused, isUs
onPress={onPress}
disabled={loadComplete}
style={[styles.flex1, styles.flexRow, styles.alignSelfStretch]}
role={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityLabel={file.name || translate('attachmentView.unknownFilename')}
>
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/components/AvatarCropModal/AvatarCropModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ function AvatarCropModal(props) {
onLayout={initializeSliderContainer}
onPressIn={(e) => runOnUI(sliderOnPress)(e.nativeEvent.locationX)}
accessibilityLabel="slider"
role={CONST.ACCESSIBILITY_ROLE.ADJUSTABLE}
role={CONST.ROLE.SLIDER}
>
<Slider
sliderValue={translateSlider}
Expand Down
Loading

0 comments on commit 4900127

Please sign in to comment.