Skip to content

Commit e1aee8b

Browse files
committed
merge main
2 parents 063a481 + 09cc7e3 commit e1aee8b

File tree

82 files changed

+803
-319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+803
-319
lines changed

android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ android {
107107
minSdkVersion rootProject.ext.minSdkVersion
108108
targetSdkVersion rootProject.ext.targetSdkVersion
109109
multiDexEnabled rootProject.ext.multiDexEnabled
110-
versionCode 1001048016
111-
versionName "1.4.80-16"
110+
versionCode 1001048108
111+
versionName "1.4.81-8"
112112
// Supported language variants must be declared here to avoid from being removed during the compilation.
113113
// This also helps us to not include unnecessary language variants in the APK.
114114
resConfigs "en", "es"

docs/_data/_routes.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ platforms:
7171

7272
- href: integrations
7373
title: Integrations
74-
icon: /assets/images/workflow.svg
74+
icon: /assets/images/simple-illustration__monitor-remotesync.svg
7575
description: Integrate with accounting or HR software to streamline expense approvals.
7676

7777
- href: spending-insights
@@ -131,7 +131,7 @@ platforms:
131131

132132
- href: connections
133133
title: Connections
134-
icon: /assets/images/workflow.svg
134+
icon: /assets/images/simple-illustration__monitor-remotesync.svg
135135
description: Connect to accounting software to streamline expense approvals.
136136

137137
- href: settings
Loading

ios/NewExpensify/Info.plist

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundlePackageType</key>
2020
<string>APPL</string>
2121
<key>CFBundleShortVersionString</key>
22-
<string>1.4.80</string>
22+
<string>1.4.81</string>
2323
<key>CFBundleSignature</key>
2424
<string>????</string>
2525
<key>CFBundleURLTypes</key>
@@ -40,7 +40,7 @@
4040
</dict>
4141
</array>
4242
<key>CFBundleVersion</key>
43-
<string>1.4.80.16</string>
43+
<string>1.4.81.8</string>
4444
<key>FullStory</key>
4545
<dict>
4646
<key>OrgId</key>

ios/NewExpensifyTests/Info.plist

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.4.80</string>
18+
<string>1.4.81</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>1.4.80.16</string>
22+
<string>1.4.81.8</string>
2323
</dict>
2424
</plist>

ios/NotificationServiceExtension/Info.plist

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<key>CFBundleName</key>
1212
<string>$(PRODUCT_NAME)</string>
1313
<key>CFBundleShortVersionString</key>
14-
<string>1.4.80</string>
14+
<string>1.4.81</string>
1515
<key>CFBundleVersion</key>
16-
<string>1.4.80.16</string>
16+
<string>1.4.81.8</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

ios/Podfile.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ PODS:
18521852
- RNGoogleSignin (10.0.1):
18531853
- GoogleSignIn (~> 7.0)
18541854
- React-Core
1855-
- RNLiveMarkdown (0.1.82):
1855+
- RNLiveMarkdown (0.1.83):
18561856
- glog
18571857
- hermes-engine
18581858
- RCT-Folly (= 2022.05.16.00)
@@ -1870,9 +1870,9 @@ PODS:
18701870
- React-utils
18711871
- ReactCommon/turbomodule/bridging
18721872
- ReactCommon/turbomodule/core
1873-
- RNLiveMarkdown/common (= 0.1.82)
1873+
- RNLiveMarkdown/common (= 0.1.83)
18741874
- Yoga
1875-
- RNLiveMarkdown/common (0.1.82):
1875+
- RNLiveMarkdown/common (0.1.83):
18761876
- glog
18771877
- hermes-engine
18781878
- RCT-Folly (= 2022.05.16.00)
@@ -2589,7 +2589,7 @@ SPEC CHECKSUMS:
25892589
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
25902590
RNGestureHandler: 74b7b3d06d667ba0bbf41da7718f2607ae0dfe8f
25912591
RNGoogleSignin: ccaa4a81582cf713eea562c5dd9dc1961a715fd0
2592-
RNLiveMarkdown: d160a948e52282067439585c89a3962582c082ce
2592+
RNLiveMarkdown: 88030b7d9a31f5f6e67743df48ad952d64513b4a
25932593
RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81
25942594
rnmapbox-maps: df8fe93dbd251f25022f4023d31bc04160d4d65c
25952595
RNPermissions: 0b61d30d21acbeafe25baaa47d9bae40a0c65216

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.expensify",
3-
"version": "1.4.80-16",
3+
"version": "1.4.81-8",
44
"author": "Expensify, Inc.",
55
"homepage": "https://new.expensify.com",
66
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
@@ -65,7 +65,7 @@
6565
"@babel/plugin-proposal-private-methods": "^7.18.6",
6666
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
6767
"@dotlottie/react-player": "^1.6.3",
68-
"@expensify/react-native-live-markdown": "0.1.82",
68+
"@expensify/react-native-live-markdown": "0.1.83",
6969
"@expo/metro-runtime": "~3.1.1",
7070
"@formatjs/intl-datetimeformat": "^6.10.0",
7171
"@formatjs/intl-listformat": "^7.2.2",

src/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {PickerStateProvider} from 'react-native-picker-select';
66
import {SafeAreaProvider} from 'react-native-safe-area-context';
77
import '../wdyr';
88
import ActiveElementRoleProvider from './components/ActiveElementRoleProvider';
9-
import ActiveWorkspaceContextProvider from './components/ActiveWorkspace/ActiveWorkspaceProvider';
9+
import ActiveWorkspaceContextProvider from './components/ActiveWorkspaceProvider';
1010
import ColorSchemeWrapper from './components/ColorSchemeWrapper';
1111
import ComposeProviders from './components/ComposeProviders';
1212
import CustomStatusBarAndBackground from './components/CustomStatusBarAndBackground';

src/CONST.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ const CONST = {
18291829
NAME_DISTANCE: 'Distance',
18301830
DISTANCE_UNIT_MILES: 'mi',
18311831
DISTANCE_UNIT_KILOMETERS: 'km',
1832-
MILEAGE_IRS_RATE: 0.655,
1832+
MILEAGE_IRS_RATE: 0.67,
18331833
DEFAULT_RATE: 'Default Rate',
18341834
RATE_DECIMALS: 3,
18351835
FAKE_P2P_ID: '_FAKE_P2P_ID_',
@@ -3394,6 +3394,11 @@ const CONST = {
33943394
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
33953395
*/
33963396
IMAGE: 'image',
3397+
3398+
/**
3399+
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
3400+
*/
3401+
TEXTBOX: 'textbox',
33973402
},
33983403
/**
33993404
* Acceptable values for the `role` attribute on react native components.
@@ -4753,6 +4758,7 @@ const CONST = {
47534758

47544759
SESSION_STORAGE_KEYS: {
47554760
INITIAL_URL: 'INITIAL_URL',
4761+
ACTIVE_WORKSPACE_ID: 'ACTIVE_WORKSPACE_ID',
47564762
},
47574763

47584764
RESERVATION_TYPE: {

src/components/ActiveWorkspace/ActiveWorkspaceProvider.tsx src/components/ActiveWorkspaceProvider/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, {useMemo, useState} from 'react';
2+
import ActiveWorkspaceContext from '@components/ActiveWorkspace/ActiveWorkspaceContext';
23
import type ChildrenProps from '@src/types/utils/ChildrenProps';
3-
import ActiveWorkspaceContext from './ActiveWorkspaceContext';
44

55
function ActiveWorkspaceContextProvider({children}: ChildrenProps) {
66
const [activeWorkspaceID, setActiveWorkspaceID] = useState<string | undefined>(undefined);
@@ -10,7 +10,7 @@ function ActiveWorkspaceContextProvider({children}: ChildrenProps) {
1010
activeWorkspaceID,
1111
setActiveWorkspaceID,
1212
}),
13-
[activeWorkspaceID],
13+
[activeWorkspaceID, setActiveWorkspaceID],
1414
);
1515

1616
return <ActiveWorkspaceContext.Provider value={value}>{children}</ActiveWorkspaceContext.Provider>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React, {useCallback, useMemo, useState} from 'react';
2+
import ActiveWorkspaceContext from '@components/ActiveWorkspace/ActiveWorkspaceContext';
3+
import CONST from '@src/CONST';
4+
import type ChildrenProps from '@src/types/utils/ChildrenProps';
5+
6+
function ActiveWorkspaceContextProvider({children}: ChildrenProps) {
7+
const [activeWorkspaceID, updateActiveWorkspaceID] = useState<string | undefined>(undefined);
8+
9+
const setActiveWorkspaceID = useCallback((workspaceID: string | undefined) => {
10+
updateActiveWorkspaceID(workspaceID);
11+
if (workspaceID && sessionStorage) {
12+
sessionStorage?.setItem(CONST.SESSION_STORAGE_KEYS.ACTIVE_WORKSPACE_ID, workspaceID);
13+
} else {
14+
sessionStorage?.removeItem(CONST.SESSION_STORAGE_KEYS.ACTIVE_WORKSPACE_ID);
15+
}
16+
}, []);
17+
18+
const value = useMemo(
19+
() => ({
20+
activeWorkspaceID,
21+
setActiveWorkspaceID,
22+
}),
23+
[activeWorkspaceID, setActiveWorkspaceID],
24+
);
25+
26+
return <ActiveWorkspaceContext.Provider value={value}>{children}</ActiveWorkspaceContext.Provider>;
27+
}
28+
29+
export default ActiveWorkspaceContextProvider;

src/components/AttachmentPicker/index.native.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import RNFetchBlob from 'react-native-blob-util';
55
import RNDocumentPicker from 'react-native-document-picker';
66
import type {DocumentPickerOptions, DocumentPickerResponse} from 'react-native-document-picker';
77
import {launchImageLibrary} from 'react-native-image-picker';
8-
import type {Asset, Callback, CameraOptions, ImageLibraryOptions, ImagePickerResponse} from 'react-native-image-picker';
8+
import type {Asset, Callback, CameraOptions, ImagePickerResponse} from 'react-native-image-picker';
99
import ImageSize from 'react-native-image-size';
1010
import type {FileObject, ImagePickerResponse as FileResponse} from '@components/AttachmentModal';
1111
import * as Expensicons from '@components/Icon/Expensicons';
@@ -41,12 +41,11 @@ type Item = {
4141
* See https://github.com/react-native-image-picker/react-native-image-picker/#options
4242
* for ImagePicker configuration options
4343
*/
44-
const imagePickerOptions: Partial<CameraOptions | ImageLibraryOptions> = {
44+
const imagePickerOptions = {
4545
includeBase64: false,
4646
saveToPhotos: false,
4747
selectionLimit: 1,
4848
includeExtra: false,
49-
assetRepresentationMode: 'current',
5049
};
5150

5251
/**

src/components/Breadcrumbs.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function Breadcrumbs({breadcrumbs, style}: BreadcrumbsProps) {
6868
<Text style={[styles.breadcrumbSeparator]}>/</Text>
6969
<Text
7070
numberOfLines={1}
71-
style={[styles.mw75, styles.flexShrink0, styles.breadcrumb]}
71+
style={[styles.mw75, styles.flexShrink0, styles.breadcrumb, styles.flex1]}
7272
>
7373
{secondaryBreadcrumb.text}
7474
</Text>

src/components/Composer/index.native.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function Composer(
2828
// On Android the selection prop is required on the TextInput but this prop has issues on IOS
2929
selection,
3030
value,
31+
isGroupPolicyReport = false,
3132
...props
3233
}: ComposerProps,
3334
ref: ForwardedRef<TextInput>,
@@ -36,7 +37,7 @@ function Composer(
3637
const {isFocused, shouldResetFocus} = useResetComposerFocus(textInput);
3738
const textContainsOnlyEmojis = useMemo(() => EmojiUtils.containsOnlyEmojis(value ?? ''), [value]);
3839
const theme = useTheme();
39-
const markdownStyle = useMarkdownStyle(value);
40+
const markdownStyle = useMarkdownStyle(value, !isGroupPolicyReport ? ['mentionReport'] : []);
4041
const styles = useThemeStyles();
4142
const StyleUtils = useStyleUtils();
4243

src/components/Composer/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ function Composer(
7171
isReportActionCompose = false,
7272
isComposerFullSize = false,
7373
shouldContainScroll = false,
74+
isGroupPolicyReport = false,
7475
...props
7576
}: ComposerProps,
7677
ref: ForwardedRef<TextInput | HTMLInputElement>,
7778
) {
7879
const textContainsOnlyEmojis = useMemo(() => EmojiUtils.containsOnlyEmojis(value ?? ''), [value]);
7980
const theme = useTheme();
8081
const styles = useThemeStyles();
81-
const markdownStyle = useMarkdownStyle(value);
82+
const markdownStyle = useMarkdownStyle(value, !isGroupPolicyReport ? ['mentionReport'] : []);
8283
const StyleUtils = useStyleUtils();
8384
const textRef = useRef<HTMLElement & RNText>(null);
8485
const textInput = useRef<AnimatedMarkdownTextInputRef | null>(null);

src/components/Composer/types.ts

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ type ComposerProps = TextInputProps & {
7070

7171
/** Should make the input only scroll inside the element avoid scroll out to parent */
7272
shouldContainScroll?: boolean;
73+
74+
/** Indicates whether the composer is in a group policy report. Used for disabling report mentioning style in markdown input */
75+
isGroupPolicyReport?: boolean;
7376
};
7477

7578
export type {TextSelection, ComposerProps};

src/components/LHNOptionsList/LHNOptionsList.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ function LHNOptionsList({
165165
);
166166

167167
const extraData = useMemo(
168-
() => [reportActions, reports, policy, personalDetails, data.length, draftComments],
169-
[reportActions, reports, policy, personalDetails, data.length, draftComments],
168+
() => [reportActions, reports, policy, personalDetails, data.length, draftComments, optionMode],
169+
[reportActions, reports, policy, personalDetails, data.length, draftComments, optionMode],
170170
);
171171

172172
const previousOptionMode = usePrevious(optionMode);

src/components/MoneyReportHeader.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import Icon from './Icon';
2727
import * as Expensicons from './Icon/Expensicons';
2828
import MoneyReportHeaderStatusBar from './MoneyReportHeaderStatusBar';
2929
import MoneyRequestHeaderStatusBar from './MoneyRequestHeaderStatusBar';
30+
import type {ActionHandledType} from './ProcessMoneyReportHoldMenu';
3031
import ProcessMoneyReportHoldMenu from './ProcessMoneyReportHoldMenu';
3132
import SettlementButton from './SettlementButton';
3233

@@ -79,7 +80,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
7980
isActionOwner && (ReportUtils.canAddOrDeleteTransactions(moneyRequestReport) || ReportUtils.isTrackExpenseReport(transactionThreadReport)) && !isDeletedParentAction;
8081
const [isHoldMenuVisible, setIsHoldMenuVisible] = useState(false);
8182
const [paymentType, setPaymentType] = useState<PaymentMethodType>();
82-
const [requestType, setRequestType] = useState<'pay' | 'approve'>();
83+
const [requestType, setRequestType] = useState<ActionHandledType>();
8384
const canAllowSettlement = ReportUtils.hasUpdatedTotal(moneyRequestReport, policy);
8485
const policyType = policy?.type;
8586
const isPayer = ReportUtils.isPayer(session, moneyRequestReport);
@@ -124,7 +125,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
124125
return;
125126
}
126127
setPaymentType(type);
127-
setRequestType('pay');
128+
setRequestType(CONST.IOU.REPORT_ACTION_TYPE.PAY);
128129
if (ReportUtils.hasHeldExpenses(moneyRequestReport.reportID)) {
129130
setIsHoldMenuVisible(true);
130131
} else if (ReportUtils.isInvoiceReport(moneyRequestReport)) {
@@ -135,7 +136,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
135136
};
136137

137138
const confirmApproval = () => {
138-
setRequestType('approve');
139+
setRequestType(CONST.IOU.REPORT_ACTION_TYPE.APPROVE);
139140
if (ReportUtils.hasHeldExpenses(moneyRequestReport.reportID)) {
140141
setIsHoldMenuVisible(true);
141142
} else {

0 commit comments

Comments
 (0)