Skip to content

Commit 35253b0

Browse files
committed
Merge branch 'main' into form-migration/workspace-rate-and-unit-page
merge main into form-migration/workspace-rate-and-unit-page
2 parents 3c4b56c + b0268fa commit 35253b0

File tree

569 files changed

+9881
-6305
lines changed

Some content is hidden

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

569 files changed

+9881
-6305
lines changed

.eslintrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ const restrictedImportPaths = [
1414
importNames: ['TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight'],
1515
message: "Please use 'PressableWithFeedback' and/or 'PressableWithoutFeedback' from 'src/components/Pressable' instead.",
1616
},
17+
{
18+
name: 'react-native-safe-area-context',
19+
importNames: ['useSafeAreaInsets', 'SafeAreaConsumer', 'SafeAreaInsetsContext'],
20+
message: "Please use 'useSafeAreaInsets' from 'src/hooks/useSafeAreaInset' and/or 'SafeAreaConsumer' from 'src/components/SafeAreaConsumer' instead.",
21+
},
1722
];
1823

1924
const restrictedImportPatterns = [

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
9898
- [ ] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
9999
- [ ] If a new CSS style is added I verified that:
100100
- [ ] A similar style doesn't already exist
101-
- [ ] The style can't be created with an existing [StyleUtils](https://github.com/Expensify/App/blob/main/src/styles/StyleUtils.js) function (i.e. `StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)`)
101+
- [ ] The style can't be created with an existing [StyleUtils](https://github.com/Expensify/App/blob/main/src/styles/StyleUtils.js) function (i.e. `StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)`)
102102
- [ ] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
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.

.github/workflows/deployBlocker.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ jobs:
2222
env:
2323
GITHUB_TOKEN: ${{ github.token }}
2424

25+
- name: Escape html characters in GH issue title
26+
env:
27+
GH_ISSUE_TITLE: ${{ github.event.issue.title }}
28+
run: |
29+
escaped_title=$(echo "$GH_ISSUE_TITLE" | sed -e 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s/'"'"'/\&#039;/g; s/|/\&verbar;/g')
30+
echo "GH_ISSUE_TITLE=$escaped_title" >> "$GITHUB_ENV"
31+
2532
- name: 'Post the issue in the #expensify-open-source slack room'
2633
if: ${{ success() }}
2734
uses: 8398a7/action-slack@v3
@@ -32,7 +39,7 @@ jobs:
3239
channel: '#expensify-open-source',
3340
attachments: [{
3441
color: "#DB4545",
35-
text: '💥 We have found a New Expensify Deploy Blocker, if you have any idea which PR could be causing this, please comment in the issue: <${{ github.event.issue.html_url }}|${{ github.event.issue.title }}>'.replace(/[&<>"'|]/g, function(m) { return {'&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#039;', '|': '&verbar;'}[m]; }),
42+
text: '💥 We have found a New Expensify Deploy Blocker, if you have any idea which PR could be causing this, please comment in the issue: <${{ github.event.issue.html_url }}|${{ env.GH_ISSUE_TITLE }}>'
3643
}]
3744
}
3845
env:

.github/workflows/e2ePerformanceTests.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ jobs:
211211
test_spec_file: tests/e2e/TestSpec.yml
212212
test_spec_type: APPIUM_NODE_TEST_SPEC
213213
remote_src: false
214-
file_artifacts: Customer Artifacts.zip
214+
file_artifacts: |
215+
Customer Artifacts.zip
216+
Test spec output.txt
215217
log_artifacts: debug.log
216218
cleanup: true
217219
timeout: 5400
@@ -220,6 +222,7 @@ jobs:
220222
if: failure()
221223
run: |
222224
echo ${{ steps.schedule-awsdf-main.outputs.data }}
225+
cat "./mainResults/Host_Machine_Files/\$WORKING_DIRECTORY/Test spec output.txt"
223226
unzip "Customer Artifacts.zip" -d mainResults
224227
cat ./mainResults/Host_Machine_Files/\$WORKING_DIRECTORY/debug.log
225228

.github/workflows/platformDeploy.yml

+9
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ jobs:
5656
- name: Setup Node
5757
uses: ./.github/actions/composite/setupNode
5858

59+
- name: Setup Java
60+
uses: actions/setup-java@v3
61+
with:
62+
distribution: 'oracle'
63+
java-version: '17'
64+
5965
- name: Setup Ruby
6066
uses: ruby/setup-ruby@a05e47355e80e57b9a67566a813648fa67d92011
6167
with:
@@ -341,6 +347,9 @@ jobs:
341347
if: ${{ failure() }}
342348
needs: [android, desktop, iOS, web]
343349
steps:
350+
- name: Checkout
351+
uses: actions/checkout@v4
352+
344353
- name: Post Slack message on failure
345354
uses: ./.github/actions/composite/announceFailedWorkflowInSlack
346355
with:

.github/workflows/testBuild.yml

+6
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ jobs:
8484
- name: Setup Node
8585
uses: ./.github/actions/composite/setupNode
8686

87+
- name: Setup Java
88+
uses: actions/setup-java@v3
89+
with:
90+
distribution: 'oracle'
91+
java-version: '17'
92+
8793
- name: Setup Ruby
8894
uses: ruby/setup-ruby@a05e47355e80e57b9a67566a813648fa67d92011
8995
with:

.imgbotconfig

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"ignoredFiles": [
3-
"assets/images/empty-state_background-fade.png" // Caused an issue with colour gradients, https://github.com/Expensify/App/issues/30499
3+
"assets/images/empty-state_background-fade-dark.png", // Caused an issue with colour gradients, https://github.com/Expensify/App/issues/30499
4+
"assets/images/empty-state_background-fade-light.png"
45
],
56
"aggressiveCompression": "false"
67
}

__mocks__/@ua/react-native-airship.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const Airship = {
3131
},
3232
contact: {
3333
identify: jest.fn(),
34-
getNamedUserId: jest.fn(),
34+
getNamedUserId: () => Promise.resolve(undefined),
3535
reset: jest.fn(),
3636
},
3737
};

android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ android {
9191
minSdkVersion rootProject.ext.minSdkVersion
9292
targetSdkVersion rootProject.ext.targetSdkVersion
9393
multiDexEnabled rootProject.ext.multiDexEnabled
94-
versionCode 1001040401
95-
versionName "1.4.4-1"
94+
versionCode 1001040902
95+
versionName "1.4.9-2"
9696
}
9797

9898
flavorDimensions "default"

android/app/src/main/res/values/styles.xml

-13
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
1212
<item name="popupTheme">@style/AppTheme.Popup</item>
1313
<item name="android:spinnerDropDownItemStyle">@style/TextViewSpinnerDropDownItem</item>
14-
<item name="android:datePickerDialogTheme">@style/DatePickerDialogTheme</item>
1514
<item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
1615
</style>
1716

@@ -28,18 +27,6 @@
2827
<item name="android:fontFamily">@font/expneuebold</item>
2928
</style>
3029

31-
<!-- Theme used by the DatePicker dialog -->
32-
<style name="DatePickerDialogTheme" parent="Theme.AppCompat.Dialog">
33-
<item name="android:windowBackground">@drawable/datepicker_background</item>
34-
<item name="android:datePickerStyle">@style/DatePickerStyle</item>
35-
<item name="android:fontFamily">@font/expneuebold</item>
36-
<item name="colorAccent">@color/accent</item>
37-
</style>
38-
39-
<style name="DatePickerStyle" parent="android:Widget.Material.DatePicker">
40-
<item name="android:headerBackground">@color/card_highlight_bg</item> <!-- header background color -->
41-
</style>
42-
4330
<!-- Theme used by the Alert dialog -->
4431
<style name="AlertDialogTheme" parent="Theme.AppCompat.Dialog.Alert">
4532
<item name="android:windowBackground">@drawable/alert_background</item>

config/webpack/webpack.common.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
6666
template: 'web/index.html',
6767
filename: 'index.html',
6868
splashLogo: fs.readFileSync(path.resolve(__dirname, `../../assets/images/new-expensify${mapEnvToLogoSuffix(envFile)}.svg`), 'utf-8'),
69-
usePolyfillIO: platform === 'web',
69+
isWeb: platform === 'web',
70+
isProduction: envFile === '.env.production',
7071
isStaging: envFile === '.env.staging',
7172
}),
7273
new FontPreloadPlugin({

contributingGuides/NAVIGATION.md

+20-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Overview
22

3-
The navigation in the App consists of a top-level Stack Navigator (called `RootStack`) with each of its `Screen` components handling different high-level flow. All those flows can be seen in `AuthScreens.js` file.
3+
The navigation in the App consists of a top-level Stack Navigator (called `RootStack`) with each of its `Screen` components handling different high-level flow. All those flows can be seen in `AuthScreens.tsx` file.
44

55
## Terminology
66

@@ -20,11 +20,11 @@ Navigation Actions - User actions correspond to resulting navigation actions tha
2020

2121
## Adding RHP flows
2222

23-
Most of the time, if you want to add some of the flows concerning one of your reports, e.g. `Money Request` from a user, you will most probably use `RightModalNavigator.js` and `ModalStackNavigators.js` file:
23+
Most of the time, if you want to add some of the flows concerning one of your reports, e.g. `Money Request` from a user, you will most probably use `RightModalNavigator.tsx` and `ModalStackNavigators.tsx` file:
2424

25-
- Since each of those flows is kind of a modal stack, if you want to add a page to the existing flow, you should just add a page to the correct stack in `ModalStackNavigators.js`.
25+
- Since each of those flows is kind of a modal stack, if you want to add a page to the existing flow, you should just add a page to the correct stack in `ModalStackNavigators.tsx`.
2626

27-
- If you want to create new flow, add a `Screen` in `RightModalNavigator.js` and make new modal in `ModalStackNavigators.js` with chosen pages.
27+
- If you want to create new flow, add a `Screen` in `RightModalNavigator.tsx` and make new modal in `ModalStackNavigators.tsx` with chosen pages.
2828

2929
When creating RHP flows, you have to remember a couple things:
3030

@@ -40,9 +40,22 @@ When creating RHP flows, you have to remember a couple things:
4040

4141
An example of adding `Settings_Workspaces` page:
4242

43-
1. Add path to `ROUTES.js`: https://github.com/Expensify/App/blob/3531af22dcadaa94ed11eccf370517dca0b8c305/src/ROUTES.js#L36
43+
1. Add path to `ROUTES.ts`: https://github.com/Expensify/App/blob/main/src/ROUTES.ts
4444

45-
2. Add `Settings_Workspaces` page to proper RHP flow in `linkingConfig.js`: https://github.com/Expensify/App/blob/3531af22dcadaa94ed11eccf370517dca0b8c305/src/libs/Navigation/linkingConfig.js#L40-L42
45+
```ts
46+
export const ROUTES = {
47+
// static route
48+
SETTINGS_WORKSPACES: 'settings/workspaces',
49+
// dynamic route
50+
SETTINGS_WORKSPACES: {
51+
route: 'settings/:accountID',
52+
getRoute: (accountID: number) => `settings/${accountID}` as const,
53+
},
54+
};
55+
56+
```
57+
58+
2. Add `Settings_Workspaces` page to proper RHP flow in `linkingConfig.ts`: https://github.com/Expensify/App/blob/3531af22dcadaa94ed11eccf370517dca0b8c305/src/libs/Navigation/linkingConfig.js#L40-L42
4659

4760
3. Add your page to proper navigator (it should be aligned with where you've put it in the previous step) https://github.com/Expensify/App/blob/3531af22dcadaa94ed11eccf370517dca0b8c305/src/libs/Navigation/AppNavigator/ModalStackNavigators.js#L334-L338
4861

@@ -183,4 +196,4 @@ The action for the first step created with `getMinimalAction` looks like this:
183196
```
184197

185198
### Deeplinking
186-
There is no minimal action for deeplinking directly to the `Profile` screen. But because the `Settings_root` is not on the stack, pressing UP will reset the params for navigators to the correct ones.
199+
There is no minimal action for deeplinking directly to the `Profile` screen. But because the `Settings_root` is not on the stack, pressing UP will reset the params for navigators to the correct ones.

contributingGuides/REVIEWER_CHECKLIST.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
- [ ] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
4747
- [ ] If a new CSS style is added I verified that:
4848
- [ ] A similar style doesn't already exist
49-
- [ ] The style can't be created with an existing [StyleUtils](https://github.com/Expensify/App/blob/main/src/styles/StyleUtils.js) function (i.e. `StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG`)
49+
- [ ] The style can't be created with an existing [StyleUtils](https://github.com/Expensify/App/blob/main/src/styles/StyleUtils.js) function (i.e. `StyleUtils.getBackgroundAndBorderStyle(theme.componentBG`)
5050
- [ ] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
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.

docs/_data/_routes.yml

-10
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,11 @@ platforms:
112112
title: Expensify Card
113113
icon: /assets/images/hand-card.svg
114114
description: Explore how the Expensify Card combines convenience and security to enhance everyday business transactions. Discover how to apply for, oversee, and maximize your card perks here.
115-
116-
- href: expensify-partner-program
117-
title: Expensify Partner Program
118-
icon: /assets/images/handshake.svg
119-
description: Discover how to get the most out of Expensify as an ExpensifyApproved! accountant partner. Learn how to set up your clients, receive CPE credits, and take advantage of your partner discount.
120115

121116
- href: get-paid-back
122117
title: Get Paid Back
123118
icon: /assets/images/money-into-wallet.svg
124119
description: Whether you submit an expense report or an invoice, find out here how to ensure a smooth and timely payback process every time.
125-
126-
- href: send-payments
127-
title: Send Payments
128-
icon: /assets/images/money-wings.svg
129-
description: Uncover step-by-step guidance on sending direct reimbursements to employees, paying an invoice to a vendor, and utilizing third-party payment options.
130120

131121
- href: workspace-and-domain-settings
132122
title: Workspace & Domain Settings

docs/articles/expensify-classic/account-settings/Account-Details.md

+8
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,11 @@ Is your Secondary Login (personal email) invalidated in your company account? If
5959
3. You will be presented with a confirmation message saying Expensify sent you an email with a validation link
6060
4. Head to your personal email account and follow the prompts
6161
5. You'll receive a link in the email to click that will unlink the two accounts
62+
63+
# FAQ
64+
## The profile picture on my account updated automatically. Why did this happen?
65+
Our focus is always on making your experience user-friendly and saving you valuable time. One of the ways we achieve this is by utilizing a public API to retrieve public data linked to your email address.
66+
67+
This tool searches for public accounts or profiles associated with your email address, such as on LinkedIn. When it identifies one, it pulls in the uploaded profile picture and name to Expensify.
68+
69+
While this automated process is generally accurate, there may be instances where it's not entirely correct. If this happens, we apologize for any inconvenience caused. The good news is that rectifying such situations is a straightforward process. You can quickly update your information manually by following the directions provided above, ensuring your data is accurate and up to date in no time.

docs/articles/expensify-classic/account-settings/Merge-Accounts.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,32 @@ description: How to merge two Expensify accounts and why this is useful.
55

66
# Overview
77

8-
Merging accounts allows you to combine two accounts. When you combine two accounts, all receipts, expenses, expense reports, invoices, bills, imported cards, secondary logins, co-pilots, and group policy settings will be combined into one account.
8+
Merging accounts allows you to combine two accounts. When you combine two accounts, all receipts, expenses, expense reports, invoices, bills, imported cards, secondary logins, co-pilots, and group workspace settings will be combined into one account.
99
This can be useful if you start off with an account of your own but your organization creates a separate account for you. You can then track both personal and business expenses via one account.
1010

1111
# How to merge accounts
1212
Merging two accounts together is fairly straightforward. Let’s go over how to do that below:
1313
1. Navigate to [expensify.com](https://www.expensify.com)
1414
2. Log into the account you want to set as the Primary account
15-
3. Navigate to Settings > Account > Account Details
16-
4. Scroll down to the Merge Accounts section and fill in the fields. Once you click Merge, a magic code link will be sent to you via email and you'll be prompted to enter the magic code
17-
5. Copy the magic code, switch back to the expensify.com page, and paste the code into the required field
15+
3. Navigate to **Settings > Account > Account Details**
16+
4. Scroll down to Merge Accounts and fill in the fields
1817
6. Click Merge Accounts
18+
7. Once you click Merge, a magic code is sent to you via email
19+
8. Paste the code into the required field
1920
If you have any questions about this process, feel free to reach out to Concierge for some assistance!
2021

2122
# FAQ
2223
## Can you merge accounts from the mobile app?
2324
No, accounts can only be merged from the full website at expensify.com.
2425
## Can I administratively merge two accounts together?
25-
No, only the account holder (user) can perform account merging.
26+
No, only the account holder (member) can perform account merging.
2627
## Is merging accounts reversible?
2728
No, merging accounts is not reversible. It is a permanent action that cannot be undone.
29+
## I have open expenses in the account I'm merging from. Will those expenses merge into the new account?
30+
All expenses must be reported and submitted for them to merge into the new account. Any open expenses will not merge.
2831
## Are there any restrictions on account merging?
2932
Yes! Please see below:
30-
* If your email address belongs to a verified domain (verified in Expensify), you must start the process from the email account under the verified domain. You cannot merge a verified company email account into a personal account.
31-
* If you have two accounts with two different verified domains, you cannot merge them together.
32-
## What happens to my “personal” Individual policy when merging accounts?
33-
The old “personal” Individual policy will be deleted. If you plan to submit reports under a different policy in the future, ensure that any reports on the Individual policy in the old account are marked as Open before merging the accounts. You can typically do this by selecting “Undo Submit” on any submitted reports.
33+
- If your email address belongs to a verified domain (verified in Expensify), you must start the process from the email account under the verified domain. You cannot merge a verified company email account into a personal account.
34+
- If you have two accounts with two different verified domains, you cannot merge them together.
35+
## What happens to my “personal” Individual workspace when merging accounts?
36+
The old “personal” Individual workspace is deleted. If you plan to submit reports under a different workspace in the future, ensure that any reports on the Individual workspace in the old account are marked as Open before merging the accounts. You can typically do this by selecting “Undo Submit” on any submitted reports.

0 commit comments

Comments
 (0)