Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Aug 15, 2023
2 parents 050b41a + f246d83 commit 954eba4
Show file tree
Hide file tree
Showing 46 changed files with 733 additions and 361 deletions.
6 changes: 3 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001035301
versionName "1.3.53-1"
versionCode 1001035407
versionName "1.3.54-7"
}

flavorDimensions "default"
Expand Down Expand Up @@ -136,7 +136,7 @@ android {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
productFlavors.production.signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ platform :android do
upload_to_play_store(
package_name: "com.expensify.chat",
json_key: './android/app/android-fastlane-json-key.json',
aab: './android/app/build/outputs/bundle/release/app-release.aab',
aab: './android/app/build/outputs/bundle/productionRelease/app-production-release.aab',
track: 'internal',
rollout: '1.0'
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "New Expensify Dev.app"
BuildableName = "New Expensify.app"
BlueprintName = "NewExpensify"
ReferencedContainer = "container:NewExpensify.xcodeproj">
</BuildableReference>
Expand All @@ -31,7 +31,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "New Expensify Dev.app"
BuildableName = "New Expensify.app"
BlueprintName = "NewExpensify"
ReferencedContainer = "container:NewExpensify.xcodeproj">
</BuildableReference>
Expand All @@ -49,7 +49,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "New Expensify Dev.app"
BuildableName = "New Expensify.app"
BlueprintName = "NewExpensify"
ReferencedContainer = "container:NewExpensify.xcodeproj">
</BuildableReference>
Expand Down Expand Up @@ -89,7 +89,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "New Expensify Dev.app"
BuildableName = "New Expensify.app"
BlueprintName = "NewExpensify"
ReferencedContainer = "container:NewExpensify.xcodeproj">
</BuildableReference>
Expand All @@ -106,7 +106,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "New Expensify Dev.app"
BuildableName = "New Expensify.app"
BlueprintName = "NewExpensify"
ReferencedContainer = "container:NewExpensify.xcodeproj">
</BuildableReference>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.53</string>
<string>1.3.54</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.53.1</string>
<string>1.3.54.7</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.53</string>
<string>1.3.54</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.53.1</string>
<string>1.3.54.7</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.3.53-1",
"version": "1.3.54-7",
"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
3 changes: 3 additions & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ const CONST = {
TASKEDITED: 'TASKEDITED',
TASKCANCELLED: 'TASKCANCELLED',
IOU: 'IOU',
MODIFIEDEXPENSE: 'MODIFIEDEXPENSE',
REIMBURSEMENTQUEUED: 'REIMBURSEMENTQUEUED',
RENAMED: 'RENAMED',
CHRONOSOOOLIST: 'CHRONOSOOOLIST',
Expand Down Expand Up @@ -1257,8 +1258,10 @@ const CONST = {
},
EDIT_REQUEST_FIELD: {
AMOUNT: 'amount',
CURRENCY: 'currency',
DATE: 'date',
DESCRIPTION: 'description',
MERCHANT: 'merchant',
},
FOOTER: {
EXPENSE_MANAGEMENT_URL: `${USE_EXPENSIFY_URL}/expense-management`,
Expand Down
2 changes: 2 additions & 0 deletions src/ONYXKEYS.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ export default {
NEW_TASK_FORM: 'newTaskForm',
EDIT_TASK_FORM: 'editTaskForm',
MONEY_REQUEST_DESCRIPTION_FORM: 'moneyRequestDescriptionForm',
MONEY_REQUEST_AMOUNT_FORM: 'moneyRequestAmountForm',
MONEY_REQUEST_CREATED_FORM: 'moneyRequestCreatedForm',
NEW_CONTACT_METHOD_FORM: 'newContactMethodForm',
PAYPAL_FORM: 'payPalForm',
SETTINGS_STATUS_SET_FORM: 'settingsStatusSetForm',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ function BaseAnchorForCommentsOnly({onPressIn, onPressOut, href = '', rel = '',
event.preventDefault();
linkProps.onPress();
}}
suppressHighlighting
// Add testID so it gets selected as an anchor tag by SelectionScraper
testID="a"
// eslint-disable-next-line react/jsx-props-no-spreading
Expand Down
1 change: 1 addition & 0 deletions src/components/Banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ function Banner(props) {
<Text
style={[...props.textStyles]}
onPress={props.onPress}
suppressHighlighting
>
{props.text}
</Text>
Expand Down
24 changes: 16 additions & 8 deletions src/components/CurrencySymbolButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import PropTypes from 'prop-types';
import Text from './Text';
import styles from '../styles/styles';
import Tooltip from './Tooltip';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import CONST from '../CONST';
import useLocalize from '../hooks/useLocalize';

const propTypes = {
/** Currency symbol of selected currency */
Expand All @@ -14,24 +14,32 @@ const propTypes = {
/** Function to call when currency button is pressed */
onCurrencyButtonPress: PropTypes.func.isRequired,

...withLocalizePropTypes,
/** Flag to indicate if the button should be disabled */
disabled: PropTypes.bool,
};

function CurrencySymbolButton(props) {
const defaultProps = {
disabled: false,
};

function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol, disabled}) {
const {translate} = useLocalize();
return (
<Tooltip text={props.translate('iOUCurrencySelection.selectCurrency')}>
<Tooltip text={translate('iOUCurrencySelection.selectCurrency')}>
<PressableWithoutFeedback
onPress={props.onCurrencyButtonPress}
accessibilityLabel={props.translate('iOUCurrencySelection.selectCurrency')}
onPress={onCurrencyButtonPress}
accessibilityLabel={translate('iOUCurrencySelection.selectCurrency')}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON}
disabled={disabled}
>
<Text style={styles.iouAmountText}>{props.currencySymbol}</Text>
<Text style={styles.iouAmountText}>{currencySymbol}</Text>
</PressableWithoutFeedback>
</Tooltip>
);
}

CurrencySymbolButton.propTypes = propTypes;
CurrencySymbolButton.displayName = 'CurrencySymbolButton';
CurrencySymbolButton.defaultProps = defaultProps;

export default withLocalize(CurrencySymbolButton);
export default CurrencySymbolButton;
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function AnchorRenderer(props) {
<Text
style={styles.link}
onPress={navigateToLink}
suppressHighlighting
>
<TNodeChildrenRenderer tnode={props.tnode} />
</Text>
Expand Down
29 changes: 24 additions & 5 deletions src/components/MagicCodeInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,35 @@ function MagicCodeInput(props) {
},
}));

const validateAndSubmit = () => {
const numbers = decomposeString(props.value, props.maxLength);
/**
* Validate the entered code and submit
*
* @param {String} value
*/
const validateAndSubmit = (value) => {
const numbers = decomposeString(value, props.maxLength);
if (!props.shouldSubmitOnComplete || _.filter(numbers, (n) => ValidationUtils.isNumeric(n)).length !== props.maxLength || props.network.isOffline) {
return;
}
// Blurs the input and removes focus from the last input and, if it should submit
// on complete, it will call the onFulfill callback.
blurMagicCodeInput();
props.onFulfill(props.value);
props.onFulfill(value);
};

useNetwork({onReconnect: validateAndSubmit});
useNetwork({onReconnect: () => validateAndSubmit(props.value)});

useEffect(() => {
validateAndSubmit();
if (!props.hasError) {
return;
}

// Focus the last input if an error occurred to allow for corrections
inputRefs.current[props.maxLength - 1].focus();
}, [props.hasError, props.maxLength]);

useEffect(() => {
validateAndSubmit(props.value);

// We have not added:
// + the editIndex as the dependency because we don't want to run this logic after focusing on an input to edit it after the user has completed the code.
Expand Down Expand Up @@ -179,6 +193,11 @@ function MagicCodeInput(props) {

const finalInput = composeToString(numbers);
props.onChangeText(finalInput);

// If the same number is pressed, we cannot depend on props.value in useEffect for re-submitting
if (props.value === finalInput) {
validateAndSubmit(finalInput);
}
};

/**
Expand Down
Loading

0 comments on commit 954eba4

Please sign in to comment.