Skip to content

Commit

Permalink
Merge pull request #9068 from Expensify/update-staging-from-main
Browse files Browse the repository at this point in the history
Update version to 1.1.63-0 on staging
  • Loading branch information
OSBotify authored May 18, 2022
2 parents 7b43fa4 + aa24478 commit 4ecf59b
Show file tree
Hide file tree
Showing 35 changed files with 178 additions and 66 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001016200
versionName "1.1.62-0"
versionCode 1001016300
versionName "1.1.63-0"
}
splits {
abi {
Expand Down
25 changes: 25 additions & 0 deletions assets/images/avatars/fallback-avatar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions assets/images/avatars/fallback-workspace-avatar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.62</string>
<string>1.1.63</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.62.0</string>
<string>1.1.63.0</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.1.62</string>
<string>1.1.63</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.62.0</string>
<string>1.1.63.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion 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.1.62-0",
"version": "1.1.63-0",
"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
30 changes: 25 additions & 5 deletions src/components/Avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Icon from './Icon';
import themeColors from '../styles/themes/default';
import CONST from '../CONST';
import * as StyleUtils from '../styles/StyleUtils';
import * as Expensicons from './Icon/Expensicons';

const propTypes = {
/** Source for the avatar. Can be a URL or an icon. */
Expand All @@ -23,6 +24,9 @@ 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,

/** A fallback avatar icon to display when there is an error on loading avatar from remote URL. */
fallbackIcon: PropTypes.func,
};

const defaultProps = {
Expand All @@ -31,9 +35,17 @@ const defaultProps = {
containerStyles: [],
size: CONST.AVATAR_SIZE.DEFAULT,
fill: themeColors.icon,
fallbackIcon: Expensicons.FallbackAvatar,
};

class Avatar extends PureComponent {
constructor(props) {
super(props);
this.state = {
imageError: false,
};
}

render() {
if (!this.props.source) {
return null;
Expand All @@ -45,13 +57,21 @@ class Avatar extends PureComponent {
];

const iconSize = StyleUtils.getAvatarSize(this.props.size);

return (
<View pointerEvents="none" style={this.props.containerStyles}>
{
_.isFunction(this.props.source)
? <Icon src={this.props.source} fill={this.props.fill} height={iconSize} width={iconSize} />
: <Image source={{uri: this.props.source}} style={imageStyle} />
}
{_.isFunction(this.props.source) || this.state.imageError
? (
<Icon
src={this.state.imageError ? this.props.fallbackIcon : this.props.source}
height={iconSize}
width={iconSize}
fill={this.state.imageError ? themeColors.offline : this.props.fill}
/>
)
: (
<Image source={{uri: this.props.source}} style={imageStyle} onError={() => this.setState({imageError: true})} />
)}
</View>
);
}
Expand Down
6 changes: 6 additions & 0 deletions src/components/AvatarWithImagePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const propTypes = {
/** Size of Indicator */
size: PropTypes.oneOf([CONST.AVATAR_SIZE.LARGE, CONST.AVATAR_SIZE.DEFAULT]),

/** A fallback avatar icon to display when there is an error on loading avatar from remote URL. */
fallbackIcon: PropTypes.func,

...withLocalizePropTypes,
};

Expand All @@ -65,6 +68,7 @@ const defaultProps = {
isUsingDefaultAvatar: false,
isUploading: false,
size: CONST.AVATAR_SIZE.DEFAULT,
fallbackIcon: Expensicons.FallbackAvatar,
};

class AvatarWithImagePicker extends React.Component {
Expand Down Expand Up @@ -181,6 +185,8 @@ class AvatarWithImagePicker extends React.Component {
containerStyles={styles.avatarLarge}
imageStyles={[styles.avatarLarge, styles.alignSelfCenter]}
source={this.props.avatarURL}
fallbackIcon={this.props.fallbackIcon}
size={this.props.size}
/>
)
: (
Expand Down
1 change: 1 addition & 0 deletions src/components/AvatarWithIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class AvatarWithIndicator extends PureComponent {
<Avatar
imageStyles={[this.props.size === 'large' ? styles.avatarLarge : null]}
source={this.props.source}
size={this.props.size}
/>
</Tooltip>
<Tooltip text={this.userStatus()} absolute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const BaseHTMLEngineProvider = (props) => {
baseStyle={styles.webViewStyles.baseFontStyle}
tagsStyles={styles.webViewStyles.tagStyles}
enableCSSInlineProcessing={false}
dangerouslyDisableWhitespaceCollapsing
systemFonts={_.values(fontFamily)}
>
<RenderHTMLConfigProvider
Expand Down
8 changes: 5 additions & 3 deletions src/components/IOUConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ const propTypes = {
phoneNumber: PropTypes.string,
})).isRequired,

/** Whether this is an IOU split and belongs to a group report */
isGroupSplit: PropTypes.bool.isRequired,
/** Is this IOU associated with existing report */
isIOUAttachedToExistingChatReport: PropTypes.bool.isRequired,

...windowDimensionsPropTypes,

Expand Down Expand Up @@ -225,6 +225,7 @@ class IOUConfirmationList extends Component {
data: [formattedMyPersonalDetails],
shouldShow: true,
indexOffset: 0,
isDisabled: true,
}, {
title: this.props.translate('iOUConfirmationList.whoWasThere'),
data: formattedSelectedParticipants,
Expand Down Expand Up @@ -350,6 +351,7 @@ class IOUConfirmationList extends Component {
const shouldDisableButton = selectedParticipants.length === 0 || this.props.network.isOffline;
const isLoading = this.props.iou.loading && !this.props.network.isOffline;
const recipient = this.state.participants[0];
const canModifyParticipants = this.props.isIOUAttachedToExistingChatReport && this.props.hasMultipleParticipants;
return (
<>
<ScrollView style={[styles.flexGrow0, styles.flexShrink1, styles.flexBasisAuto, styles.w100]}>
Expand All @@ -362,7 +364,7 @@ class IOUConfirmationList extends Component {
canSelectMultipleOptions={this.props.hasMultipleParticipants}
selectedOptions={this.getSelectedOptions()}
onSelectRow={toggleOption}
isDisabled={!this.props.isGroupSplit}
isDisabled={!canModifyParticipants}
optionHoveredStyle={hoverStyle}
/>
</ScrollView>
Expand Down
4 changes: 4 additions & 0 deletions src/components/Icon/Expensicons.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ import AdminRoomAvatar from '../../../assets/images/avatars/admin-room.svg';
import AnnounceRoomAvatar from '../../../assets/images/avatars/announce-room.svg';
import Connect from '../../../assets/images/connect.svg';
import DomainRoomAvatar from '../../../assets/images/avatars/domain-room.svg';
import FallbackAvatar from '../../../assets/images/avatars/fallback-avatar.svg';
import FallbackWorkspaceAvatar from '../../../assets/images/avatars/fallback-workspace-avatar.svg';

export {
ActiveRoomAvatar,
Expand Down Expand Up @@ -112,6 +114,8 @@ export {
Eye,
EyeDisabled,
ExpensifyCard,
FallbackAvatar,
FallbackWorkspaceAvatar,
Gallery,
Gear,
Hashtag,
Expand Down
9 changes: 8 additions & 1 deletion src/components/ImageView/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class ImageView extends PureComponent {
imageWidth: undefined,
imageHeight: undefined,
interactionPromise: undefined,
containerHeight: undefined,
};

// Use the default double click interval from the ImageZoom library
Expand Down Expand Up @@ -72,7 +73,7 @@ class ImageView extends PureComponent {
let imageWidth = width;
let imageHeight = height;
const containerWidth = Math.round(this.props.windowWidth);
const containerHeight = Math.round(this.props.windowHeight - variables.contentHeaderHeight);
const containerHeight = Math.round(this.state.containerHeight);

const aspectRatio = Math.min(containerHeight / imageHeight, containerWidth / imageWidth);

Expand Down Expand Up @@ -134,6 +135,12 @@ class ImageView extends PureComponent {
styles.overflowHidden,
styles.errorOutline,
]}
onLayout={(event) => {
const layout = event.nativeEvent.layout;
this.setState({
containerHeight: layout.height,
});
}}
>
<Image
source={{uri: this.props.url}}
Expand Down
2 changes: 2 additions & 0 deletions src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const defaultProps = {
iconType: 'icon',
onPress: () => {},
interactive: true,
fallbackIcon: Expensicons.FallbackAvatar,
};

const MenuItem = props => (
Expand Down Expand Up @@ -87,6 +88,7 @@ const MenuItem = props => (
<Avatar
imageStyles={[styles.avatarNormal, styles.alignSelfCenter]}
source={props.icon}
fallbackIcon={props.fallbackIcon}
/>
</View>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/BaseModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import styles from '../../styles/styles';
import * as StyleUtils from '../../styles/StyleUtils';
import themeColors from '../../styles/themes/default';
import {propTypes as modalPropTypes, defaultProps as modalDefaultProps} from './modalPropTypes';
import getModalStyles from '../../styles/getModalStyles';
import * as Modal from '../../libs/actions/Modal';
import getModalStyles from '../../styles/getModalStyles';

const propTypes = {
...modalPropTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/components/OptionsList/BaseOptionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class BaseOptionsList extends Component {
showSelectedState={this.props.canSelectMultipleOptions}
hideAdditionalOptionStates={this.props.hideAdditionalOptionStates}
forceTextUnreadStyle={this.props.forceTextUnreadStyle}
isDisabled={this.props.isDisabled}
isDisabled={this.props.isDisabled || section.isDisabled}
/>
);
}
Expand Down
3 changes: 3 additions & 0 deletions src/components/OptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ const propTypes = {

/** Whether this section should show or not */
shouldShow: PropTypes.bool,

/** Whether this section items disabled for selection */
isDisabled: PropTypes.bool,
})).isRequired,

/** Value in the search input field */
Expand Down
17 changes: 12 additions & 5 deletions src/components/ReportWelcomeText.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import compose from '../libs/compose';
import * as ReportUtils from '../libs/ReportUtils';
import * as OptionsListUtils from '../libs/OptionsListUtils';
import ONYXKEYS from '../ONYXKEYS';
import Navigation from '../libs/Navigation/Navigation';
import ROUTES from '../ROUTES';
import Tooltip from './Tooltip';

const personalDetailsPropTypes = PropTypes.shape({
/** The login of the person (either email or phone number) */
Expand Down Expand Up @@ -85,7 +88,7 @@ const ReportWelcomeText = (props) => {
<Text style={styles.textAlignCenter}>
{roomWelcomeMessage.phrase1}
</Text>
<Text style={[styles.textStrong]}>
<Text style={[styles.textStrong]} onPress={() => Navigation.navigate(ROUTES.getReportDetailsRoute(props.report.reportID))}>
{props.report.reportName}
</Text>
<Text>
Expand All @@ -99,11 +102,15 @@ const ReportWelcomeText = (props) => {
<Text style={styles.textAlignCenter}>
{props.translate('reportActionsView.beginningOfChatHistory')}
</Text>
{_.map(displayNamesWithTooltips, ({displayName, pronouns}, index) => (
{_.map(displayNamesWithTooltips, ({
displayName, pronouns, tooltip,
}, index) => (
<Text key={displayName}>
<Text style={[styles.textStrong]}>
{displayName}
</Text>
<Tooltip text={tooltip}>
<Text style={[styles.textStrong]} onPress={() => Navigation.navigate(ROUTES.getDetailsRoute(participants[index]))}>
{displayName}
</Text>
</Tooltip>
{!_.isEmpty(pronouns) && <Text>{` (${pronouns})`}</Text>}
{(index === displayNamesWithTooltips.length - 1) && <Text>.</Text>}
{(index === displayNamesWithTooltips.length - 2) && <Text>{` ${props.translate('common.and')} `}</Text>}
Expand Down
Loading

0 comments on commit 4ecf59b

Please sign in to comment.