Skip to content

Commit

Permalink
Merge branch 'Expensify:main' into arrow-feature-signed
Browse files Browse the repository at this point in the history
  • Loading branch information
JediWattson authored Jan 23, 2023
2 parents 7a10eff + ae66a7f commit 8992e46
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 80 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 1001025702
versionName "1.2.57-2"
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.2</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.2</string>
<string>1.2.58.3</string>
</dict>
</plist>
32 changes: 16 additions & 16 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.2.57-2",
"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 @@ -100,7 +100,7 @@
"react-native-image-picker": "^4.10.2",
"react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972",
"react-native-modal": "^13.0.0",
"react-native-onyx": "1.0.35",
"react-native-onyx": "1.0.36",
"react-native-pdf": "^6.6.2",
"react-native-performance": "^4.0.0",
"react-native-permissions": "^3.0.1",
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
1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ const CONST = {
DECIMAL_PAD: 'decimal-pad',
VISIBLE_PASSWORD: 'visible-password',
EMAIL_ADDRESS: 'email-address',
ASCII_CAPABLE: 'ascii-capable',
},

ATTACHMENT_SOURCE_ATTRIBUTE: 'data-expensify-source',
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
3 changes: 2 additions & 1 deletion src/components/RoomNameInput/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RoomNameInput extends Component {
}

render() {
const keyboardType = getOperatingSystem() === CONST.OS.IOS ? 'default' : 'visible-password';
const keyboardType = getOperatingSystem() === CONST.OS.IOS ? CONST.KEYBOARD_TYPE.ASCII_CAPABLE : CONST.KEYBOARD_TYPE.VISIBLE_PASSWORD;
return (
<TextInput
ref={this.props.forwardedRef}
Expand All @@ -45,6 +45,7 @@ class RoomNameInput extends Component {
keyboardType={keyboardType} // this is a bit hacky solution to a RN issue https://github.com/facebook/react-native/issues/27449
onBlur={this.props.onBlur}
autoFocus={this.props.autoFocus}
autoCapitalize="none"
/>
);
}
Expand Down
5 changes: 4 additions & 1 deletion src/libs/RoomNameInputUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import CONST from '../CONST';
*/
function modifyRoomName(roomName) {
const modifiedRoomNameWithoutHash = roomName
.replace(/ /g, '-');
.replace(/ /g, '-')

// Replaces the smart dash on iOS devices with two hyphens
.replace(//g, '--');

return `${CONST.POLICY.ROOM_PREFIX}${modifiedRoomNameWithoutHash}`;
}
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 @@ -360,11 +358,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
Loading

0 comments on commit 8992e46

Please sign in to comment.