Skip to content

Commit a747515

Browse files
committed
Merge branch 'main' of https://github.com/Expensify/App into feat/#Expensify#23229-linking
2 parents 4461124 + 767bb3c commit a747515

File tree

64 files changed

+1079
-1116
lines changed

Some content is hidden

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

64 files changed

+1079
-1116
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
103103
- [ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like `Avatar` is modified, I verified that `Avatar` is working as expected in all cases)
104104
- [ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
105105
- [ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
106-
- [ ] If the PR modifies the form input styles:
106+
- [ ] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
107107
- [ ] I verified that all the inputs inside a form are aligned with each other.
108-
- [ ] I added `Design` label so the design team can review the changes.
108+
- [ ] I added `Design` label and/or tagged `@Expensify/design` so the design team can review the changes.
109109
- [ ] If a new page is added, I verified it's using the `ScrollView` component to make it scrollable when more elements are added to the page.
110110
- [ ] If the `main` branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the `Test` steps.
111111

.github/workflows/e2ePerformanceTests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
run: npm run e2e-test-runner-build
184184

185185
- name: Copy e2e code into zip folder
186-
run: cp tests/e2e/dist/index.js zip/testRunner.js
186+
run: cp tests/e2e/dist/index.js zip/testRunner.ts
187187

188188
- name: Zip everything in the zip directory up
189189
run: zip -qr App.zip ./zip

contributingGuides/REVIEWER_CHECKLIST.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
- [ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like `Avatar` is modified, I verified that `Avatar` is working as expected in all cases)
5252
- [ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
5353
- [ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
54-
- [ ] If the PR modifies the form input styles:
54+
- [ ] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
5555
- [ ] I verified that all the inputs inside a form are aligned with each other.
56-
- [ ] I added `Design` label so the design team can review the changes.
56+
- [ ] I added `Design` label and/or tagged `@Expensify/design` so the design team can review the changes.
5757
- [ ] If a new page is added, I verified it's using the `ScrollView` component to make it scrollable when more elements are added to the page.
5858
- [ ] If the `main` branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the `Test` steps.
5959
- [ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

docs/articles/expensify-classic/expensify-card/Request-the-Card.md

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ If you need to cancel your Expensify Card and cannot access the website or mobil
3838

3939
It's not possible to order a replacement card over the phone, so, if applicable, you would need to handle this step from your Expensify account.
4040

41+
# Card Expiration Date
42+
43+
If you notice that your card expiration date is soon, it's time for a new Expensify card. Expensify will automatically input a notification in your account's Home (Inbox) tab. This notice will ask you to input your address, but this is more if you have changed your address since your card was issued to you. You can ignore it and do nothing; the new Expensify card will ship to your address on file. The new Expensify card will have a new, unique card number and will not be associated with the old one.
44+
4145
{% include faq-begin.md %}
4246

4347
## What if I haven’t received my card after multiple weeks?
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: default
3-
title: Expense & Report Settings
3+
title: Copilots & Delegates
44
---
55

66
{% include hub.html %}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: default
3-
title: Get Paid Back
3+
title: Domains
44
---
55

66
{% include hub.html %}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: default
3-
title: Policy And Domain Settings
3+
title: Expenses
44
---
55

66
{% include hub.html %}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: default
3-
title: Manage Employees And Report Approvals
3+
title: Reports
44
---
55

66
{% include hub.html %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
layout: default
3+
title: Workspaces
4+
---
5+
6+
{% include hub.html %}

ios/NewApp_AdHoc.mobileprovision.gpg

-9 Bytes
Binary file not shown.
Binary file not shown.

jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
},
2424
testEnvironment: 'jsdom',
2525
setupFiles: ['<rootDir>/jest/setup.ts', './node_modules/@react-native-google-signin/google-signin/jest/build/setup.js'],
26-
setupFilesAfterEnv: ['<rootDir>/jest/setupAfterEnv.ts', '<rootDir>/tests/perf-test/setupAfterEnv.js'],
26+
setupFilesAfterEnv: ['<rootDir>/jest/setupAfterEnv.ts', '<rootDir>/tests/perf-test/setupAfterEnv.ts'],
2727
cacheDirectory: '<rootDir>/.jest-cache',
2828
moduleNameMapper: {
2929
'\\.(lottie)$': '<rootDir>/__mocks__/fileMock.ts',

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
"symbolicate:ios": "npx metro-symbolicate main.jsbundle.map",
5353
"symbolicate-release:ios": "scripts/release-profile.js --platform=ios",
5454
"symbolicate-release:android": "scripts/release-profile.js --platform=android",
55-
"test:e2e": "ts-node tests/e2e/testRunner.js --config ./config.local.ts",
56-
"test:e2e:dev": "ts-node tests/e2e/testRunner.js --config ./config.dev.js",
55+
"test:e2e": "ts-node tests/e2e/testRunner.ts --config ./config.local.ts",
56+
"test:e2e:dev": "ts-node tests/e2e/testRunner.ts --config ./config.dev.ts",
5757
"gh-actions-unused-styles": "./.github/scripts/findUnusedKeys.sh",
5858
"workflow-test": "./workflow_tests/scripts/runWorkflowTests.sh",
5959
"workflow-test:generate": "ts-node workflow_tests/utils/preGenerateTest.js",
6060
"setup-https": "mkcert -install && mkcert -cert-file config/webpack/certificate.pem -key-file config/webpack/key.pem dev.new.expensify.com localhost 127.0.0.1",
61-
"e2e-test-runner-build": "ncc build tests/e2e/testRunner.js -o tests/e2e/dist/"
61+
"e2e-test-runner-build": "ncc build tests/e2e/testRunner.ts -o tests/e2e/dist/"
6262
},
6363
"dependencies": {
6464
"@dotlottie/react-player": "^1.6.3",

src/CONST.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1498,8 +1498,6 @@ const CONST = {
14981498
ALPHABETIC_AND_LATIN_CHARS: /^[\p{Script=Latin} ]*$/u,
14991499
NON_ALPHABETIC_AND_NON_LATIN_CHARS: /[^\p{Script=Latin}]/gu,
15001500
ACCENT_LATIN_CHARS: /[\u00C0-\u017F]/g,
1501-
INVALID_DISPLAY_NAME_LHN: /[^\p{L}\p{N}\u00C0-\u017F\s-]/gu,
1502-
INVALID_DISPLAY_NAME_ONLY_LHN: /^[^\p{L}\p{N}\u00C0-\u017F]$/gu,
15031501
POSITIVE_INTEGER: /^\d+$/,
15041502
PO_BOX: /\b[P|p]?(OST|ost)?\.?\s*[O|o|0]?(ffice|FFICE)?\.?\s*[B|b][O|o|0]?[X|x]?\.?\s+[#]?(\d+)\b/,
15051503
ANY_VALUE: /^.+$/,

src/components/ButtonWithDropdownMenu/types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type WorkspaceDistanceRatesBulkActionType = DeepValueOf<typeof CONST.POLICY.DIST
1515
type DropdownOption<TValueType> = {
1616
value: TValueType;
1717
text: string;
18-
icon: IconAsset;
18+
icon?: IconAsset;
1919
iconWidth?: number;
2020
iconHeight?: number;
2121
iconDescription?: string;
@@ -58,7 +58,7 @@ type ButtonWithDropdownMenuProps<TValueType> = {
5858
anchorAlignment?: AnchorAlignment;
5959

6060
/* ref for the button */
61-
buttonRef: RefObject<View>;
61+
buttonRef?: RefObject<View>;
6262

6363
/** The priority to assign the enter key event listener to buttons. 0 is the highest priority. */
6464
enterKeyEventListenerPriority?: number;

src/components/ConfirmedRoute.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ type ConfirmedRoutePropsOnyxProps = {
2525

2626
type ConfirmedRouteProps = ConfirmedRoutePropsOnyxProps & {
2727
/** Transaction that stores the distance request data */
28-
transaction: Transaction;
28+
transaction: OnyxEntry<Transaction>;
2929
};
3030

3131
function ConfirmedRoute({mapboxAccessToken, transaction}: ConfirmedRouteProps) {
3232
const {isOffline} = useNetwork();
33-
const {route0: route} = transaction.routes ?? {};
34-
const waypoints = transaction.comment?.waypoints ?? {};
33+
const {route0: route} = transaction?.routes ?? {};
34+
const waypoints = transaction?.comment?.waypoints ?? {};
3535
const coordinates = route?.geometry?.coordinates ?? [];
3636
const theme = useTheme();
3737
const styles = useThemeStyles();

src/components/EReceipt.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ export default withOnyx<EReceiptProps, EReceiptOnyxProps>({
105105
key: ({transactionID}) => `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`,
106106
},
107107
})(EReceipt);
108+
export type {EReceiptProps, EReceiptOnyxProps};

src/components/EReceiptThumbnail.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,4 @@ export default withOnyx<EReceiptThumbnailProps, EReceiptThumbnailOnyxProps>({
114114
key: ({transactionID}) => `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`,
115115
},
116116
})(EReceiptThumbnail);
117+
export type {EReceiptThumbnailProps, EReceiptThumbnailOnyxProps};

src/components/LHNOptionsList/LHNOptionsList.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ function LHNOptionsList({
3232
draftComments = {},
3333
transactionViolations = {},
3434
onFirstItemRendered = () => {},
35-
reportIDsWithErrors = {},
3635
}: LHNOptionsListProps) {
3736
const styles = useThemeStyles();
3837
const {canUseViolations} = usePermissions();
@@ -64,7 +63,6 @@ function LHNOptionsList({
6463
const itemComment = draftComments?.[`${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${reportID}`] ?? '';
6564
const sortedReportActions = ReportActionsUtils.getSortedReportActionsForDisplay(itemReportActions);
6665
const lastReportAction = sortedReportActions[0];
67-
const reportErrors = reportIDsWithErrors[reportID] ?? {};
6866

6967
// Get the transaction for the last report action
7068
let lastReportActionTransactionID = '';
@@ -93,7 +91,6 @@ function LHNOptionsList({
9391
transactionViolations={transactionViolations}
9492
canUseViolations={canUseViolations}
9593
onLayout={onLayoutItem}
96-
reportErrors={reportErrors}
9794
/>
9895
);
9996
},
@@ -112,7 +109,6 @@ function LHNOptionsList({
112109
transactionViolations,
113110
canUseViolations,
114111
onLayoutItem,
115-
reportIDsWithErrors,
116112
],
117113
);
118114

src/components/LHNOptionsList/OptionRowLHNData.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function OptionRowLHNData({
2828
lastReportActionTransaction = {},
2929
transactionViolations,
3030
canUseViolations,
31-
reportErrors,
3231
...propsToForward
3332
}: OptionRowLHNDataProps) {
3433
const reportID = propsToForward.reportID;
@@ -41,11 +40,11 @@ function OptionRowLHNData({
4140
// Note: ideally we'd have this as a dependent selector in onyx!
4241
const item = SidebarUtils.getOptionData({
4342
report: fullReport,
43+
reportActions,
4444
personalDetails,
4545
preferredLocale: preferredLocale ?? CONST.LOCALES.DEFAULT,
4646
policy,
4747
parentReportAction,
48-
reportErrors,
4948
hasViolations: !!hasViolations,
5049
});
5150
if (deepEqual(item, optionItemRef.current)) {
@@ -70,7 +69,6 @@ function OptionRowLHNData({
7069
transactionViolations,
7170
canUseViolations,
7271
receiptTransactions,
73-
reportErrors,
7472
]);
7573

7674
useEffect(() => {

src/components/LHNOptionsList/types.ts

-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import type {CurrentReportIDContextValue} from '@components/withCurrentReportID'
77
import type CONST from '@src/CONST';
88
import type {OptionData} from '@src/libs/ReportUtils';
99
import type {Locale, PersonalDetailsList, Policy, Report, ReportAction, ReportActions, Transaction, TransactionViolation} from '@src/types/onyx';
10-
import type * as OnyxCommon from '@src/types/onyx/OnyxCommon';
1110
import type {EmptyObject} from '@src/types/utils/EmptyObject';
1211

1312
type OptionMode = ValueOf<typeof CONST.OPTION_MODE>;
@@ -59,9 +58,6 @@ type CustomLHNOptionsListProps = {
5958

6059
/** Callback to fire when the list is laid out */
6160
onFirstItemRendered: () => void;
62-
63-
/** Report IDs with errors mapping to their corresponding error objects */
64-
reportIDsWithErrors: Record<string, OnyxCommon.Errors>;
6561
};
6662

6763
type LHNOptionsListProps = CustomLHNOptionsListProps & CurrentReportIDContextValue & LHNOptionsListOnyxProps;
@@ -117,9 +113,6 @@ type OptionRowLHNDataProps = {
117113

118114
/** Callback to execute when the OptionList lays out */
119115
onLayout?: (event: LayoutChangeEvent) => void;
120-
121-
/** The report errors */
122-
reportErrors: OnyxCommon.Errors | undefined;
123116
};
124117

125118
type OptionRowLHNProps = {

0 commit comments

Comments
 (0)