Skip to content

Commit

Permalink
Merge branch 'main' into ts-migration/HTMLEngineProvider-component
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-rebelo committed Jan 11, 2024
2 parents f75c0fa + 1f7d006 commit 7c3cfd3
Show file tree
Hide file tree
Showing 339 changed files with 4,936 additions and 5,206 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ const restrictedImportPaths = [
importNames: ['TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight'],
message: "Please use 'PressableWithFeedback' and/or 'PressableWithoutFeedback' from 'src/components/Pressable' instead.",
},
{
name: 'awesome-phonenumber',
importNames: ['parsePhoneNumber'],
message: "Please use '@libs/PhoneNumber' instead.",
},
{
name: 'react-native-safe-area-context',
importNames: ['useSafeAreaInsets', 'SafeAreaConsumer', 'SafeAreaInsetsContext'],
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/javascript/bumpVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const getBuildVersion = __nccwpck_require__(4016);
const BUILD_GRADLE_PATH = process.env.NODE_ENV === 'test' ? path.resolve(__dirname, '../../android/app/build.gradle') : './android/app/build.gradle';
const PLIST_PATH = './ios/NewExpensify/Info.plist';
const PLIST_PATH_TEST = './ios/NewExpensifyTests/Info.plist';
const PLIST_PATH_NSE = './ios/NotificationServiceExtension/Info.plist';

exports.BUILD_GRADLE_PATH = BUILD_GRADLE_PATH;
exports.PLIST_PATH = PLIST_PATH;
Expand Down Expand Up @@ -90,8 +91,10 @@ exports.updateiOSVersion = function updateiOSVersion(version) {
// Update Plists
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${shortVersion}" ${PLIST_PATH}`);
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${shortVersion}" ${PLIST_PATH_TEST}`);
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${shortVersion}" ${PLIST_PATH_NSE}`);
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${cfVersion}" ${PLIST_PATH}`);
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${cfVersion}" ${PLIST_PATH_TEST}`);
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${cfVersion}" ${PLIST_PATH_NSE}`);

// Return the cfVersion so we can set the NEW_IOS_VERSION in ios.yml
return cfVersion;
Expand Down
3 changes: 3 additions & 0 deletions .github/libs/nativeVersionUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const getBuildVersion = require('semver/functions/prerelease');
const BUILD_GRADLE_PATH = process.env.NODE_ENV === 'test' ? path.resolve(__dirname, '../../android/app/build.gradle') : './android/app/build.gradle';
const PLIST_PATH = './ios/NewExpensify/Info.plist';
const PLIST_PATH_TEST = './ios/NewExpensifyTests/Info.plist';
const PLIST_PATH_NSE = './ios/NotificationServiceExtension/Info.plist';

exports.BUILD_GRADLE_PATH = BUILD_GRADLE_PATH;
exports.PLIST_PATH = PLIST_PATH;
Expand Down Expand Up @@ -81,8 +82,10 @@ exports.updateiOSVersion = function updateiOSVersion(version) {
// Update Plists
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${shortVersion}" ${PLIST_PATH}`);
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${shortVersion}" ${PLIST_PATH_TEST}`);
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${shortVersion}" ${PLIST_PATH_NSE}`);
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${cfVersion}" ${PLIST_PATH}`);
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${cfVersion}" ${PLIST_PATH_TEST}`);
execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${cfVersion}" ${PLIST_PATH_NSE}`);

// Return the cfVersion so we can set the NEW_IOS_VERSION in ios.yml
return cfVersion;
Expand Down
7 changes: 6 additions & 1 deletion .github/scripts/createDocsRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ const platformNames = {
* @returns {String}
*/
function toTitleCase(str) {
return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1));
return _.map(str.split(' '), (word, i) => {
if (i !== 0 && (word.toLowerCase() === 'a' || word.toLowerCase() === 'the' || word.toLowerCase() === 'and')) {
return word.toLowerCase();
}
return word.charAt(0).toUpperCase() + word.substring(1);
}).join(' ');
}

/**
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ jobs:
with:
DURATION_DEVIATION_PERCENTAGE: 20
COUNT_DEVIATION: 0

4 changes: 2 additions & 2 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
# - git diff is used to see the files that were added on this branch
# - gh pr view is used to list files touched by this PR. Git diff may give false positives if the branch isn't up-to-date with main
# - wc counts the words in the result of the intersection
count_new_js=$(comm -1 -2 <(git diff --name-only --diff-filter=A origin/main HEAD -- 'src/libs/*.js' 'src/hooks/*.js' 'src/styles/*.js' 'src/languages/*.js') <(gh pr view ${{ github.event.pull_request.number }} --json files | jq -r '.files | map(.path) | .[]') | wc -l)
count_new_js=$(comm -1 -2 <(git diff --name-only --diff-filter=A origin/main HEAD -- 'src/*.js') <(gh pr view ${{ github.event.pull_request.number }} --json files | jq -r '.files | map(.path) | .[]') | wc -l)
if [ "$count_new_js" -gt "0" ]; then
echo "ERROR: Found new JavaScript files in the /src/libs, /src/hooks, /src/styles, or /src/languages directories; use TypeScript instead."
echo "ERROR: Found new JavaScript files in the project; use TypeScript instead."
exit 1
fi
env:
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001042203
versionName "1.4.22-3"
versionCode 1001042404
versionName "1.4.24-4"
}

flavorDimensions "default"
Expand Down
2 changes: 1 addition & 1 deletion contributingGuides/TS_STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ declare module "external-library-name" {
> This section contains instructions that are applicable during the migration.
- 🚨 DO NOT write new code in TypeScript yet. The only time you write TypeScript code is when the file you're editing has already been migrated to TypeScript by the migration team, or when you need to add new files under `src/libs`, `src/hooks`, `src/styles`, and `src/languages` directories. This guideline will be updated once it's time for new code to be written in TypeScript. If you're doing a major overhaul or refactoring of particular features or utilities of App and you believe it might be beneficial to migrate relevant code to TypeScript as part of the refactoring, please ask in the #expensify-open-source channel about it (and prefix your message with `TS ATTENTION:`).
- 🚨 Any new files under `src/` directory MUST be created in TypeScript now! New files in other directories (e.g. `tests/`, `desktop/`) can be created in TypeScript, if desired.
- If you're migrating a module that doesn't have a default implementation (i.e. `index.ts`, e.g. `getPlatform`), convert `index.website.js` to `index.ts`. Without `index.ts`, TypeScript cannot get type information where the module is imported.
Expand Down
30 changes: 15 additions & 15 deletions desktop/package-lock.json

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

2 changes: 1 addition & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"electron-context-menu": "^2.3.0",
"electron-log": "^4.4.8",
"electron-serve": "^1.2.0",
"electron-updater": "^6.1.6",
"electron-updater": "^6.1.7",
"node-machine-id": "^1.1.12"
},
"author": "Expensify, Inc.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ Is your Secondary Login (personal email) invalidated in your company account? If
4. Head to your personal email account and follow the prompts
5. You'll receive a link in the email to click that will unlink the two accounts

# FAQ
{% include faq-begin.md %}
## The profile picture on my account updated automatically. Why did this happen?
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.

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.

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.

{% include faq-end.md %}
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,12 @@ Here's how to do it:

By following these steps, you can easily verify your email or phone number and close an unwanted Expensify account.

# FAQ
{% include faq-begin.md %}

## What should I do if I'm not directed to my account when clicking the validate option from my phone or email?
It's possible your browser has blocked this, either because of some existing cache or extension. In this case, you should follow the Reset Password flow to reset the password and manually gain access with the new password, along with your email address.

## Why don't I see the Close Account option?
It's possible your account is on a managed company domain. In this case, only the admins from that company can close it.

{% include faq-end.md %}
4 changes: 3 additions & 1 deletion docs/articles/expensify-classic/account-settings/Copilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ To ensure a receipt is routed to the Expensify account in which you are a copilo
3. Send


# FAQ
{% include faq-begin.md %}
## Can a Copilot's Secondary Login be used to forward receipts?
Yes! A Copilot can use any of the email addresses tied to their account to forward receipts into the account of the person they're assisting.

## I'm in Copilot mode for an account; Can I add another Copilot to that account on their behalf?
No, only the original account holder can add another Copilot to the account.
## Is there a restriction on the number of Copilots I can have or the number of users for whom I can act as a Copilot?
There is no limit! You can have as many Copilots as you like, and you can be a Copilot for as many users as you need.

{% include faq-end.md %}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Merging two accounts together is fairly straightforward. Let’s go over how to
8. Paste the code into the required field
If you have any questions about this process, feel free to reach out to Concierge for some assistance!

# FAQ
{% include faq-begin.md %}
## Can you merge accounts from the mobile app?
No, accounts can only be merged from the full website at expensify.com.
## Can I administratively merge two accounts together?
Expand All @@ -34,3 +34,5 @@ Yes! Please see below:
- If you have two accounts with two different verified domains, you cannot merge them together.
## What happens to my “personal” Individual workspace when merging accounts?
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.

{% include faq-end.md %}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Examples of additional requested information:
- An authorization letter
- An independently certified documentation such as shareholder agreement from a lawyer, notary, or public accountant if an individual owns more than 25% of the company

# FAQ
{% include faq-begin.md %}

## How many people can send reimbursements internationally?

Expand Down Expand Up @@ -103,3 +103,4 @@ This is the person who will process international reimbursements. The authorized

You can leave this form section blank since the “User” is Expensify.

{% include faq-end.md %}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Expenses can be imported as either reimbursable or non-reimbursable. Select the

*Remove a card*: If you need to remove a card, you can select the red trash can icon. Please remember this will remove all unreported and un-submitted transactions from your account that are tied to this card, so be careful!

# FAQ
{% include faq-begin.md %}
*Is the bank/credit card import option right for me?*
If you incur expenses using your personal or business card and need to get them accounted for in your company’s accounting, then you might want to import your bank/credit card. Please note, if you have a company-assigned corporate card, check with your company's Expensify admin on how to handle these cards. Often, admins will take care of card assignments, and you won't need to import them yourself.

Expand All @@ -74,3 +74,5 @@ If you aren't able to see the expenses imported when you click “View expenses

*How do I remove an imported spreadsheet?*
If you need to remove an imported spreadsheet, you can select the red trash can icon. Please remember this will remove all unreported and unsubmitted transactions from your account that are tied to this import, so be careful!

{% include faq-end.md %}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can complete this process either via the web app (on a computer), or via the
If you are new to using Batch Payments in Australia, to reimburse your staff or process payroll, you may want to check out these bank-specific instructions for how to upload your .aba file:

- ANZ Bank - [Import a file for payroll payments](https://www.anz.com.au/support/internet-banking/pay-transfer-business/payroll/import-file/)
- CommBank - [Importing and using Direct Entry (EFT) files](https://www.commbank.com.au/business/pds/003-279-importing-a-de-file.pdf)
- CommBank - [Importing and using Direct Entry (EFT) files](https://www.commbank.com.au/business/pds/003-279-importing-a-de-file.pdf)
- Westpac - [Importing Payment Files](https://www.westpac.com.au/business-banking/online-banking/support-faqs/import-files/)
- NAB - [Quick Reference Guide - Upload a payment file](https://www.nab.com.au/business/online-banking/nab-connect/help)
- Bendigo Bank - [Bulk payments user guide](https://www.bendigobank.com.au/globalassets/documents/business/bulk-payments-user-guide.pdf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ If you get a generic error message that indicates, "Something's gone wrong", ple
8. If you have another phone available, try to follow these steps on that device
If the issue persists, please contact your Account Manager or Concierge for further troubleshooting assistance.

# FAQ
{% include faq-begin.md %}
## What is a Beneficial Owner?

A Beneficial Owner refers to an **individual** who owns 25% or more of the business. If no individual owns 25% or more of the business, the company does not have a Beneficial Owner.
Expand Down Expand Up @@ -157,3 +157,5 @@ It's a good idea to wait till the end of that second business day. If you still

Make sure to reach out to your Account Manager or to Concierge once you have done so and our team will be able to re-trigger those 3 transactions!


{% include faq-end.md %}
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ Then, try to upload the revised spreadsheet again:
3. Check the row count again on the Output Preview to confirm it matches the spreadsheet
4. Click **Submit Spreadsheet**

# FAQ
{% include faq-begin.md %}
## Why can't I see my CSV transactions immediately after uploading them?
Don't worry! You'll typically need to wait 1-2 minutes after clicking **I understand, I'll wait!**

## I'm trying to import a credit. Why isn't it uploading?
Negative expenses shouldn't include a minus sign. Instead, they should just be wrapped in parentheses. For example, to indicate "-335.98," you'll want to make sure it's formatted as "(335.98)."

{% include faq-end.md %}
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ To completely remove the card connection, unassign every card from the list and

Note: If expenses are Processing and then rejected, they will also be deleted when they're returned to an Open state as the card they're linked to no longer exists.

# FAQ
{% include faq-begin.md %}

## My Commercial Card feed is set up. Why is a specific card not coming up when I try to assign it to an employee?
Cards will appear in the drop-down when activated and have at least one posted transaction. If the card is activated and has been used for a while and you're still not seeing it, please reach out to your Account Manager or message [email protected] for further assistance.
Expand All @@ -124,3 +124,5 @@ If your company uses a Commercial Card program that isn’t with one of our Appr
- Stripe
- Brex


{% include faq-end.md %}
Loading

0 comments on commit 7c3cfd3

Please sign in to comment.