Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/yh-0218/App into yh-funcCom…
Browse files Browse the repository at this point in the history
…pMigrate-16284
  • Loading branch information
yh-0218 committed Jul 13, 2023
2 parents 8597fbf + f54c4f3 commit 90874fb
Show file tree
Hide file tree
Showing 22 changed files with 120 additions and 145 deletions.
21 changes: 8 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-hooks/recommended', 'prettier', 'plugin:react-native-a11y/basic'],
plugins: ['react-hooks', 'react-native-a11y'],
parser: 'babel-eslint',
ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', '.git/**'],
ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', 'node_modules/.cache/**', '.git/**'],
env: {
jest: true,
},
Expand All @@ -23,18 +23,13 @@ module.exports = {
paths: [
{
name: 'react-native',
importNames: ['useWindowDimensions'],
message: 'Please use useWindowDimensions from src/hooks/useWindowDimensions instead',
},
{
name: 'react-native',
importNames: ['StatusBar'],
message: 'Please use StatusBar from src/libs/StatusBar instead',
},
{
name: 'react-native',
importNames: ['TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable'],
message: 'Please use PressableWithFeedback and/or PressableWithoutFeedback from src/components/Pressable instead',
importNames: ['useWindowDimensions', 'StatusBar', 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable'],
message: [
'',
"For 'useWindowDimensions', please use 'src/hooks/useWindowDimensions' instead.",
"For 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable', please use 'PressableWithFeedback' and/or 'PressableWithoutFeedback' from 'src/components/Pressable' instead.",
"For 'StatusBar', please use 'src/libs/StatusBar' instead.",
].join('\n'),
},
],
},
Expand Down
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 1001033910
versionName "1.3.39-10"
versionCode 1001034001
versionName "1.3.40-1"
}

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.39</string>
<string>1.3.40</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.39.10</string>
<string>1.3.40.1</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.39</string>
<string>1.3.40</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.39.10</string>
<string>1.3.40.1</string>
</dict>
</plist>
56 changes: 24 additions & 32 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.3.39-10",
"version": "1.3.40-1",
"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 @@ -115,7 +115,7 @@
"react-native-key-command": "^1.0.1",
"react-native-localize": "^2.2.6",
"react-native-modal": "^13.0.0",
"react-native-onyx": "1.0.50",
"react-native-onyx": "1.0.51",
"react-native-pdf": "^6.6.2",
"react-native-performance": "^4.0.0",
"react-native-permissions": "^3.0.1",
Expand Down Expand Up @@ -182,7 +182,7 @@
"css-loader": "^6.7.2",
"diff-so-fancy": "^1.3.0",
"dotenv": "^16.0.3",
"electron": "22.3.14",
"electron": "^25.2.0",
"electron-builder": "24.5.0",
"eslint": "^7.6.0",
"eslint-config-expensify": "^2.0.38",
Expand Down
2 changes: 1 addition & 1 deletion src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ const CONST = {
CARD_SECURITY_CODE: /^[0-9]{3,4}$/,
CARD_EXPIRATION_DATE: /^(0[1-9]|1[0-2])([^0-9])?([0-9]{4}|([0-9]{2}))$/,
PAYPAL_ME_USERNAME: /^[a-zA-Z0-9]{1,20}$/,
ROOM_NAME: /^#[a-z0-9-]{1,80}$/,
ROOM_NAME: /^#[a-z0-9à-ÿ-]{1,80}$/,

// eslint-disable-next-line max-len, no-misleading-character-class
EMOJIS: /[\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu,
Expand Down
1 change: 1 addition & 0 deletions src/components/EmojiPicker/CategoryShortcutButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class CategoryShortcutButton extends PureComponent {
shiftVertical={-4}
>
<PressableWithoutFeedback
shouldUseAutoHitSlop={false}
onPress={this.props.onPress}
onHoverIn={() => this.setState({isHighlighted: true})}
onHoverOut={() => this.setState({isHighlighted: false})}
Expand Down
1 change: 1 addition & 0 deletions src/components/EmojiPicker/EmojiPickerMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class EmojiPickerMenuItem extends PureComponent {
render() {
return (
<PressableWithoutFeedback
shouldUseAutoHitSlop={false}
onPress={() => this.props.onPress(this.props.emoji)}
onHoverIn={this.props.onHoverIn}
onHoverOut={this.props.onHoverOut}
Expand Down
1 change: 1 addition & 0 deletions src/components/Pressable/GenericPressable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const WebGenericPressable = forwardRef((props, ref) => (
aria-label={props.accessibilityLabel}
aria-labelledby={props.accessibilityLabelledBy}
aria-valuenow={props.accessibilityValue}
nativeID={props.nativeID || 'no-drag-area'}
/>
));

Expand Down
6 changes: 2 additions & 4 deletions src/components/ReportActionItem/ReportPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import * as IOU from '../../libs/actions/IOU';
import refPropTypes from '../refPropTypes';
import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback';
import themeColors from '../../styles/themes/default';
import reportPropTypes from '../../pages/reportPropTypes';

const propTypes = {
/** All the data of the action */
Expand All @@ -37,10 +38,7 @@ const propTypes = {

/* Onyx Props */
/** chatReport associated with iouReport */
chatReport: PropTypes.shape({
/** Whether the chat report has an outstanding IOU */
hasOutstandingIOU: PropTypes.bool.isRequired,
}),
chatReport: reportPropTypes,

/** Active IOU Report for current report */
iouReport: PropTypes.shape({
Expand Down
7 changes: 3 additions & 4 deletions src/components/ReportActionItem/TaskView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, {useEffect} from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import lodashGet from 'lodash/get';
import reportPropTypes from '../../pages/reportPropTypes';
import withLocalize, {withLocalizePropTypes} from '../withLocalize';
import withWindowDimensions from '../withWindowDimensions';
Expand Down Expand Up @@ -47,6 +48,7 @@ function TaskView(props) {
const isCompleted = ReportUtils.isCompletedTaskReport(props.report);
const isOpen = ReportUtils.isOpenTaskReport(props.report);
const isCanceled = ReportUtils.isCanceledTaskReport(props.report);
const avatarURL = lodashGet(PersonalDetailsUtils.getPersonalDetailsByIDs([props.report.managerID], props.currentUserPersonalDetails.accountID), [0, 'avatar'], '');

return (
<View>
Expand Down Expand Up @@ -112,10 +114,7 @@ function TaskView(props) {
<MenuItem
label={props.translate('task.assignee')}
title={ReportUtils.getDisplayNameForParticipant(props.report.managerID)}
icon={UserUtils.getAvatar(
PersonalDetailsUtils.getPersonalDetailsByIDs([props.report.managerID], props.currentUserPersonalDetails.accountID)[0].avatar,
props.report.managerID,
)}
icon={UserUtils.getAvatar(avatarURL, props.report.managerID)}
iconType={CONST.ICON_TYPE_AVATAR}
avatarSize={CONST.AVATAR_SIZE.SMALLER}
titleStyle={styles.assigneeTextStyle}
Expand Down
4 changes: 2 additions & 2 deletions src/components/SettlementButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class SettlementButton extends React.Component {
value: CONST.IOU.PAYMENT_TYPE.PAYPAL_ME,
},
[CONST.IOU.PAYMENT_TYPE.ELSEWHERE]: {
text: isExpenseReport ? this.props.translate('iou.payExpenseElsewhere') : this.props.translate('iou.settleElsewhere'),
text: this.props.translate('iou.payElsewhere'),
icon: Expensicons.Cash,
value: CONST.IOU.PAYMENT_TYPE.ELSEWHERE,
},
Expand Down Expand Up @@ -127,7 +127,7 @@ class SettlementButton extends React.Component {
return [
{
...paymentMethods[paymentMethod],
text: paymentMethod === CONST.IOU.PAYMENT_TYPE.ELSEWHERE ? this.props.translate('iou.payExpenseElsewhere') : this.props.translate('iou.pay'),
text: paymentMethod === CONST.IOU.PAYMENT_TYPE.ELSEWHERE ? this.props.translate('iou.payElsewhere') : this.props.translate('iou.pay'),
},
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextInput/TextInputLabel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TextInputLabel extends PureComponent {
<Animated.Text
ref={(el) => (this.label = el)}
pointerEvents="none"
accessibilityRole={CONST.ACCESSIBILITY_ROLE_TEXT}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
style={[styles.textInputLabel, styles.textInputLabelDesktop, styles.textInputLabelTransformation(this.props.labelTranslateY, 0, this.props.labelScale)]}
>
{this.props.label}
Expand Down
3 changes: 1 addition & 2 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ export default {
settledElsewhere: 'Paid elsewhere',
settledPaypalMe: 'Paid using Paypal.me',
settleExpensify: 'Pay with Expensify',
settleElsewhere: "I'll settle up elsewhere",
payExpenseElsewhere: 'Pay elsewhere',
payElsewhere: 'Pay elsewhere',
settlePaypalMe: 'Pay with PayPal.me',
requestAmount: ({amount}) => `request ${amount}`,
splitAmount: ({amount}) => `split ${amount}`,
Expand Down
3 changes: 1 addition & 2 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ export default {
settledElsewhere: 'Pagado de otra forma',
settledPaypalMe: 'Pagado con PayPal.me',
settleExpensify: 'Pagar con Expensify',
settleElsewhere: 'Voy a pagar de otra forma',
payExpenseElsewhere: 'Pagar de otra forma',
payElsewhere: 'Pagar de otra forma',
settlePaypalMe: 'Pagar con PayPal.me',
requestAmount: ({amount}) => `solicitar ${amount}`,
splitAmount: ({amount}) => `dividir ${amount}`,
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ function ReportActionItem(props) {
mostRecentReply={`${props.action.childLastVisibleActionCreated}`}
isHovered={hovered}
icons={ReportUtils.getIconsForParticipants(oldestFourAccountIDs, props.personalDetailsList)}
onSecondaryInteraction={showPopover}
/>
</View>
)}
Expand Down
Loading

0 comments on commit 90874fb

Please sign in to comment.