Skip to content

Commit

Permalink
Merge branch 'main' into fix-unable-to-clear-task-description
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Aug 28, 2024
2 parents 4a03ea6 + 3d2bdee commit 6e053b0
Show file tree
Hide file tree
Showing 73 changed files with 898 additions and 238 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,6 @@ web-build/

# Jeykll
docs/.bundle

# Output of react compiler healthcheck dev script
react-compiler-output.txt
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 1009002510
versionName "9.0.25-10"
versionCode 1009002515
versionName "9.0.25-15"
// 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
17 changes: 17 additions & 0 deletions assets/images/caret-up-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 30 additions & 4 deletions contributingGuides/REACT_COMPILER.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ If the CI check fails for your PR, you need to fix the problem. If you're unsure

## How can I check what exactly prevents file from successful optimization or whether my fix for passing `react-compiler` actually works?

You can run `npm run react-compiler-healthcheck` and examine the output. This command will list the files that failed to compile and provide details on what caused the failures. The output can be extensive, so you may want to write it to a file for easier review:
You can run a dedicated script: `react-compiler-healthcheck-test` and examine the output. This command will list the files that failed to compile with details on what caused the failures. It will then save this output to `./react-compiler-output.txt` file. Read and examine the output to find what specific error the react-compiler throws.

```bash
npm run react-compiler-healthcheck &> output.txt
npm run react-compiler-healthcheck-test
```

## How to fix a particular problem?
Expand All @@ -39,9 +39,14 @@ If you encounter this error, you need to add the `Ref` postfix to the variable n

If you added a modification to `SharedValue`, you'll likely encounter this error. You can ignore this error for now because the current `react-native-reanimated` API is not compatible with `react-compiler` rules. Once [this PR](https://github.com/software-mansion/react-native-reanimated/pull/6312) is merged, we'll rewrite the code to be compatible with `react-compiler`. Until then, you can ignore this error.

### `manual memoization could not be preserved`
### Existing manual memoization could not be preserved. [...]
These types of errors usually occur when the calls to `useMemo` that were made manually are too complex for react-compiler to understand. React compiler is still experimental so unfortunately this can happen.

This error usually occurs when a dependency used inside a hook is omitted. This omission creates a memoization that is too complex to optimize automatically. Try including the missing dependencies.
Some specific cases of this error are described below.

#### The inferred dependencies did not match the manually specified dependencies

This usually happens when a dependency used inside a hook is omitted. Try including the missing dependencies.

Please be aware that `react-compiler` struggles with memoization of nested fields, i. e.:

Expand All @@ -56,6 +61,27 @@ const selectedQboAccountName = useMemo(() => qboAccountOptions?.find(({id}) => i
// which is great because it reduces the amount of the duplicated code
```

#### This value may be mutated later, which could cause the value to change unexpectedly

This usually happens when the value returned from `useMemo` is later passed to some other function, and `react-compiler` doesn't know if the value will stay stable or be mutated.

```ts
// ❌ such code triggers the error
const myResult = useMemo(() => SearchUtils.buildSearchQueryJSON(foobar), [foobar]);
// [...] some other code
const betterQuery = Utils.improveQuery(myResult);

// ✅ this code can be compiled successfully
const {myResult, betterQuery} = useMemo(() => {
const result = SearchUtils.buildSearchQueryJSON(foobar);

return {
myResult: result,
betterQuery: Utils.improveQuery(result)
}
},[foobar]);
```

### `Invalid nesting in program blocks or scopes`

Such error may happen if we have a nested memoization, i. e.:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ description: Approve, hold, or pay expenses submitted to you
As a workspace admin, you can set an approval workflow for the expenses submitted to you. Expenses can be,

- Instantly submitted without needing approval.

- Submitted at a desired frequency (daily, weekly, monthly) and follow an approval workflow.

**Setting approval workflow and submission frequencies**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Workspace admins can enable invoicing on a workspace to send invoices and receiv

{% include end-option.html %}

{% include end-selector.html %}

# Send an invoice

{% include info.html %}
Expand All @@ -44,6 +46,7 @@ Only workspace admins can send invoices. Invoices can be sent directly from Expe
5. Click **Send**.
{% include end-option.html %}


{% include option.html value="mobile" %}
1. Tap the + icon in the bottom left menu and select **Send Invoice**.
2. Enter the amount due and tap **Next**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ You can also view all unpaid invoices by searching for the sender’s email or p
4. Tap **Add Bank Account** or **Add debit or credit card** to issue payment.
{% include end-option.html %}

{% include end-selector.html %}

# FAQ

**Can someone else pay an invoice besides the person who received it?**
Expand Down
Binary file modified ios/Certificates.p12.gpg
Binary file not shown.
Binary file modified ios/NewApp_AdHoc.mobileprovision.gpg
Binary file not shown.
Binary file modified ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg
Binary file not shown.
Binary file modified ios/NewApp_AppStore.mobileprovision.gpg
Binary file not shown.
Binary file modified ios/NewApp_AppStore_Notification_Service.mobileprovision.gpg
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.25.10</string>
<string>9.0.25.15</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.25.10</string>
<string>9.0.25.15</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.0.25</string>
<key>CFBundleVersion</key>
<string>9.0.25.10</string>
<string>9.0.25.15</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
19 changes: 10 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "9.0.25-10",
"version": "9.0.25-15",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down Expand Up @@ -62,6 +62,7 @@
"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",
"e2e-test-runner-build": "node --max-old-space-size=8192 node_modules/.bin/ncc build tests/e2e/testRunner.ts -o tests/e2e/dist/",
"react-compiler-healthcheck": "react-compiler-healthcheck --verbose",
"react-compiler-healthcheck-test": "react-compiler-healthcheck --verbose &> react-compiler-output.txt",
"generate-search-parser": "peggy --format es -o src/libs/SearchParser/searchParser.js src/libs/SearchParser/searchParser.peggy ",
"web:prod": "http-server ./dist --cors"
},
Expand Down Expand Up @@ -112,7 +113,7 @@
"date-fns-tz": "^2.0.0",
"dom-serializer": "^0.2.2",
"domhandler": "^4.3.0",
"expensify-common": "2.0.76",
"expensify-common": "2.0.77",
"expo": "51.0.17",
"expo-av": "14.0.6",
"expo-image": "1.12.12",
Expand Down Expand Up @@ -141,7 +142,7 @@
"react-native": "0.75.2",
"react-native-android-location-enabler": "^2.0.1",
"react-native-blob-util": "0.19.4",
"react-native-collapsible": "^1.6.1",
"react-native-collapsible": "^1.6.2",
"react-native-config": "1.5.0",
"react-native-dev-menu": "^4.1.1",
"react-native-device-info": "10.3.1",
Expand Down
5 changes: 5 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ const CONST = {
REPORT_FIELDS_FEATURE: 'reportFieldsFeature',
WORKSPACE_FEEDS: 'workspaceFeeds',
NETSUITE_USA_TAX: 'netsuiteUsaTax',
NEW_DOT_COPILOT: 'newDotCopilot',
WORKSPACE_RULES: 'workspaceRules',
COMBINED_TRACK_SUBMIT: 'combinedTrackSubmit',
},
Expand Down Expand Up @@ -3877,6 +3878,10 @@ const CONST = {
ENABLED: 'ENABLED',
DISABLED: 'DISABLED',
},
DELEGATE_ROLE: {
SUBMITTER: 'submitter',
ALL: 'all',
},
STRIPE_GBP_AUTH_STATUSES: {
SUCCEEDED: 'succeeded',
CARD_AUTHENTICATION_REQUIRED: 'authentication_required',
Expand Down
Loading

0 comments on commit 6e053b0

Please sign in to comment.