Skip to content

Commit

Permalink
Merge branch 'main' into fix/invoice-48465
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Oct 25, 2024
2 parents d1d2cc3 + 9825fa2 commit ef34cc1
Show file tree
Hide file tree
Showing 383 changed files with 5,653 additions and 2,339 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ module.exports = {
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library', 'eslint-plugin-react-compiler', 'lodash', 'deprecation'],
ignorePatterns: ['lib/**'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: path.resolve(__dirname, './tsconfig.json'),
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]
types: [opened, synchronize]

jobs:
CLA:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deployNewHelp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.15.1'
node-version: '20.18.0'

# Wil install the _help/package.js
- name: Install Node.js Dependencies
Expand Down
46 changes: 19 additions & 27 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,29 @@ jobs:
runs-on: ubuntu-latest
name: Find the baseline and delta refs, and check for an existing build artifact for that commit
outputs:
BASELINE_ARTIFACT_FOUND: ${{ steps.checkForExistingArtifact.outputs.ARTIFACT_FOUND }}
BASELINE_ARTIFACT_WORKFLOW_ID: ${{ steps.checkForExistingArtifact.outputs.ARTIFACT_WORKFLOW_ID }}
BASELINE_VERSION: ${{ steps.getMostRecentRelease.outputs.VERSION }}
BASELINE_REF: ${{ steps.getBaselineRef.outputs.BASELINE_REF }}
DELTA_REF: ${{ steps.getDeltaRef.outputs.DELTA_REF }}
IS_PR_MERGED: ${{ steps.getPullRequestDetails.outputs.IS_MERGED }}
steps:
- uses: actions/checkout@v4
with:
# The OS_BOTIFY_COMMIT_TOKEN is a personal access token tied to osbotify (we need a PAT to access the artifact API)
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}

- name: Get most recent release version
id: getMostRecentRelease
run: echo "VERSION=$(gh release list --limit 1 | awk '{ print $1 }')" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ github.token }}
fetch-depth: 0 # Fetches the entire history

- name: Check if there's an existing artifact for this baseline
id: checkForExistingArtifact
uses: ./.github/actions/javascript/getArtifactInfo
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
ARTIFACT_NAME: baseline-${{ steps.getMostRecentRelease.outputs.VERSION }}android-artifact-apk
- name: Determine "baseline ref" (prev merge commit)
id: getBaselineRef
run: |
# Get the name of the current branch
current_branch=$(git rev-parse --abbrev-ref HEAD)
- name: Skip build if there's already an existing artifact for the baseline
if: ${{ fromJSON(steps.checkForExistingArtifact.outputs.ARTIFACT_FOUND) }}
run: echo 'APK for baseline ${{ steps.getMostRecentRelease.outputs.VERSION }} already exists, reusing existing build'
if [ "$current_branch" = "main" ]; then
# On the main branch, find the previous merge commit
previous_merge=$(git rev-list --merges HEAD~1 | head -n 1)
else
# On a feature branch, find the common ancestor of the current branch and main
previous_merge=$(git merge-base HEAD main)
fi
echo "$previous_merge"
echo "BASELINE_REF=$previous_merge" >> "$GITHUB_OUTPUT"
- name: Get pull request details
id: getPullRequestDetails
Expand Down Expand Up @@ -84,15 +80,14 @@ jobs:
fi
buildBaseline:
name: Build apk from latest release as a baseline
name: Build apk from baseline
uses: ./.github/workflows/buildAndroid.yml
needs: prep
if: ${{ !fromJSON(needs.prep.outputs.BASELINE_ARTIFACT_FOUND) }}
secrets: inherit
with:
type: e2e
ref: ${{ needs.prep.outputs.BASELINE_VERSION }}
artifact-prefix: baseline-${{ needs.prep.outputs.BASELINE_VERSION }}
ref: ${{ needs.prep.outputs.BASELINE_REF }}
artifact-prefix: baseline-${{ needs.prep.outputs.BASELINE_REF }}

buildDelta:
name: Build apk from delta ref
Expand Down Expand Up @@ -127,9 +122,6 @@ jobs:
with:
name: ${{ needs.buildBaseline.outputs.APK_ARTIFACT_NAME }}
path: zip
# Set github-token only if the baseline was built in this workflow run:
github-token: ${{ needs.prep.outputs.BASELINE_ARTIFACT_WORKFLOW_ID && github.token }}
run-id: ${{ needs.prep.outputs.BASELINE_ARTIFACT_WORKFLOW_ID }}

# The downloaded artifact will be a file named "app-e2e-release.apk" so we have to rename it
- name: Rename baseline APK
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.15.1
20.18.0
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ package-lock.json
*.markdown
# We need to modify the import here specifically, hence we disable prettier to get rid of the sorted imports
src/libs/E2E/reactNativeLaunchingTest.ts
# Temporary while we keep react-compiler in our repo
lib/**

# Automatically generated files
src/libs/SearchParser/searchParser.js
Expand Down
4 changes: 2 additions & 2 deletions .well-known/apple-app-site-association
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"applinks": {
"details": [
{
"appIDs": ["368M544MTT.com.chat.expensify.chat"],
"appIDs": ["368M544MTT.com.chat.expensify.chat", "452835FXHF.com.expensify.expensifylite"],
"components": [
{
"/": "/r/*",
Expand Down Expand Up @@ -105,6 +105,6 @@
]
},
"webcredentials": {
"apps": ["368M544MTT.com.chat.expensify.chat"]
"apps": ["368M544MTT.com.chat.expensify.chat", "452835FXHF.com.expensify.expensifylite"]
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ web: `npm run symbolicate-release:web`
- Perfetto UI (https://ui.perfetto.dev/)
- Google Chrome's Tracing UI (chrome://tracing)
---
----
# App Structure and Conventions
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009005104
versionName "9.0.51-4"
versionCode 1009005401
versionName "9.0.54-1"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import com.expensify.chat.bootsplash.BootSplashPackage
import com.expensify.chat.shortcutManagerModule.ShortcutManagerPackage
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.modules.i18nmanager.I18nUtil
import com.facebook.soloader.SoLoader
Expand Down Expand Up @@ -44,6 +46,9 @@ class MainApplication : MultiDexApplication(), ReactApplication {
get() = BuildConfig.IS_HERMES_ENABLED
})

override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)

override fun onCreate() {
super.onCreate()
ReactFontManager.getInstance().addCustomFont(this, "Expensify New Kansas", R.font.expensify_new_kansas)
Expand All @@ -59,7 +64,7 @@ class MainApplication : MultiDexApplication(), ReactApplication {
SoLoader.init(this, /* native exopackage */false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load(bridgelessEnabled = false)
load()
}
if (BuildConfig.DEBUG) {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false)
Expand Down
13 changes: 6 additions & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ require('dotenv').config();
const IS_E2E_TESTING = process.env.E2E_TESTING === 'true';

const ReactCompilerConfig = {
runtimeModule: 'react-compiler-runtime',
target: '18',
environment: {
enableTreatRefLikeIdentifiersAsRefs: true,
},
// We exclude 'tests' directory from compilation, but still compile components imported in test files.
sources: (filename) => !filename.includes('tests/') && !filename.includes('node_modules/'),
};

/**
* Setting targets to node 20 to reduce JS bundle size
* It is also recommended by babel:
Expand Down Expand Up @@ -52,6 +55,8 @@ const webpack = {
const metro = {
presets: [require('@react-native/babel-preset')],
plugins: [
['babel-plugin-react-compiler', ReactCompilerConfig], // must run first!

// This is needed due to a react-native bug: https://github.com/facebook/react-native/issues/29084#issuecomment-1030732709
// It is included in metro-react-native-babel-preset but needs to be before plugin-proposal-class-properties or FlatList will break
'@babel/plugin-transform-flow-strip-types',
Expand Down Expand Up @@ -154,11 +159,5 @@ module.exports = (api) => {
const runningIn = api.caller((args = {}) => args.name);
console.debug(' - running in: ', runningIn);

// don't include react-compiler in jest, because otherwise tests will fail
if (runningIn !== 'babel-jest') {
// must run first!
metro.plugins.unshift(['babel-plugin-react-compiler', ReactCompilerConfig]);
}

return ['metro', 'babel-jest'].includes(runningIn) ? metro : webpack;
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Our new QuickBooks Desktop integration allows you to automate the import and exp
# Step 1: Configure export settings
The following steps will determine how data will be exported from Expensify to QuickBooks Desktop.

![Expensify export settings page for the QuickBooks Desktop integration](https://help.expensify.com/assets/images/quickbooks-desktop-export-settings.png){:width="100%"}

1. In Expensify, hover over **Settings** and click **Workspaces**.
2. Select the Workspace you want to connect to QuickBooks Desktop.
3. Click the **Connections** tab.
Expand All @@ -28,6 +30,8 @@ The following steps will determine how data will be exported from Expensify to Q

The following steps help you determine how data will be imported from QuickBooks Online to Expensify:

![Expensify coding settings page for the QuickBooks Desktop integration](https://help.expensify.com/assets/images/quickbooks-desktop-coding-settings.png){:width="100%"}

1. Click Import under the QuickBooks Online connection.
2. Review each of the following import settings:
- **Chart of Accounts**: The Chart of Accounts is automatically imported from QuickBooks Desktop as categories. This cannot be amended.
Expand All @@ -39,6 +43,8 @@ The following steps help you determine how data will be imported from QuickBooks

The following steps help you determine the advanced settings for your connection, like auto-sync and employee invitation settings.

![Expensify advanced settings page for the QuickBooks Desktop integration](https://help.expensify.com/assets/images/quickbooks-desktop-advanced-settings.png){:width="100%"}

1. Click **Advanced** under the QuickBooks Desktop connection.
2. **Enable or disable Auto-Sync**: If enabled, QuickBooks Desktop automatically communicates changes with Expensify to ensure that the data shared between the two systems is up to date. New report approvals/reimbursements will be synced during the next auto-sync period.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ Generally, these errors indicate that there is a credentials issue.
4. Check that you have the correct permissions.
5. Log in to QuickBooks Desktop as an Admin (in single-user mode).
6. Go to **Edit** > **Preferences** > **Integrated Applications** > **Company Preferences**.
7. Select the Web Connector and click **Properties**.

![Company Preferences page of QuickBooks Desktop](https://help.expensify.com/assets/images/quickbooks-desktop-company-preferences.png){:width="100%"}

7. Select the Web Connector and click **Properties**.

![Web Connector Properties page in QuickBooks Desktop](https://help.expensify.com/assets/images/quickbooks-desktop-access-rights.png){:width="100%"}

8. Make sure that the "Allow this application to login automatically" checkbox is selected and click **OK**.
9. Close all windows in QuickBooks.

Expand Down Expand Up @@ -98,6 +104,11 @@ Generally, this is the result of not having both the QuickBooks Web Connector an

1. Make sure that the Web Connector and QuickBooks Desktop Company File are both open.
2. In the Web Connector, check that the Last Status is “Ok”.

![QuickBooks Web Connector showing status "OK"](https://help.expensify.com/assets/images/quickbooks-desktop-web-connector.png){:width="100%"}

3. Check the Report Comments in Expensify to confirm that the report has been successfully exported to QuickBooks Desktop.

![Expensify report showing the report was exported](https://help.expensify.com/assets/images/quickbooks-desktop-exported-report-comments.png){:width="100%"}

If these general troubleshooting steps don’t work, reach out to Concierge with your Expensify Report ID and a screenshot of your QuickBooks Web Connector.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Personal and Corporate Karma
description: Details about Personal and Corporate Karma
---

# Overview

Expensify.org empowers individuals and communities to eliminate injustice around the world by making giving and volunteering more convenient, meaningful, and collaborative.

## What is the Expensify.org giving model

[Expensify.org](https://www.expensify.org/about) is built on creating a transparent and convenient way to create an emotional connection between donors, volunteers, and recipients.

## Where do Expensify.org funds come from?

Corporate Karma, Personal Karma, and monetary donations.

## What is Personal Karma?

Personal Karma allows individual users to automatically donate a small percentage of their monthly added expenses to Expensify.org.

For every $500 of expenses added, you’ll donate $1 to a related Expensify.org fund. All reported and unreported expenses, including invoice expenses, on the Expenses page are calculated to get the donation amount. Each month, Expensify will charge the billing card on file for the donation amount, and you’ll receive a donation receipt via email.

The fund from your Personal Karma is determined by the expense's MCC (Merchant Category Code). Each MCC supports one of Expensify.org's funds: Climate Justice, Food Security, Housing Equity, Reentry Services, and Youth Advocacy.

## What is Corporate Karma?

Corporate Karma is for companies that want to engage in social responsibility. Each month, the donation is calculated based on the total amount of all approved expense reports, including invoices, across all Workspace.

For every $500 your team spends monthly, your company will donate $1 to a related Expensify.org fund. Expensify will charge the payment card on file for the donation amount each month, and you’ll receive a donation receipt via email.

The fund to which your Corporate Karma goes is determined by the expense's MCC (Merchant Category Code). Each MCC supports one of Expensify.org's funds: Climate Justice, Food Security, Housing Equity, Reentry Services, and Youth Advocacy.

{% include faq-begin.md %}

**How do I opt-in to Personal or Corporate Karma donations?**

You can donate Personal and Corporate Karma to Expensify.org in your company or personal workspace settings.

Go to **Settings** > **Workspaces** > click on your Individual or Group workspace settings and Opt-in to Karma donations.

{% include faq-end.md %}
Loading

0 comments on commit ef34cc1

Please sign in to comment.