Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix/issue-33922
Browse files Browse the repository at this point in the history
  • Loading branch information
aswin-s committed Mar 22, 2024
2 parents d9fec75 + b9f3906 commit 33bcc45
Show file tree
Hide file tree
Showing 346 changed files with 11,142 additions and 4,124 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deployExpensifyHelp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca
id: deploy
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork)
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ jobs:
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GCP_GEOLOCATION_API_KEY: $${{ secrets.GCP_GEOLOCATION_API_KEY_PRODUCTION }}


- name: Build staging desktop app
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
Expand All @@ -168,6 +170,7 @@ jobs:
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GCP_GEOLOCATION_API_KEY: $${{ secrets.GCP_GEOLOCATION_API_KEY_STAGING }}

iOS:
name: Build and deploy iOS
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ jobs:
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GCP_GEOLOCATION_API_KEY: $${{ secrets.GCP_GEOLOCATION_API_KEY_STAGING }}

web:
name: Build and deploy Web
Expand Down
64 changes: 32 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ These instructions should get you set up ready to work on New Expensify 🙌
1. Install `nvm` then `node` & `npm`: `brew install nvm && nvm install`
2. Install `watchman`: `brew install watchman`
3. Install dependencies: `npm install`
4. Install `mkcert`: `brew install mkcert` followed by `npm run setup-https`. If you are not using macOS, follow the instructions [here](https://github.com/FiloSottile/mkcert?tab=readme-ov-file#installation).
4. Install `mkcert`: `brew install mkcert` followed by `npm run setup-https`. If you are not using macOS, follow the instructions [here](https://github.com/FiloSottile/mkcert?tab=readme-ov-file#installation).
5. Create a host entry in your local hosts file, `/etc/hosts` for dev.new.expensify.com pointing to localhost:
```
127.0.0.1 dev.new.expensify.com
Expand Down Expand Up @@ -86,7 +86,7 @@ If you want to run the app on an actual physical iOS device, please follow the i
1. If you are having issues with **_Getting Started_**, please reference [React Native's Documentation](https://reactnative.dev/docs/environment-setup)
2. If you are running into CORS errors like (in the browser dev console)
```sh
Access to fetch at 'https://www.expensify.com/api?command=BeginSignIn' from origin 'http://localhost:8080' has been blocked by CORS policy
Access to fetch at 'https://www.expensify.com/api/BeginSignIn' from origin 'http://localhost:8080' has been blocked by CORS policy
```
You probably have a misconfigured `.env` file - remove it (`rm .env`) and try again

Expand All @@ -113,7 +113,7 @@ variables referenced here get updated since your local `.env` file is ignored.
see [PERFORMANCE.md](contributingGuides/PERFORMANCE.md#performance-metrics-opt-in-on-local-release-builds) for more information
- `ONYX_METRICS` (optional) - Set this to `true` to capture even more performance metrics and see them in Flipper
see [React-Native-Onyx#benchmarks](https://github.com/Expensify/react-native-onyx#benchmarks) for more information
- `E2E_TESTING` (optional) - This needs to be set to `true` when running the e2e tests for performance regression testing.
- `E2E_TESTING` (optional) - This needs to be set to `true` when running the e2e tests for performance regression testing.
This happens usually automatically, read [this](tests/e2e/README.md) for more information

----
Expand All @@ -127,7 +127,7 @@ You create this certificate by following the instructions in [`Configuring HTTPS
#### Pre-requisite for Android flow
1. Open any emulator using Android Studio
2. Use `adb push "$(mkcert -CAROOT)/rootCA.pem" /storage/emulated/0/Download/` to push certificate to install in Download folder.
3. Install the certificate as CA certificate from the settings. On the Android emulator, this option can be found in Settings > Security > Encryption & Credentials > Install a certificate > CA certificate.
3. Install the certificate as CA certificate from the settings. On the Android emulator, this option can be found in Settings > Security > Encryption & Credentials > Install a certificate > CA certificate.
4. Close the emulator.

Note - If you want to run app on `https://127.0.0.1:8082`, then just install the certificate and use `adb reverse tcp:8082 tcp:8082` on every startup.
Expand Down Expand Up @@ -196,7 +196,7 @@ Often, performance issue debugging occurs in debug builds, which can introduce e

### Getting Started with Source Maps
To accurately profile your application, generating source maps for Android and iOS is crucial. Here's how to enable them:
1. Enable source maps on Android
1. Enable source maps on Android
Ensure the following is set in your app's `android/app/build.gradle` file.

```jsx
Expand All @@ -205,13 +205,13 @@ Ensure the following is set in your app's `android/app/build.gradle` file.
hermesFlagsRelease: ["-O", "-output-source-map"], // <-- here, plus whichever flag was required to set this away from default
]
```
2. Enable source maps on IOS

2. Enable source maps on IOS
Within Xcode head to the build phase - `Bundle React Native code and images`.

```jsx
export SOURCEMAP_FILE="$(pwd)/../main.jsbundle.map" // <-- here;

export NODE_BINARY=node
../node_modules/react-native/scripts/react-native-xcode.sh
```
Expand All @@ -221,8 +221,8 @@ Within Xcode head to the build phase - `Bundle React Native code and images`.
```
7. Depending on the platform you are targeting, run your Android/iOS app in production mode.
8. Upon completion, the generated source map can be found at:
Android: `android/app/build/generated/sourcemaps/react/productionRelease/index.android.bundle.map`
IOS: `main.jsbundle.map`
Android: `android/app/build/generated/sourcemaps/react/productionRelease/index.android.bundle.map`
IOS: `main.jsbundle.map`

### Recording a Trace:
1. Ensure you have generated the source map as outlined above.
Expand Down Expand Up @@ -253,7 +253,7 @@ Build info:

4. Use the following commands to symbolicate the trace for Android and iOS, respectively:
Android: `npm run symbolicate-release:android`
IOS: `npm run symbolicate-release:ios`
IOS: `npm run symbolicate-release:ios`
5. A new file named `Profile_trace_for_<app version>-converted.json` will appear in your project's root folder.
6. Open this file in your tool of choice:
- SpeedScope ([https://www.speedscope.app](https://www.speedscope.app/))
Expand Down Expand Up @@ -482,8 +482,8 @@ Updated rules for managing members across all types of chats in New Expensify.
- Members can't leave or be removed from the #announce room
- Admins can't leave or be removed from #admins
- Domain members can't leave or be removed from their domain chat
- Report submitters can't leave or be removed from their reports
- Report managers can't leave or be removed from their reports
- Report submitters can't leave or be removed from their reports
- Report managers can't leave or be removed from their reports
- Group owners cannot be removed from their groups - they need to transfer ownership first
- **Excepting the above, admins can remove anyone. For example:**
- Group admins can remove other group admins, as well as group members
Expand All @@ -494,17 +494,17 @@ Updated rules for managing members across all types of chats in New Expensify.
1. ### DM
| | Member
| :---: | :---:
| **Invite** | ❌
| **Remove** | ❌
| **Leave** | ❌
| :---: | :---:
| **Invite** | ❌
| **Remove** | ❌
| **Leave** | ❌
| **Can be removed** | ❌
- DM always has two participants. None of the participant can leave or be removed from the DM. Also no additional member can be invited to the chat.
2. ### Workspace
1. #### Workspace
| | Creator | Member(Employee/User) | Admin | Auditor?
| :---: | :---: | :---: | :---: | :---:
| :---: | :---: | :---: | :---: | :---:
| **Invite** | ✅ | ❌ | ✅ | ❌
| **Remove** | ✅ | ❌ | ✅ | ❌
| **Leave** | ❌ | ✅ | ❌ | ✅
Expand All @@ -518,7 +518,7 @@ Updated rules for managing members across all types of chats in New Expensify.
2. #### Workspace #announce room
| | Member(Employee/User) | Admin | Auditor?
| :---: | :---: | :---: | :---:
| :---: | :---: | :---: | :---:
| **Invite** | ❌ | ❌ | ❌
| **Remove** | ❌ | ❌ | ❌
| **Leave** | ❌ | ❌ | ❌
Expand All @@ -528,14 +528,14 @@ Updated rules for managing members across all types of chats in New Expensify.
3. #### Workspace #admin room
| | Admin |
| :---: | :---:
| **Invite** | ❌
| **Remove** | ❌
| **Leave** | ❌
| :---: | :---:
| **Invite** | ❌
| **Remove** | ❌
| **Leave** | ❌
| **Can be removed** | ❌
- Admins can't leave or be removed from #admins

4. #### Workspace rooms
| | Creator | Member | Guest(outside of the workspace)
| :---: | :---: | :---: | :---:
Expand All @@ -548,10 +548,10 @@ Updated rules for managing members across all types of chats in New Expensify.
- Guests are not able to remove anyone from the room

4. #### Workspace chats
| | Admin | Member(default) | Member(invited)
| | Admin | Member(default) | Member(invited)
| :---: | :---: | :---: | :---:
| **Invite** |||
| **Remove** |||
| **Remove** |||
| **Leave** |||
| **Can be removed** |||

Expand All @@ -563,16 +563,16 @@ Updated rules for managing members across all types of chats in New Expensify.

3. ### Domain chat
| | Member
| :---: | :---:
| **Remove** |
| **Leave** |
| **Can be removed** |
| :---: | :---:
| **Remove** |
| **Leave** |
| **Can be removed** |

- Domain members can't leave or be removed from their domain chat
4. ### Reports
| | Submitter | Manager
| :---: | :---: | :---:
| :---: | :---: | :---:
| **Remove** | ❌ | ❌
| **Leave** | ❌ | ❌
| **Can be removed** | ❌ | ❌
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001045401
versionName "1.4.54-1"
versionCode 1001045503
versionName "1.4.55-3"
}

flavorDimensions "default"
Expand Down
5 changes: 5 additions & 0 deletions assets/images/document-plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion desktop/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const {DESKTOP_SHORTCUT_ACCELERATOR, LOCALES} = CONST;
// Setup google api key in process environment, we are setting it this way intentionally. It is required by the
// geolocation api (window.navigator.geolocation.getCurrentPosition) to work on desktop.
// Source: https://github.com/electron/electron/blob/98cd16d336f512406eee3565be1cead86514db7b/docs/api/environment-variables.md#google_api_key
process.env.GOOGLE_API_KEY = CONFIG.GOOGLE_GEOLOCATION_API_KEY;
process.env.GOOGLE_API_KEY = CONFIG.GCP_GEOLOCATION_API_KEY;

app.setName('New Expensify');

Expand Down
44 changes: 44 additions & 0 deletions docs/articles/expensify-classic/expenses/Add-expenses-in-bulk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Add expenses in bulk
description: Add multiple expenses at one time
---
<div id="expensify-classic" markdown="1">

You can upload bulk receipt images or add receipt details in bulk.

# SmartScan receipt images in bulk

{% include selector.html values="desktop, mobile" %}

{% include option.html value="desktop" %}
1. Click the **Expenses** tab.
2. Drag and drop up to 10 images or PDF receipts at once from your computer’s files. You can drop them anywhere on the Expense page where you see a green plus icon next to your mouse cursor.
{% include end-option.html %}

{% include option.html value="mobile" %}
1. Open the mobile app and tap the camera icon in the bottom right corner.
2. Tap the camera icon in the right corner to select the Rapid Fire mode.
3. Take a clear photo of each receipt.
4. When all receipts are captured, tap the X in the left corner to close the camera.
{% include end-option.html %}

{% include end-selector.html %}

# Manually add receipt details in bulk

*Note: This process is currently not available from the mobile app and must be completed from the Expensify website.*

1. Click the **Expenses** tab.
2. Click **New Expense** and select **Create Multiple**.
3. Enter the expense details for up to 10 expenses and click **Save**.

# Upload personal expenses via CSV, XLS, etc.

*Note: This process is currently not available from the mobile app and must be completed from the Expensify website.*

1. Hover over Settings, then click **Account**.
2. Click the **Credit Card Import** tab.
3. Under Personal Cards, click **Import Transactions from File**.
4. Click **Upload** and select a .csv, .xls, .ofx, or a .qfx file.

</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Add expenses to a report
description: Add expenses to a report to submit them for approval
---
<div id="expensify-classic" markdown="1">

To submit expenses for approval, they must be added to a report.

1. Click the **Expenses** tab.
2. Find the expenses you want to add to the report by searching through the table of expenses and/or using the sort filters.
3. Select the expenses by checking the box to the left of each expense or selecting them all.
4. Click **Add to Report** in the right corner and select either:
- **Auto-Report**: Automatically adds the expenses to an open report, or creates a new report if there are no open reports
- **New Report**: Creates a new report for the expenses
- **None**: Ensures none of the selected expenses are attached to a report (as long as the report has not already been submitted)
- **Existing Report**: Adds the expenses to the selected report

</div>
13 changes: 13 additions & 0 deletions docs/articles/expensify-classic/expenses/Export-expenses.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Export expenses
description: Export expenses to a CSV
---
<div id="expensify-classic" markdown="1">

1. Click the **Expenses** tab.
2. Select the expenses you want to export by checking the box to the left of each expense or selecting them all.
3. Click **Export To** in the right corner and select either:
- **Default CSV**: Use Expensify’s default template
- **Create new CSV export layout**: Create your own custom CSV template

</div>
49 changes: 49 additions & 0 deletions docs/articles/expensify-classic/expenses/Split-an-expense.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Split an expense
description: Divide expenses on a receipt into separate expenses
---
<div id="expensify-classic" markdown="1">

You can break down a receipt into multiple expenses by splitting it. Each split expense is treated as an individual expense which can be categorized and tagged separately. The same receipt image will be attached to all of the split expenses.

{% include info.html %}
Splitting an expense cannot be undone.
{% include end-info.html %}

{% include selector.html values="desktop, mobile" %}

{% include option.html value="desktop" %}
1. Click the **Expenses** tab.
2. Click the expense you want to split.
3. Scroll down and click **Split Expense** in the bottom left corner.
4. Use the buttons in the bottom left corner to select how to split the expenses.
- Add additional splits by clicking **Add Split**.
- Split the expense for multiple days by clicking **Split by Days**. This option is good for expenses like hotel stays.
- Split the expense evenly by clicking **Split Even**. This option also works if you add more than two splits.

{% include info.html %}
Each split must have a value greater than $0.00 and all splits must add up to the total expense amount.
{% include end-info.html %}

{% include end-option.html %}

{% include option.html value="mobile" %}
1. Tap the **Expenses** tab.
2. Tap the expense you want to split.
3. Scroll down to the bottom and tap **More Options**.
4. Tap **Split**.
5. Tap each split to add the expense details including the total and category, then click **Save**. To add any additional splits, click **Add Split**.

{% include info.html %}
Each split must have a value greater than $0.00 and all splits must add up to the total expense amount.
{% include end-info.html %}

6. Once all splits have been added and adjusted, click **Save**.

{% include end-option.html %}

{% include end-selector.html %}



</div>
Loading

0 comments on commit 33bcc45

Please sign in to comment.