Skip to content

Commit

Permalink
Merge branch 'main' into fix/scroll-to-picker-regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Pader committed Jan 24, 2023
2 parents 63ff50a + ae66a7f commit 3392ff1
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 70 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001025703
versionName "1.2.57-3"
versionCode 1001025803
versionName "1.2.58-3"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
Expand Down
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.2.57</string>
<string>1.2.58</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.2.57.3</string>
<string>1.2.58.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.2.57</string>
<string>1.2.58</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2.57.3</string>
<string>1.2.58.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.2.57-3",
"version": "1.2.58-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 @@ -164,7 +164,7 @@
"css-loader": "^5.2.4",
"diff-so-fancy": "^1.3.0",
"dotenv": "^16.0.3",
"electron": "^21.3.4",
"electron": "^21.3.5",
"electron-builder": "23.5.0",
"electron-notarize": "^1.2.1",
"eslint": "^7.6.0",
Expand Down
5 changes: 5 additions & 0 deletions src/Expensify.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import * as User from './libs/actions/User';
import NetworkConnection from './libs/NetworkConnection';
import Navigation from './libs/Navigation/Navigation';
import DeeplinkWrapper from './components/DeeplinkWrapper';
import PopoverReportActionContextMenu from './pages/home/report/ContextMenu/PopoverReportActionContextMenu';
import * as ReportActionContextMenu from './pages/home/report/ContextMenu/ReportActionContextMenu';

// This lib needs to be imported, but it has nothing to export since all it contains is an Onyx connection
// eslint-disable-next-line no-unused-vars
Expand Down Expand Up @@ -189,6 +191,9 @@ class Expensify extends PureComponent {
{!this.state.isSplashShown && (
<>
<GrowlNotification ref={Growl.growlRef} />
<PopoverReportActionContextMenu
ref={ReportActionContextMenu.contextMenuRef}
/>
{/* We include the modal for showing a new update at the top level so the option is always present. */}
{this.props.updateAvailable ? <UpdateAppModal /> : null}
{this.props.screenShareRequest ? (
Expand Down
31 changes: 14 additions & 17 deletions src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
Dimensions,
} from 'react-native';
import _ from 'underscore';
import PropTypes from 'prop-types';
import lodashGet from 'lodash/get';
import * as Report from '../../../../libs/actions/Report';
import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize';
Expand All @@ -12,20 +11,9 @@ import BaseReportActionContextMenu from './BaseReportActionContextMenu';
import ConfirmModal from '../../../../components/ConfirmModal';

const propTypes = {
/** Flag to check if the chat participant is Chronos */
isChronosReport: PropTypes.bool,

/** Whether the provided report is an archived room */
isArchivedRoom: PropTypes.bool,

...withLocalizePropTypes,
};

const defaultProps = {
isChronosReport: false,
isArchivedRoom: false,
};

class PopoverReportActionContextMenu extends React.Component {
constructor(props) {
super(props);
Expand All @@ -48,6 +36,8 @@ class PopoverReportActionContextMenu extends React.Component {
horizontal: 0,
vertical: 0,
},
isArchivedRoom: false,
isChronosReport: false,
};
this.onPopoverShow = () => {};
this.onPopoverHide = () => {};
Expand Down Expand Up @@ -126,6 +116,8 @@ class PopoverReportActionContextMenu extends React.Component {
* @param {String} draftMessage - ReportAction Draftmessage
* @param {Function} [onShow] - Run a callback when Menu is shown
* @param {Function} [onHide] - Run a callback when Menu is hidden
* @param {Boolean} isArchivedRoom - Whether the provided report is an archived room
* @param {Boolean} isChronosReport - Flag to check if the chat participant is Chronos
*/
showContextMenu(
type,
Expand All @@ -137,6 +129,8 @@ class PopoverReportActionContextMenu extends React.Component {
draftMessage,
onShow = () => {},
onHide = () => {},
isArchivedRoom,
isChronosReport,
) {
const nativeEvent = event.nativeEvent || {};
this.contextMenuAnchor = contextMenuAnchor;
Expand Down Expand Up @@ -167,6 +161,8 @@ class PopoverReportActionContextMenu extends React.Component {
selection,
isPopoverVisible: true,
reportActionDraftMessage: draftMessage,
isArchivedRoom,
isChronosReport,
});
});
}
Expand Down Expand Up @@ -239,8 +235,8 @@ class PopoverReportActionContextMenu extends React.Component {
selection={this.state.selection}
reportID={this.state.reportID}
reportAction={this.state.reportAction}
isArchivedRoom={this.props.isArchivedRoom}
isChronosReport={this.props.isChronosReport}
isArchivedRoom={this.state.isArchivedRoom}
isChronosReport={this.state.isChronosReport}
anchor={this.contextMenuTargetNode}
/>
);
Expand Down Expand Up @@ -269,6 +265,8 @@ class PopoverReportActionContextMenu extends React.Component {
reportAction: {},
isDeleteCommentConfirmModalVisible: false,
shouldSetModalVisibilityForDeleteConfirmation: true,
isArchivedRoom: false,
isChronosReport: false,
});
}

Expand Down Expand Up @@ -313,8 +311,8 @@ class PopoverReportActionContextMenu extends React.Component {
reportID={this.state.reportID}
reportAction={this.state.reportAction}
draftMessage={this.state.reportActionDraftMessage}
isArchivedRoom={this.props.isArchivedRoom}
isChronosReport={this.props.isChronosReport}
isArchivedRoom={this.state.isArchivedRoom}
isChronosReport={this.state.isChronosReport}
anchor={this.contextMenuTargetNode}
/>
</PopoverWithMeasuredContent>
Expand All @@ -336,6 +334,5 @@ class PopoverReportActionContextMenu extends React.Component {
}

PopoverReportActionContextMenu.propTypes = propTypes;
PopoverReportActionContextMenu.defaultProps = defaultProps;

export default withLocalize(PopoverReportActionContextMenu);
6 changes: 6 additions & 0 deletions src/pages/home/report/ContextMenu/ReportActionContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const contextMenuRef = React.createRef();
* @param {String} draftMessage - ReportAction Draftmessage
* @param {Function} [onShow=() => {}] - Run a callback when Menu is shown
* @param {Function} [onHide=() => {}] - Run a callback when Menu is hidden
* @param {Boolean} isArchivedRoom - Whether the provided report is an archived room
* @param {Boolean} isChronosReport - Flag to check if the chat participant is Chronos
*/
function showContextMenu(
type,
Expand All @@ -25,6 +27,8 @@ function showContextMenu(
draftMessage = '',
onShow = () => {},
onHide = () => {},
isArchivedRoom = false,
isChronosReport = false,
) {
if (!contextMenuRef.current) {
return;
Expand All @@ -39,6 +43,8 @@ function showContextMenu(
draftMessage,
onShow,
onHide,
isArchivedRoom,
isChronosReport,
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ class ReportActionCompose extends React.Component {
this.actionButton.blur();
this.setMenuVisibility(true);
}}
style={styles.chatItemAttachButton}
style={styles.composerSizeButton}
disabled={isBlockedFromConcierge || this.props.disabled}
>
<Icon src={Expensicons.Plus} />
Expand Down
2 changes: 2 additions & 0 deletions src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ class ReportActionItem extends Component {
this.props.draftMessage,
undefined,
this.checkIfContextMenuActive,
ReportUtils.isArchivedRoom(this.props.report),
ReportUtils.chatIncludesChronos(this.props.report),
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItemSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const ReportActionItemSingle = (props) => {
return (
<View style={props.wrapperStyles}>
<Pressable
style={[styles.alignSelfStart]}
style={[styles.alignSelfStart, styles.mr3]}
onPressIn={ControlSelection.block}
onPressOut={ControlSelection.unblock}
onPress={() => showUserDetails(props.action.actorEmail)}
Expand Down
7 changes: 0 additions & 7 deletions src/pages/home/report/ReportActionsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import withWindowDimensions, {windowDimensionsPropTypes} from '../../../componen
import {withDrawerPropTypes} from '../../../components/withDrawerState';
import * as ReportScrollManager from '../../../libs/ReportScrollManager';
import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize';
import * as ReportActionContextMenu from './ContextMenu/ReportActionContextMenu';
import PopoverReportActionContextMenu from './ContextMenu/PopoverReportActionContextMenu';
import Performance from '../../../libs/Performance';
import {withNetwork} from '../../../components/OnyxProvider';
import * as EmojiPickerAction from '../../../libs/actions/EmojiPickerAction';
Expand Down Expand Up @@ -377,11 +375,6 @@ class ReportActionsView extends React.Component {
loadMoreChats={this.loadMoreChats}
newMarkerReportActionID={this.state.newMarkerReportActionID}
/>
<PopoverReportActionContextMenu
ref={ReportActionContextMenu.contextMenuRef}
isArchivedRoom={ReportUtils.isArchivedRoom(this.props.report)}
isChronosReport={ReportUtils.chatIncludesChronos(this.props.report)}
/>
</>
)}
<EmojiPicker ref={EmojiPickerAction.emojiPickerRef} />
Expand Down
4 changes: 0 additions & 4 deletions src/pages/settings/AppDownloadLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/
import * as DeviceCapabilities from '../../libs/DeviceCapabilities';
import * as ReportActionContextMenu from '../home/report/ContextMenu/ReportActionContextMenu';
import * as ContextMenuActions from '../home/report/ContextMenu/ContextMenuActions';
import PopoverReportActionContextMenu from '../home/report/ContextMenu/PopoverReportActionContextMenu';

const propTypes = {
...withLocalizePropTypes,
Expand Down Expand Up @@ -81,9 +80,6 @@ const AppDownloadLinksPage = (props) => {
onCloseButtonPress={() => Navigation.dismissModal(true)}
/>
<ScrollView style={[styles.mt5]}>
<PopoverReportActionContextMenu
ref={ReportActionContextMenu.contextMenuRef}
/>
{_.map(menuItems, item => (
<PressableWithSecondaryInteraction
key={item.translationKey}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/Profile/LoginField.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class LoginField extends Component {
interactive={Boolean(!this.props.login.partnerUserID)}
onPress={this.props.login.partnerUserID ? () => { } : () => Navigation.navigate(ROUTES.getSettingsAddLoginRoute(this.props.type))}
shouldShowRightIcon={Boolean(!this.props.login.partnerUserID)}
style={[!this.props.login.partnerUserID && styles.colorMuted]}
style={!this.props.login.partnerUserID ? styles.colorMuted : []}
/>
</View>
) : (
Expand Down
29 changes: 7 additions & 22 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const webViewStyles = {
fontSize: variables.fontSizeNormal,
fontFamily: fontFamily.EXP_NEUE,
flex: 1,
lineHeight: variables.fontSizeNormalHeight,
},
};

Expand Down Expand Up @@ -709,7 +710,6 @@ const styles = {
// Actions
actionAvatar: {
borderRadius: 20,
marginRight: variables.avatarChatSpacing,
},

componentHeightLarge: {
Expand Down Expand Up @@ -1529,34 +1529,19 @@ const styles = {
backgroundColor: themeColors.buttonHoveredBG,
},

chatItemAttachButton: {
alignSelf: 'flex-end',
borderRadius: variables.componentBorderRadiusRounded,
backgroundColor: themeColors.transparent,
height: 32,
padding: 6,
marginLeft: 3,
marginRight: 3,
justifyContent: 'center',
},

chatItemAttachBorder: {
borderRightColor: themeColors.border,
borderRightWidth: 1,
marginBottom: 3,
marginTop: 3,

},

composerSizeButton: {
alignItems: 'center',
alignSelf: 'flex-end',
height: 26,
marginBottom: 6,
marginTop: 6,
marginRight: 4,
justifyContent: 'center',
alignSelf: 'center',
height: 32,
width: 32,
padding: 6,
margin: 3,
borderRadius: variables.componentBorderRadiusRounded,
backgroundColor: themeColors.transparent,
},

chatItemAttachmentPlaceholder: {
Expand Down

0 comments on commit 3392ff1

Please sign in to comment.