Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Expensify/App into feat/#Ex…
Browse files Browse the repository at this point in the history
…pensify#23132-display-status-lhn
  • Loading branch information
perunt committed Aug 15, 2023
2 parents d875895 + 70c5259 commit 049fdf1
Show file tree
Hide file tree
Showing 32 changed files with 209 additions and 77 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 1001035302
versionName "1.3.53-2"
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
23 changes: 0 additions & 23 deletions assets/images/lounge-access.svg

This file was deleted.

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.2</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.2</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-2",
"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: 2 additions & 1 deletion src/components/CountryPicker/CountrySelectorModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Modal from '../Modal';
import ScreenWrapper from '../ScreenWrapper';
import styles from '../../styles/styles';
import searchCountryOptions from '../../libs/searchCountryOptions';
import StringUtils from '../../libs/StringUtils';

const propTypes = {
/** Whether the modal is visible */
Expand Down Expand Up @@ -46,7 +47,7 @@ function CountrySelectorModal({currentCountry, isVisible, onClose, onCountrySele
keyForList: countryISO,
text: countryName,
isSelected: currentCountry === countryISO,
searchValue: `${countryISO}${countryName}`.toLowerCase().replaceAll(CONST.REGEX.NON_ALPHABETIC_AND_NON_LATIN_CHARS, ''),
searchValue: StringUtils.sanitizeString(`${countryISO}${countryName}`),
})),
[translate, currentCountry],
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/CurrencySymbolButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const defaultProps = {
function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol, disabled}) {
const {translate} = useLocalize();
return (
<Tooltip text={translate('iOUCurrencySelection.selectCurrency')}>
<Tooltip text={!disabled && translate('iOUCurrencySelection.selectCurrency')}>
<PressableWithoutFeedback
onPress={onCurrencyButtonPress}
accessibilityLabel={translate('iOUCurrencySelection.selectCurrency')}
accessibilityLabel={!disabled && translate('iOUCurrencySelection.selectCurrency')}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON}
disabled={disabled}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Icon/Expensicons.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import Link from '../../../assets/images/link.svg';
import LinkCopy from '../../../assets/images/link-copy.svg';
import Location from '../../../assets/images/location.svg';
import Lock from '../../../assets/images/lock.svg';
import LoungeAccess from '../../../assets/images/lounge-access.svg';
import LoungeAccess from './svgs/LoungeAccessIcon';
import Luggage from '../../../assets/images/luggage.svg';
import MagnifyingGlass from '../../../assets/images/magnifying-glass.svg';
import Mail from '../../../assets/images/mail.svg';
Expand Down
14 changes: 13 additions & 1 deletion src/components/Icon/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, {PureComponent} from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import styles from '../../styles/styles';
import themeColors from '../../styles/themes/default';
import variables from '../../styles/variables';
import styles from '../../styles/styles';
import * as StyleUtils from '../../styles/StyleUtils';
import IconWrapperStyles from './IconWrapperStyles';

Expand All @@ -26,6 +26,12 @@ const propTypes = {
/** Is inline icon */
inline: PropTypes.bool,

/** Is icon hovered */
hovered: PropTypes.bool,

/** Is icon pressed */
pressed: PropTypes.bool,

// eslint-disable-next-line react/forbid-prop-types
additionalStyles: PropTypes.arrayOf(PropTypes.object),
};
Expand All @@ -37,6 +43,8 @@ const defaultProps = {
small: false,
inline: false,
additionalStyles: [],
hovered: false,
pressed: false,
};

// We must use a class component to create an animatable component with the Animated API
Expand All @@ -58,6 +66,8 @@ class Icon extends PureComponent {
width={width}
height={height}
fill={this.props.fill}
hovered={this.props.hovered.toString()}
pressed={this.props.pressed.toString()}
/>
</View>
</View>
Expand All @@ -73,6 +83,8 @@ class Icon extends PureComponent {
width={width}
height={height}
fill={this.props.fill}
hovered={this.props.hovered.toString()}
pressed={this.props.pressed.toString()}
/>
</View>
);
Expand Down
70 changes: 70 additions & 0 deletions src/components/Icon/svgs/LoungeAccessIcon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import * as React from 'react';
import Svg, {G, Path, Polygon} from 'react-native-svg';
import PropTypes from 'prop-types';
import themeColors from '../../../styles/themes/default';

const propTypes = {
/** The fill color for the icon. Can be hex, rgb, rgba, or valid react-native named color such as 'red' or 'blue'. */
fill: PropTypes.string,

/** Is icon hovered */
hovered: PropTypes.string,

/** Is icon pressed */
pressed: PropTypes.string,
};

const defaultProps = {
fill: themeColors.icon,
hovered: 'false',
pressed: 'false',
};

function LoungeAccessIcon(props) {
return (
<Svg
id="Layer_1"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
viewBox="0 0 40 40"
style={{
enableBackground: 'new 0 0 40 40',
}}
xmlSpace="preserve"
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
>
<G>
<Path
className="st0"
d="M11,24v-2c0-1.1,0.9-2,2-2s2,0.9,2,2c0,0.6,0.4,1,1,1h8c0.6,0,1-0.4,1-1c0-1.1,0.9-2,2-2s2,0.9,2,2v2 c0,0.4-0.1,0.8-0.3,1.1C28.1,26,27,26.9,27,28h-2v-2H15v2h-2c0-1.1-1.1-2-1.7-2.9C11.1,24.8,11,24.4,11,24z"
/>
</G>
<G>
<Path
fill={props.hovered === 'true' || props.pressed === 'true' ? props.fill : themeColors.starDefaultBG}
className="st1"
d="M31,9.8c-0.1-0.2-0.2-0.4-0.5-0.4h-2.1l-0.8-2C27.4,7,27.1,7,27,7c-0.1,0-0.4,0-0.6,0.4l-0.8,1.9h-2.1 c-0.4,0-0.5,0.4-0.5,0.4c0,0.1-0.1,0.4,0.1,0.6l1.6,1.8l-0.6,1.9c-0.1,0.3,0.1,0.5,0.2,0.7c0.1,0,0.3,0.2,0.7,0.1l2-1.1l2,1.2 c0.3,0.2,0.6,0,0.7-0.1c0.1-0.1,0.3-0.3,0.2-0.7l-0.6-2l1.5-1.7C31,10.3,31,10,31,9.8z"
/>
<Polygon
className="st1"
points="28.5,7 28.5,7 28.5,7 "
/>
</G>
<G>
<Path
className="st0"
d="M23.1,16.3c-0.8-0.6-1.2-1.7-1-2.7l0-0.1l0.2-0.5H16c-1.1,0-2,0.9-2,2v3h0.6c1.3,0,2.4,1.1,2.4,2.4 c0,0.3,0.3,0.6,0.6,0.6h4.8c0.3,0,0.6-0.3,0.6-0.6c0-1.3,1.1-2.4,2.4-2.4H26v-1.4C25.1,17.1,24,17,23.1,16.3z"
/>
</G>
</Svg>
);
}

LoungeAccessIcon.displayName = 'LoungeAccessIcon';
LoungeAccessIcon.propTypes = propTypes;
LoungeAccessIcon.defaultProps = defaultProps;

export default LoungeAccessIcon;
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
2 changes: 2 additions & 0 deletions src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ const MenuItem = React.forwardRef((props, ref) => {
<View style={[styles.popoverMenuIcon, ...props.iconStyles, StyleUtils.getAvatarWidthStyle(props.avatarSize)]}>
{props.iconType === CONST.ICON_TYPE_ICON && (
<Icon
hovered={isHovered}
pressed={pressed}
src={props.icon}
width={props.iconWidth}
height={props.iconHeight}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/TaskPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import personalDetailsPropType from '../../pages/personalDetailsPropType';

const propTypes = {
/** All personal details asssociated with user */
personalDetailsList: personalDetailsPropType,
personalDetailsList: PropTypes.objectOf(personalDetailsPropType),

/** The ID of the associated taskReport */
taskReportID: PropTypes.string.isRequired,
Expand Down
Loading

0 comments on commit 049fdf1

Please sign in to comment.