Skip to content

Commit 3238b9b

Browse files
committed
Merge branch 'main' of github.com:Expensify/App into parasharrajat/viewtransactions
2 parents bbb8385 + 2c501df commit 3238b9b

File tree

166 files changed

+3340
-1319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+3340
-1319
lines changed

.eslintrc.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,26 @@ const path = require('path');
33
const restrictedImportPaths = [
44
{
55
name: 'react-native',
6-
importNames: ['useWindowDimensions', 'StatusBar', 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable', 'Text', 'ScrollView'],
6+
importNames: [
7+
'useWindowDimensions',
8+
'StatusBar',
9+
'TouchableOpacity',
10+
'TouchableWithoutFeedback',
11+
'TouchableNativeFeedback',
12+
'TouchableHighlight',
13+
'Pressable',
14+
'Text',
15+
'ScrollView',
16+
'Animated',
17+
],
718
message: [
819
'',
920
"For 'useWindowDimensions', please use '@src/hooks/useWindowDimensions' instead.",
1021
"For 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable', please use 'PressableWithFeedback' and/or 'PressableWithoutFeedback' from '@components/Pressable' instead.",
1122
"For 'StatusBar', please use '@libs/StatusBar' instead.",
1223
"For 'Text', please use '@components/Text' instead.",
1324
"For 'ScrollView', please use '@components/ScrollView' instead.",
25+
"For 'Animated', please use 'Animated' from 'react-native-reanimated' instead.",
1426
].join('\n'),
1527
},
1628
{
@@ -134,6 +146,10 @@ module.exports = {
134146
{
135147
selector: ['variable', 'property'],
136148
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
149+
filter: {
150+
regex: '^private_[a-z][a-zA-Z0-9]+$',
151+
match: false,
152+
},
137153
},
138154
{
139155
selector: 'function',
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: 'Tooltips Template'
3+
about: Create this issue when adding a new tooltip to New Expensify
4+
labels: Daily, Design, WaitingForCopy
5+
title: 'Tooltips Template'
6+
---
7+
Refer to https://stackoverflowteams.com/c/expensify/questions/20762 for the full process to add a tooltip.
8+
9+
### Problem
10+
Enter the problem that currently exists without the tooltip.
11+
12+
### Solution
13+
Enter the solution that implementing the tooltip will achieve.
14+
15+
### What is the purpose of the tooltip?
16+
Enter the purpose.
17+
18+
### How should the tooltip look
19+
Add the Figma Mock Up that Design builds.
20+
21+
### Condition
22+
We should show this tooltip to:
23+
24+
### Decide the prioritisation
25+
26+
Priority score:
27+
28+
NOTE: Only one tooltip is shown at a time.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ $
2222
PROPOSAL:
2323

2424

25+
<!---
26+
If you want to trigger adhoc build of hybrid app from specific Mobile-Expensify PR please specify it like follows:
27+
28+
MOBILE-EXPENSIFY: PR number
29+
30+
--->
31+
2532
### Tests
2633
<!---
2734
Add a numbered list of manual tests you performed that validates your changes work on all platforms, and that there are no regressions present.

.github/workflows/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ The GitHub workflows require a large list of secrets to deploy, notify and test
9494
1. `CSC_LINK` - Required to be set for desktop code signing: https://www.electron.build/code-signing.html#travis-appveyor-and-other-ci-servers
9595
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
9696
1. `APPLE_ID` - Required for notarizing desktop code in `desktop/notarize.js`
97+
1. `APPLE_TEAM_ID` - Required for notarizing desktop code in `desktop/notarize.js`
9798
1. `APPLE_ID_PASSWORD` - Required for notarizing desktop code in `desktop/notarize.js`
9899
1. `AWS_ACCESS_KEY_ID` - Required for hosting website and desktop compiled code
99100
1. `AWS_SECRET_ACCESS_KEY` - Required for hosting website and desktop compiled code

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ jobs:
318318
CSC_LINK: ${{ secrets.CSC_LINK }}
319319
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
320320
APPLE_ID: ${{ secrets.APPLE_ID }}
321+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
321322
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
322323
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
323324
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.github/workflows/testBuild.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ jobs:
266266
CSC_LINK: ${{ secrets.CSC_LINK }}
267267
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
268268
APPLE_ID: ${{ secrets.APPLE_ID }}
269+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
269270
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
270271
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
271272
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.github/workflows/testBuildHybrid.yml

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
name: Build and deploy hybird apps for testing
1+
name: Build and deploy hybrid apps for testing
22

33
on:
44
workflow_dispatch:
55
inputs:
66
PULL_REQUEST_NUMBER:
77
description: Pull Request number for correct placement of apps
88
required: true
9-
OLD_DOT_COMMIT:
10-
description: The branch, tag or SHA to checkout on Old Dot side
11-
required: false
129
pull_request_target:
1310
types: [opened, synchronize, labeled]
1411
branches: ['*ci-test/**']
1512

1613
env:
1714
PULL_REQUEST_NUMBER: ${{ github.event.number || github.event.inputs.PULL_REQUEST_NUMBER }}
18-
OLD_DOT_COMMIT: ${{ github.event.inputs.OLD_DOT_COMMIT }}
1915

2016
jobs:
2117
validateActor:
@@ -63,6 +59,51 @@ jobs:
6359
echo "REF=$(gh pr view ${{ github.event.inputs.PULL_REQUEST_NUMBER }} --json headRefOid --jq '.headRefOid')" >> "$GITHUB_OUTPUT"
6460
env:
6561
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
63+
getOldDotPR:
64+
runs-on: ubuntu-latest
65+
needs: validateActor
66+
if: ${{ fromJSON(needs.validateActor.outputs.READY_TO_BUILD) }}
67+
outputs:
68+
OLD_DOT_PR: ${{ steps.old-dot-pr.outputs.result }}
69+
steps:
70+
- name: Check if author specifed Old Dot PR
71+
id: old-dot-pr
72+
uses: actions/github-script@v7
73+
with:
74+
github-token: ${{ github.token }}
75+
result-encoding: string
76+
script: |
77+
const pullRequest = await github.rest.pulls.get({
78+
owner: context.repo.owner,
79+
repo: context.repo.repo,
80+
pull_number: '${{ env.PULL_REQUEST_NUMBER }}'',
81+
});
82+
83+
const body = pullRequest.data.body;
84+
const regex = /MOBILE-EXPENSIFY:(?<prNumber>\d+)/;
85+
const found = body.match(regex)?.groups?.prNumber || "";
86+
87+
return found.trim();
88+
89+
getOldDotBranchRef:
90+
runs-on: ubuntu-latest
91+
needs: getOldDotPR
92+
if: ${{ needs.getOldDotPR.outputs.OLD_DOT_PR != '' }}
93+
outputs:
94+
OLD_DOT_REF: ${{ steps.getHeadRef.outputs.REF }}
95+
steps:
96+
- name: Checkout
97+
uses: actions/checkout@v4
98+
99+
- name: Check if pull request number is correct
100+
id: getHeadRef
101+
run: |
102+
set -e
103+
echo "REF=$(gh pr view ${{ needs.getOldDotPR.outputs.OLD_DOT_PR }} -R 'Expensify/Mobile-Expensify' --json headRefOid --jq '.headRefOid')" >> "$GITHUB_OUTPUT"
104+
env:
105+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106+
66107

67108
postGitHubCommentBuildStarted:
68109
runs-on: ubuntu-latest
@@ -84,7 +125,7 @@ jobs:
84125
85126
androidHybrid:
86127
name: Build Android HybridApp
87-
needs: [validateActor, getBranchRef]
128+
needs: [validateActor, getBranchRef, getOldDotBranchRef]
88129
if: ${{ fromJSON(needs.validateActor.outputs.READY_TO_BUILD) }}
89130
runs-on: ubuntu-latest-xl
90131
outputs:
@@ -100,15 +141,16 @@ jobs:
100141
fetch-depth: 0
101142

102143
- name: Update submodule to match main
103-
env:
104-
OLD_DOT_COMMIT: ${{ env.OLD_DOT_COMMIT }}
105144
run: |
106145
git submodule update --init --remote
107-
if [[ -z "$OLD_DOT_COMMIT" ]]; then
108-
git fetch
109-
git checkout ${{ env.OLD_DOT_COMMIT }}
110-
fi
111146
147+
- name: Checkout Old Dot to author specified branch or commit
148+
if: ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF != '' }}
149+
run: |
150+
cd Mobile-Expensify
151+
git fetch
152+
git checkout ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF }}
153+
112154
- name: Configure MapBox SDK
113155
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}
114156

@@ -194,7 +236,7 @@ jobs:
194236
195237
iosHybrid:
196238
name: Build and deploy iOS for testing
197-
needs: [validateActor, getBranchRef]
239+
needs: [validateActor, getBranchRef, getOldDotBranchRef]
198240
if: ${{ fromJSON(needs.validateActor.outputs.READY_TO_BUILD) }}
199241
env:
200242
DEVELOPER_DIR: /Applications/Xcode_16.2.0.app/Contents/Developer
@@ -210,14 +252,15 @@ jobs:
210252
fetch-depth: 0
211253

212254
- name: Update submodule to match main
213-
env:
214-
OLD_DOT_COMMIT: ${{ env.OLD_DOT_COMMIT }}
215255
run: |
216256
git submodule update --init --remote
217-
if [[ -z "$OLD_DOT_COMMIT" ]]; then
218-
git fetch
219-
git checkout ${{ env.OLD_DOT_COMMIT }}
220-
fi
257+
258+
- name: Checkout Old Dot to author specified branch or commit
259+
if: ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF != '' }}
260+
run: |
261+
cd Mobile-Expensify
262+
git fetch
263+
git checkout ${{ needs.getOldDotBranchRef.outputs.OLD_DOT_REF }}
221264
222265
- name: Configure MapBox SDK
223266
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

Mobile-Expensify

README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -794,20 +794,6 @@ The commands used to compile a production or staging desktop build are `npm run
794794
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:
795795

796796
```diff
797-
diff --git a/config/electronBuilder.config.js b/config/electronBuilder.config.js
798-
index e4ed685f65..4c7c1b3667 100644
799-
--- a/config/electronBuilder.config.js
800-
+++ b/config/electronBuilder.config.js
801-
@@ -42,9 +42,6 @@ module.exports = {
802-
entitlements: 'desktop/entitlements.mac.plist',
803-
entitlementsInherit: 'desktop/entitlements.mac.plist',
804-
type: 'distribution',
805-
- notarize: {
806-
- teamId: '368M544MTT',
807-
- },
808-
},
809-
dmg: {
810-
title: 'New Expensify',
811797
diff --git a/scripts/build-desktop.sh b/scripts/build-desktop.sh
812798
index 791f59d733..526306eec1 100755
813799
--- a/scripts/build-desktop.sh

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ android {
110110
minSdkVersion rootProject.ext.minSdkVersion
111111
targetSdkVersion rootProject.ext.targetSdkVersion
112112
multiDexEnabled rootProject.ext.multiDexEnabled
113-
versionCode 1009008804
114-
versionName "9.0.88-4"
113+
versionCode 1009008806
114+
versionName "9.0.88-6"
115115
// Supported language variants must be declared here to avoid from being removed during the compilation.
116116
// This also helps us to not include unnecessary language variants in the APK.
117117
resConfigs "en", "es"

config/electronBuilder.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ module.exports = {
4242
entitlements: 'desktop/entitlements.mac.plist',
4343
entitlementsInherit: 'desktop/entitlements.mac.plist',
4444
type: 'distribution',
45-
notarize: {
46-
teamId: '368M544MTT',
47-
},
4845
target: [
4946
{
5047
target: 'default',

config/webpack/webpack.common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
179179
// We are importing this worker as a string by using asset/source otherwise it will default to loading via an HTTPS request later.
180180
// 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.
181181
{
182-
test: new RegExp('node_modules/pdfjs-dist/build/pdf.worker.min.mjs'),
182+
test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.mjs'),
183183
type: 'asset/source',
184184
},
185185

contributingGuides/TS_CHEATSHEET.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,46 @@
101101

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

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

108+
```ts
109+
import React from 'react';
110+
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
111+
import Animated, { useAnimatedStyle, useSharedValue, withTiming, SharedValue, WithTimingConfig } from 'react-native-reanimated';
112+
108113
type MyComponentProps = {
109-
style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
114+
opacity: Animated.SharedValue<number>;
115+
};
116+
117+
const MyComponent = ({ opacity }: MyComponentProps) => {
118+
const animatedStyle = useAnimatedStyle(() => ({
119+
opacity: opacity.value,
120+
}));
121+
122+
return (
123+
<Animated.View style={[styles.box, animatedStyle]} />
124+
);
125+
};
126+
127+
const App = () => {
128+
const opacity = useSharedValue(0);
129+
130+
const startAnimation = () => {
131+
opacity.value = withTiming(1, {
132+
duration: 1000,
133+
easing: Easing.inOut(Easing.quad),
134+
});
135+
};
136+
137+
return (
138+
<View style={styles.container}>
139+
<MyComponent opacity={opacity} />
140+
<Button title="Animate" onPress={startAnimation} />
141+
</View>
142+
);
110143
};
111-
112-
function MyComponent({ style }: MyComponentProps) {
113-
return <Animated.View style={style} />;
114-
}
115-
116-
function App() {
117-
const anim = useRef(new Animated.Value(0)).current;
118-
return <MyComponent style={{opacity: anim.interpolate({...})}} />;
119-
}
120144
```
121145

122146
<a name="render-prop"></a><a name="1.5"></a>

desktop/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ You will need to pass your Apple ID (username) and an [app-specific password](ht
131131
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:
132132
133133
```shell
134-
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
134+
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
135135
```
136136
137137
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.

ios/NewExpensify/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</dict>
4545
</array>
4646
<key>CFBundleVersion</key>
47-
<string>9.0.88.4</string>
47+
<string>9.0.88.6</string>
4848
<key>FullStory</key>
4949
<dict>
5050
<key>OrgId</key>

ios/NewExpensifyTests/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>9.0.88.4</string>
22+
<string>9.0.88.6</string>
2323
</dict>
2424
</plist>

ios/NotificationServiceExtension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.0.88</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.0.88.4</string>
16+
<string>9.0.88.6</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

0 commit comments

Comments
 (0)