Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Expensify/App into beaman-migrateAc…
Browse files Browse the repository at this point in the history
…torEmail
  • Loading branch information
Beamanator committed Jul 4, 2023
2 parents d1b3e65 + c38a336 commit 0a557bc
Show file tree
Hide file tree
Showing 63 changed files with 1,369 additions and 1,276 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001033505
versionName "1.3.35-5"
versionCode 1001033603
versionName "1.3.36-3"
}

splits {
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.35</string>
<string>1.3.36</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.35.5</string>
<string>1.3.36.3</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.35</string>
<string>1.3.36</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.35.5</string>
<string>1.3.36.3</string>
</dict>
</plist>
18 changes: 9 additions & 9 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.3.35-5",
"version": "1.3.36-3",
"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 @@ -106,7 +106,7 @@
"react-native-fast-image": "^8.6.3",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "2.9.0",
"react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#6f436a06a3018cb49750bb110b89df75f6a865d5",
"react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#ee87343c3e827ff7818abc71b6bb04fcc1f120e0",
"react-native-haptic-feedback": "^1.13.0",
"react-native-image-pan-zoom": "^2.1.12",
"react-native-image-picker": "^5.1.0",
Expand Down
4 changes: 1 addition & 3 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ const CONST = {
},
},
TIMING: {
CALCULATE_MOST_RECENT_LAST_MODIFIED_ACTION: 'calc_most_recent_last_modified_action',
SEARCH_RENDER: 'search_render',
HOMEPAGE_INITIAL_RENDER: 'homepage_initial_render',
REPORT_INITIAL_RENDER: 'report_initial_render',
Expand Down Expand Up @@ -724,9 +725,6 @@ const CONST = {
MAX_RETRY_WAIT_TIME_MS: 10 * 1000,
PROCESS_REQUEST_DELAY_MS: 1000,
MAX_PENDING_TIME_MS: 10 * 1000,
COMMAND: {
RECONNECT_APP: 'ReconnectApp',
},
},
DEFAULT_TIME_ZONE: {automatic: true, selected: 'America/Los_Angeles'},
DEFAULT_ACCOUNT_DATA: {errors: null, success: '', isLoading: false},
Expand Down
12 changes: 10 additions & 2 deletions src/components/AddressSearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function AddressSearch(props) {
postal_code: zipCode,
administrative_area_level_1: state,
administrative_area_level_2: stateFallback,
country,
country: countryPrimary,
} = GooglePlacesUtils.getAddressComponents(addressComponents, {
street_number: 'long_name',
route: 'long_name',
Expand All @@ -142,7 +142,15 @@ function AddressSearch(props) {

// Make sure that the order of keys remains such that the country is always set above the state.
// Refer to https://github.com/Expensify/App/issues/15633 for more information.
const {state: stateAutoCompleteFallback = '', city: cityAutocompleteFallback = ''} = GooglePlacesUtils.getPlaceAutocompleteTerms(autocompleteData.terms);
const {
country: countryFallbackLongName = '',
state: stateAutoCompleteFallback = '',
city: cityAutocompleteFallback = '',
} = GooglePlacesUtils.getPlaceAutocompleteTerms(autocompleteData.terms);

const countryFallback = _.findKey(CONST.ALL_COUNTRIES, (country) => country === countryFallbackLongName);

const country = countryPrimary || countryFallback;

const values = {
street: `${streetNumber} ${streetName}`.trim(),
Expand Down
19 changes: 12 additions & 7 deletions src/components/Avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ function Avatar(props) {
const isWorkspace = props.type === CONST.ICON_TYPE_WORKSPACE;
const iconSize = StyleUtils.getAvatarSize(props.size);

const imageStyle = props.imageStyles ? [StyleUtils.getAvatarStyle(props.size), ...props.imageStyles, StyleUtils.getAvatarBorderRadius(props.size, props.type)] : undefined;
const imageStyle =
props.imageStyles && props.imageStyles.length
? [StyleUtils.getAvatarStyle(props.size), ...props.imageStyles, StyleUtils.getAvatarBorderRadius(props.size, props.type)]
: [StyleUtils.getAvatarStyle(props.size), styles.noBorderRadius];

const iconStyle = props.imageStyles ? [StyleUtils.getAvatarStyle(props.size), styles.bgTransparent, ...props.imageStyles] : undefined;
const iconStyle = props.imageStyles && props.imageStyles.length ? [StyleUtils.getAvatarStyle(props.size), styles.bgTransparent, ...props.imageStyles] : undefined;

const iconFillColor = isWorkspace ? StyleUtils.getDefaultWorkspaceAvatarColor(props.name).fill : props.fill;
const fallbackAvatar = isWorkspace ? ReportUtils.getDefaultWorkspaceAvatar(props.name) : props.fallbackIcon;
Expand All @@ -101,11 +104,13 @@ function Avatar(props) {
/>
</View>
) : (
<Image
source={{uri: props.source}}
style={imageStyle}
onError={() => setImageError(true)}
/>
<View style={[iconStyle, StyleUtils.getAvatarBorderStyle(props.size, props.type), ...props.iconAdditionalStyles]}>
<Image
source={{uri: props.source}}
style={imageStyle}
onError={() => setImageError(true)}
/>
</View>
)}
</View>
);
Expand Down
20 changes: 20 additions & 0 deletions src/components/AvatarWithDisplayName.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import compose from '../libs/compose';
import * as OptionsListUtils from '../libs/OptionsListUtils';
import Text from './Text';
import * as StyleUtils from '../styles/StyleUtils';
import Navigation from '../libs/Navigation/Navigation';
import ROUTES from '../ROUTES';
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';

const propTypes = {
/** The report currently being looked at */
Expand Down Expand Up @@ -52,6 +55,7 @@ const defaultProps = {
function AvatarWithDisplayName(props) {
const title = props.isAnonymous ? props.report.displayName : ReportUtils.getDisplayNameForParticipant(props.report.ownerAccountID, true);
const subtitle = ReportUtils.getChatRoomSubtitle(props.report);
const parentNavigationSubtitle = ReportUtils.getParentNavigationSubtitle(props.report);
const isExpenseReport = ReportUtils.isExpenseReport(props.report);
const icons = ReportUtils.getIcons(props.report, props.personalDetails, props.policies);
const ownerPersonalDetails = OptionsListUtils.getPersonalDetailsForAccountIDs([props.report.ownerAccountID], props.personalDetails);
Expand Down Expand Up @@ -88,6 +92,22 @@ function AvatarWithDisplayName(props) {
textStyles={[props.isAnonymous ? styles.headerAnonymousFooter : styles.headerText, styles.pre]}
shouldUseFullTitle={isExpenseReport || props.isAnonymous}
/>
{!_.isEmpty(parentNavigationSubtitle) && (
<PressableWithoutFeedback
onPress={() => {
Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID));
}}
accessibilityLabel={subtitle}
accessibilityRole="link"
>
<Text
style={[styles.optionAlternateText, styles.textLabelSupporting, styles.link]}
numberOfLines={1}
>
{parentNavigationSubtitle}
</Text>
</PressableWithoutFeedback>
)}
{!_.isEmpty(subtitle) && (
<Text
style={[styles.sidebarLinkText, styles.optionAlternateText, styles.textLabelSupporting, styles.pre]}
Expand Down
6 changes: 1 addition & 5 deletions src/components/HeaderWithBackButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ const propTypes = {
/** Whether we should show an avatar */
shouldShowAvatarWithDisplay: PropTypes.bool,

/** Parent report, if provided it will override props.report for AvatarWithDisplay */
parentReport: iouReportPropTypes,

/** Report, if we're showing the details for one and using AvatarWithDisplay */
report: iouReportPropTypes,

Expand Down Expand Up @@ -133,7 +130,6 @@ const defaultProps = {
shouldShowBackButton: true,
shouldShowAvatarWithDisplay: false,
report: null,
parentReport: null,
policies: {},
personalDetails: {},
guidesCallTaskID: '',
Expand Down Expand Up @@ -192,7 +188,7 @@ class HeaderWithBackButton extends Component {
)}
{this.props.shouldShowAvatarWithDisplay && (
<AvatarWithDisplayName
report={this.props.parentReport || this.props.report}
report={this.props.report}
policies={this.props.policies}
personalDetails={this.props.personalDetails}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/KYCWall/BaseKYCWall.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class KYCWall extends React.Component {
}

return {
anchorPositionVertical: domRect.top - 150,
anchorPositionVertical: domRect.top - 8,
anchorPositionHorizontal: domRect.left,
};
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function MenuItem(props) {
props.icon && !_.isArray(props.icon) ? styles.ml3 : undefined,
props.shouldShowBasicTitle ? undefined : styles.textStrong,
props.shouldShowHeaderTitle ? styles.textHeadlineH1 : undefined,
props.interactive && props.disabled ? {...styles.disabledText, ...styles.userSelectNone} : undefined,
props.interactive && props.disabled ? {...styles.userSelectNone} : undefined,
styles.pre,
styles.ltr,
isDeleted ? styles.offlineFeedback.deleted : undefined,
Expand Down Expand Up @@ -119,6 +119,7 @@ function MenuItem(props) {
StyleUtils.getButtonBackgroundColorStyle(getButtonState(props.focused || hovered, pressed, props.success, props.disabled, props.interactive), true),
(hovered || pressed) && props.hoverAndPressStyle,
...(_.isArray(props.wrapperStyle) ? props.wrapperStyle : [props.wrapperStyle]),
props.disabled && styles.buttonOpacityDisabled,
]}
disabled={props.disabled}
ref={props.forwardedRef}
Expand Down
8 changes: 6 additions & 2 deletions src/components/MoneyRequestHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ function MoneyRequestHeader(props) {
const shouldShowSettlementButton = !isSettled && !props.isSingleTransactionView && isPayer;
const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport);
const shouldShowPaypal = Boolean(lodashGet(props.personalDetails, [moneyRequestReport.managerID, 'payPalMeAddress']));
const report = props.report;
if (props.isSingleTransactionView) {
report.ownerAccountID = lodashGet(props, ['parentReport', 'ownerAccountID'], null);
report.ownerEmail = lodashGet(props, ['parentReport', 'ownerEmail'], '');
}
return (
<View style={[{backgroundColor: themeColors.highlightBG}, styles.pl0]}>
<HeaderWithBackButton
Expand All @@ -104,8 +109,7 @@ function MoneyRequestHeader(props) {
},
]}
threeDotsAnchorPosition={styles.threeDotsPopoverOffsetNoCloseButton(props.windowWidth)}
report={props.report}
parentReport={moneyRequestReport}
report={report}
policies={props.policies}
personalDetails={props.personalDetails}
shouldShowBackButton={props.isSmallScreenWidth}
Expand Down
4 changes: 2 additions & 2 deletions src/components/OnyxProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const [withPersonalDetails, PersonalDetailsProvider] = createOnyxContext(ONYXKEY
const [withCurrentDate, CurrentDateProvider] = createOnyxContext(ONYXKEYS.CURRENT_DATE);
const [withReportActionsDrafts, ReportActionsDraftsProvider] = createOnyxContext(ONYXKEYS.COLLECTION.REPORT_ACTIONS_DRAFTS);
const [withBlockedFromConcierge, BlockedFromConciergeProvider] = createOnyxContext(ONYXKEYS.NVP_BLOCKED_FROM_CONCIERGE);
const [withBetas, BetasProvider] = createOnyxContext(ONYXKEYS.BETAS);
const [withBetas, BetasProvider, BetasContext] = createOnyxContext(ONYXKEYS.BETAS);
const [withReportCommentDrafts, ReportCommentDraftsProvider] = createOnyxContext(ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT);

const propTypes = {
Expand Down Expand Up @@ -42,4 +42,4 @@ OnyxProvider.propTypes = propTypes;

export default OnyxProvider;

export {withNetwork, withPersonalDetails, withReportActionsDrafts, withCurrentDate, withBlockedFromConcierge, withBetas, NetworkContext, withReportCommentDrafts};
export {withNetwork, withPersonalDetails, withReportActionsDrafts, withCurrentDate, withBlockedFromConcierge, withBetas, NetworkContext, BetasContext, withReportCommentDrafts};
1 change: 0 additions & 1 deletion src/components/SubscriptAvatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ function SubscriptAvatar(props) {
<Tooltip text={props.secondaryTooltip}>
<View>
<Avatar
imageStyles={null}
containerStyles={[props.size === CONST.AVATAR_SIZE.SMALL ? styles.secondAvatarSubscriptCompact : styles.secondAvatarSubscript]}
iconAdditionalStyles={[
StyleUtils.getAvatarBorderWidth(props.size === CONST.AVATAR_SIZE.SMALL ? CONST.AVATAR_SIZE.SMALL_SUBSCRIPT : CONST.AVATAR_SIZE.SUBSCRIPT),
Expand Down
Loading

0 comments on commit 0a557bc

Please sign in to comment.