Skip to content

Commit

Permalink
Merge branch 'main' into vit-updateHybridAppBuild
Browse files Browse the repository at this point in the history
* main: (433 commits)
  Update redirects.csv
  Update and rename Change-or-add-email-address.md to Managing-Primary-and-Secondary-Logins-in-Expensify.md
  lint
  fix type
  update webpack configuration to use minified pdf.worker file
  adding check if FS is initialized before trying to shut it down
  lint failed
  add tests
  Use different numbers
  Update the isCustom param type and add more tests
  Update the custom feed method
  Update Mobile-Expensify to 9.0.89-5
  Update version to 9.0.89-5
  adding new mock method
  Update Mobile-Expensify to 9.0.89-4
  Update version to 9.0.89-4
  Update redirects.csv
  Update Mobile-Expensify to 9.0.89-3
  Update version to 9.0.89-3
  make includeSelfDM param conditional
  ...

# Conflicts:
#	Mobile-Expensify
  • Loading branch information
Julesssss committed Jan 24, 2025
2 parents 72a73ab + 8ac283a commit d562a5b
Show file tree
Hide file tree
Showing 294 changed files with 6,997 additions and 3,134 deletions.
18 changes: 17 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,26 @@ const path = require('path');
const restrictedImportPaths = [
{
name: 'react-native',
importNames: ['useWindowDimensions', 'StatusBar', 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable', 'Text', 'ScrollView'],
importNames: [
'useWindowDimensions',
'StatusBar',
'TouchableOpacity',
'TouchableWithoutFeedback',
'TouchableNativeFeedback',
'TouchableHighlight',
'Pressable',
'Text',
'ScrollView',
'Animated',
],
message: [
'',
"For 'useWindowDimensions', please use '@src/hooks/useWindowDimensions' instead.",
"For 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable', please use 'PressableWithFeedback' and/or 'PressableWithoutFeedback' from '@components/Pressable' instead.",
"For 'StatusBar', please use '@libs/StatusBar' instead.",
"For 'Text', please use '@components/Text' instead.",
"For 'ScrollView', please use '@components/ScrollView' instead.",
"For 'Animated', please use 'Animated' from 'react-native-reanimated' instead.",
].join('\n'),
},
{
Expand Down Expand Up @@ -75,6 +87,10 @@ const restrictedImportPaths = [
importNames: ['memoize'],
message: "Please use '@src/libs/memoize' instead.",
},
{
name: 'react-native-animatable',
message: "Please use 'react-native-reanimated' instead.",
},
];

const restrictedImportPatterns = [
Expand Down
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/TooltipsTemplate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: 'Tooltips Template'
about: Create this issue when adding a new tooltip to New Expensify
labels: Daily, Design, WaitingForCopy
title: 'Tooltips Template'
---
Refer to https://stackoverflowteams.com/c/expensify/questions/20762 for the full process to add a tooltip.

### Problem
Enter the problem that currently exists without the tooltip.

### Solution
Enter the solution that implementing the tooltip will achieve.

### What is the purpose of the tooltip?
Enter the purpose.

### How should the tooltip look
Add the Figma Mock Up that Design builds.

### Condition
We should show this tooltip to:

### Decide the prioritisation

Priority score:

NOTE: Only one tooltip is shown at a time.
4 changes: 2 additions & 2 deletions .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ runs:
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json', 'patches/**') }}

key: ${{ inputs.IS_HYBRID_BUILD == 'true' && format('{0}-node-modules-{1}', runner.os, hashFiles('package-lock.json', 'patches/**', 'Mobile-Expensify/patches/**')) || format('{0}-node-modules-{1}', runner.os, hashFiles('package-lock.json', 'patches/**'))}}
- id: cache-old-dot-node-modules
if: inputs.IS_HYBRID_BUILD == 'true'
uses: actions/cache@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ The GitHub workflows require a large list of secrets to deploy, notify and test
1. `CSC_LINK` - Required to be set for desktop code signing: https://www.electron.build/code-signing.html#travis-appveyor-and-other-ci-servers
1. `CSC_KEY_PASSWORD` - Required to be set for desktop code signing: https://www.electron.build/code-signing.html#travis-appveyor-and-other-ci-servers
1. `APPLE_ID` - Required for notarizing desktop code in `desktop/notarize.js`
1. `APPLE_TEAM_ID` - Required for notarizing desktop code in `desktop/notarize.js`
1. `APPLE_ID_PASSWORD` - Required for notarizing desktop code in `desktop/notarize.js`
1. `AWS_ACCESS_KEY_ID` - Required for hosting website and desktop compiled code
1. `AWS_SECRET_ACCESS_KEY` - Required for hosting website and desktop compiled code
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ jobs:
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
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 }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ jobs:
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
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 }}
Expand Down
2 changes: 1 addition & 1 deletion Mobile-Expensify
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -794,20 +794,6 @@ The commands used to compile a production or staging desktop build are `npm run
HOWEVER, by default those commands will try to notarize the build (signing it as Expensify) and publish it to the S3 bucket where it's hosted for users. In most cases you won't actually need or want to do that for your local testing. To get around that and disable those behaviors for your local build, apply the following diff:

```diff
diff --git a/config/electronBuilder.config.js b/config/electronBuilder.config.js
index e4ed685f65..4c7c1b3667 100644
--- a/config/electronBuilder.config.js
+++ b/config/electronBuilder.config.js
@@ -42,9 +42,6 @@ module.exports = {
entitlements: 'desktop/entitlements.mac.plist',
entitlementsInherit: 'desktop/entitlements.mac.plist',
type: 'distribution',
- notarize: {
- teamId: '368M544MTT',
- },
},
dmg: {
title: 'New Expensify',
diff --git a/scripts/build-desktop.sh b/scripts/build-desktop.sh
index 791f59d733..526306eec1 100755
--- a/scripts/build-desktop.sh
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 1009008806
versionName "9.0.88-6"
versionCode 1009008905
versionName "9.0.89-5"
// 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
6 changes: 6 additions & 0 deletions assets/images/arrows-leftright.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/images/chatbubble-slash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions config/electronBuilder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ module.exports = {
entitlements: 'desktop/entitlements.mac.plist',
entitlementsInherit: 'desktop/entitlements.mac.plist',
type: 'distribution',
notarize: {
teamId: '368M544MTT',
},
target: [
{
target: 'default',
Expand Down
2 changes: 1 addition & 1 deletion config/webpack/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
// We are importing this worker as a string by using asset/source otherwise it will default to loading via an HTTPS request later.
// This causes issues if we have gone offline before the pdfjs web worker is set up as we won't be able to load it from the server.
{
test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.mjs'),
test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.min.mjs'),
type: 'asset/source',
},

Expand Down
50 changes: 37 additions & 13 deletions contributingGuides/TS_CHEATSHEET.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,46 @@

- [1.4](#animated-style) **Animated styles**

```ts
import {useRef} from 'react';
import {Animated, StyleProp, ViewStyle} from 'react-native';
The recommended approach to creating animations is by using the `react-native-reanimated` library,
as it offers greater efficiency and convenience compared to using the `Animated` API directly from
React Native.

```ts
import React from 'react';
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
import Animated, { useAnimatedStyle, useSharedValue, withTiming, SharedValue, WithTimingConfig } from 'react-native-reanimated';

type MyComponentProps = {
style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
opacity: Animated.SharedValue<number>;
};

const MyComponent = ({ opacity }: MyComponentProps) => {
const animatedStyle = useAnimatedStyle(() => ({
opacity: opacity.value,
}));

return (
<Animated.View style={[styles.box, animatedStyle]} />
);
};

const App = () => {
const opacity = useSharedValue(0);

const startAnimation = () => {
opacity.value = withTiming(1, {
duration: 1000,
easing: Easing.inOut(Easing.quad),
});
};

return (
<View style={styles.container}>
<MyComponent opacity={opacity} />
<Button title="Animate" onPress={startAnimation} />
</View>
);
};

function MyComponent({ style }: MyComponentProps) {
return <Animated.View style={style} />;
}

function App() {
const anim = useRef(new Animated.Value(0)).current;
return <MyComponent style={{opacity: anim.interpolate({...})}} />;
}
```

<a name="render-prop"></a><a name="1.5"></a>
Expand Down
2 changes: 1 addition & 1 deletion desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ You will need to pass your Apple ID (username) and an [app-specific password](ht
Now that your credentials have been set up properly, you can push a build to Min.IO. Start by updating the version value in `package.json` to be much higher than it is currently (1.0.0-0 -> 2.0.0-0) so that the uploaded version is always higher than the version you're testing on. Then run the following, where `RootUserKey` and `RootPassKey` are the `RootUser` and `RootPass` values from step 3:
```shell
AWS_ACCESS_KEY_ID=RootUserKey AWS_SECRET_ACCESS_KEY=RootPassKey APPLE_ID=YOUR_APPLE_ID APPLE_APP_SPECIFIC_PASSWORD=YOUR_APP_SPECIFIC_PW npm run desktop-build
AWS_ACCESS_KEY_ID=RootUserKey AWS_SECRET_ACCESS_KEY=RootPassKey APPLE_ID=YOUR_APPLE_ID APPLE_TEAM_ID=YOUR_APPLE_TEAM_ID APPLE_APP_SPECIFIC_PASSWORD=YOUR_APP_SPECIFIC_PW npm run desktop-build
```
This command will create a build, notarize it, and push your build to the server. Note that it can take around 10 minutes for the command to complete.
Expand Down
5 changes: 5 additions & 0 deletions docs/_data/_routes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ platforms:
icon: /assets/images/money-into-wallet.svg
description: Learn more about expense tracking and submission.

- href: connect-credit-cards
title: Connect Credit Cards
icon: /assets/images/bank-card.svg
description: Track credit card transactions and reconcile company cards.

- href: expensify-card
title: Expensify Card
icon: /assets/images/hand-card.svg
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Managing Primary and Secondary Logins in Expensify
description: Learn how to update or add an email address to your Expensify Classic account with this step-by-step guide.
---
<div id="expensify-classic" markdown="1">

Your **primary email address** on Expensify is used for receiving all notifications and updates. Adding a **secondary email address** enables you to:
- Change your primary email to a new email.
- Connect a personal email as a secondary login when your primary email is employer-provided. This ensures continued account access if your employment changes.
- Log in to your Expensify account using either your primary or secondary email address.
- SmartScan receipts by sending them to receipts@expensify.com from your secondary login.

**Important:** Before removing your primary email, add and make another email the primary. Emails must be added as a secondary login first.

---

# Adding a Secondary Login

⚠️ **This process is only available on the Expensify website, not the mobile app.**

1. Go to **Settings** > **Account**.
2. Under **Account Details**, find **Secondary Logins**, and click **Add Secondary Login**.
3. Enter the email address or phone number you want to use.
- For phone numbers, include the international code if applicable.
4. Check your email or text messages for a verification Magic Code and enter it in the required field.

---

# Changing Your Primary Login

If you have multiple email addresses linked to your account, follow these steps to change your primary login:

1. Navigate to **Settings** > **Account** > **Secondary Logins**.
2. Click **Make Primary** next to the desired email address.
3. *(Optional)* To remove the old email address, click **Remove** next to it.

---

# Unlinking an Email from a Closed Account

If you previously added your personal email as a Secondary Login on a company account and the account has been closed, you can unlink your email to use it with a new Expensify account:

1. Go to the **Expensify Sign-In** page.
2. Enter your personal email address.
3. Click **Unlink Accounts**.
4. Follow the steps in the verification email to complete the unlinking process.

---

# FAQ

## What does changing the primary login do?
Changing your primary login updates:
- The email address displayed on reports (old and new).
- Workspace account settings.
- Your account’s default email.

## Can I have multiple secondary logins?
Yes, you can add an unlimited number of secondary logins to your account.

</div>
Loading

0 comments on commit d562a5b

Please sign in to comment.