Skip to content

Commit 403d658

Browse files
committed
Merge branch 'main' of github.com:Expensify/App into 55068-fix-composer-font-height-being-smaller-on-first-render
2 parents a346334 + 639a391 commit 403d658

File tree

608 files changed

+16164
-8531
lines changed

Some content is hidden

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

608 files changed

+16164
-8531
lines changed

.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ EXPENSIFY_ACCOUNT_ID_RECEIPTS=-1
3030
EXPENSIFY_ACCOUNT_ID_REWARDS=-1
3131
EXPENSIFY_ACCOUNT_ID_STUDENT_AMBASSADOR=-1
3232
EXPENSIFY_ACCOUNT_ID_SVFG=-1
33+
EXPENSIFY_ACCOUNT_ID_MANAGER_MCTEST=-1
3334

3435
FB_API_KEY=YOUR_API_KEY
3536
FB_APP_ID=YOUR_APP_ID

.eslintrc.changed.js

-12
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@ module.exports = {
2020
],
2121
},
2222
overrides: [
23-
{
24-
files: [
25-
'src/libs/actions/IOU.ts',
26-
'src/libs/actions/Report.ts',
27-
'src/pages/workspace/WorkspaceInitialPage.tsx',
28-
'src/pages/home/report/PureReportActionItem.tsx',
29-
'src/libs/SidebarUtils.ts',
30-
],
31-
rules: {
32-
'rulesdir/no-default-id-values': 'off',
33-
},
34-
},
3523
{
3624
files: ['**/libs/**/*.{ts,tsx}'],
3725
rules: {

.eslintrc.js

+21-1
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
{
@@ -75,6 +87,10 @@ const restrictedImportPaths = [
7587
importNames: ['memoize'],
7688
message: "Please use '@src/libs/memoize' instead.",
7789
},
90+
{
91+
name: 'react-native-animatable',
92+
message: "Please use 'react-native-reanimated' instead.",
93+
},
7894
];
7995

8096
const restrictedImportPatterns = [
@@ -134,6 +150,10 @@ module.exports = {
134150
{
135151
selector: ['variable', 'property'],
136152
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
153+
filter: {
154+
regex: '^private_[a-z][a-zA-Z0-9]+$',
155+
match: false,
156+
},
137157
},
138158
{
139159
selector: 'function',
+28
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

+7
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/actions/composite/setupNode/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ runs:
3131
uses: actions/cache@v4
3232
with:
3333
path: node_modules
34-
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json', 'patches/**') }}
35-
34+
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/**'))}}
35+
3636
- id: cache-old-dot-node-modules
3737
if: inputs.IS_HYBRID_BUILD == 'true'
3838
uses: actions/cache@v4

.github/actions/javascript/proposalPoliceComment/index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -18007,6 +18007,11 @@ async function run() {
1800718007
console.log('Comment body is either empty or doesn\'t contain the keyword "Proposal": ', payload.comment?.body);
1800818008
return;
1800918009
}
18010+
// If event is `edited` and comment was already edited by the bot, return early
18011+
if (isCommentEditedEvent(payload) && payload.comment?.body.trim().includes('Edited by **proposal-police**')) {
18012+
console.log('Comment was already edited by proposal-police once.\n', payload.comment?.body);
18013+
return;
18014+
}
1801018015
console.log('ProposalPolice™ Action triggered for comment:', payload.comment?.body);
1801118016
console.log('-> GitHub Action Type: ', payload.action?.toUpperCase());
1801218017
if (!isCommentCreatedEvent(payload) && !isCommentEditedEvent(payload)) {
@@ -18033,12 +18038,7 @@ async function run() {
1803318038
if (isCommentCreatedEvent(payload) && isActionRequired) {
1803418039
const formattedResponse = message
1803518040
// replace {user} from response template with @username
18036-
.replaceAll('{user}', `@${payload.comment?.user.login}`)
18037-
// replace {proposalLink} from response template with the link to the comment
18038-
.replaceAll('{proposalLink}', payload.comment?.html_url)
18039-
// remove any double quotes from the final comment because sometimes the assistant's
18040-
// response contains double quotes / sometimes it doesn't
18041-
.replaceAll('"', '');
18041+
.replaceAll('{user}', `@${payload.comment?.user.login}`);
1804218042
// Create a comment with the assistant's response
1804318043
console.log('ProposalPolice™ commenting on issue...');
1804418044
await GithubUtils_1.default.createComment(CONST_1.default.APP_REPO, github_1.context.issue.number, formattedResponse);

.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ async function run() {
4141
return;
4242
}
4343

44+
// If event is `edited` and comment was already edited by the bot, return early
45+
if (isCommentEditedEvent(payload) && payload.comment?.body.trim().includes('Edited by **proposal-police**')) {
46+
console.log('Comment was already edited by proposal-police once.\n', payload.comment?.body);
47+
return;
48+
}
49+
4450
console.log('ProposalPolice™ Action triggered for comment:', payload.comment?.body);
4551
console.log('-> GitHub Action Type: ', payload.action?.toUpperCase());
4652

@@ -73,14 +79,7 @@ async function run() {
7379
if (isCommentCreatedEvent(payload) && isActionRequired) {
7480
const formattedResponse = message
7581
// replace {user} from response template with @username
76-
.replaceAll('{user}', `@${payload.comment?.user.login}`)
77-
78-
// replace {proposalLink} from response template with the link to the comment
79-
.replaceAll('{proposalLink}', payload.comment?.html_url)
80-
81-
// remove any double quotes from the final comment because sometimes the assistant's
82-
// response contains double quotes / sometimes it doesn't
83-
.replaceAll('"', '');
82+
.replaceAll('{user}', `@${payload.comment?.user.login}`);
8483

8584
// Create a comment with the assistant's response
8685
console.log('ProposalPolice™ commenting on issue...');

.github/workflows/README.md

+1
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/cherryPick.yml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
with:
4040
ref: staging
4141
token: ${{ secrets.OS_BOTIFY_TOKEN }}
42+
submodules: true
4243

4344
- name: Set up git for OSBotify
4445
id: setupGitForOSBotify

.github/workflows/commentOnNativeFileChanged.yml

-27
This file was deleted.
+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Build and profile Android apps
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
buildHybridAppAndroid:
8+
name: Build HybridApp Android
9+
runs-on: ubuntu-latest-xl
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: true
15+
token: ${{ secrets.OS_BOTIFY_TOKEN }}
16+
17+
- name: Update submodule to match main
18+
run: |
19+
git submodule update --init --remote
20+
cd Mobile-Expensify
21+
git fetch
22+
git checkout main
23+
24+
- name: Configure MapBox SDK
25+
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}
26+
27+
- name: Setup Node
28+
id: setup-node
29+
uses: ./.github/actions/composite/setupNode
30+
with:
31+
IS_HYBRID_BUILD: 'true'
32+
33+
- name: Run grunt build
34+
run: |
35+
cd Mobile-Expensify
36+
npm run grunt:build:shared
37+
38+
- name: Setup Java
39+
uses: actions/setup-java@v4
40+
with:
41+
distribution: 'oracle'
42+
java-version: '17'
43+
44+
- name: Setup Ruby
45+
uses: ruby/setup-ruby@v1.190.0
46+
with:
47+
bundler-cache: true
48+
49+
- name: Install New Expensify Gems
50+
run: bundle install
51+
52+
- name: Install 1Password CLI
53+
uses: 1password/install-cli-action@v1
54+
55+
- name: Load files from 1Password
56+
env:
57+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
58+
run: |
59+
op document get --output ./upload-key.keystore upload-key.keystore
60+
op document get --output ./android-fastlane-json-key.json android-fastlane-json-key.json
61+
# Copy the keystore to the Android directory for Fullstory
62+
cp ./upload-key.keystore Mobile-Expensify/Android
63+
64+
- name: Load Android upload keystore credentials from 1Password
65+
id: load-credentials
66+
uses: 1password/load-secrets-action@v2
67+
with:
68+
export-env: false
69+
env:
70+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
71+
ANDROID_UPLOAD_KEYSTORE_PASSWORD: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_PASSWORD
72+
ANDROID_UPLOAD_KEYSTORE_ALIAS: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_ALIAS
73+
ANDROID_UPLOAD_KEY_PASSWORD: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEY_PASSWORD
74+
75+
- name: Build Android Release
76+
working-directory: Mobile-Expensify/Android
77+
run: |
78+
./gradlew --profile assembleRelease \
79+
-Pandroid.injected.signing.store.file="./upload-key.keystore" \
80+
-Pandroid.injected.signing.store.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_PASSWORD }} \
81+
-Pandroid.injected.signing.key.alias=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_ALIAS }} \
82+
-Pandroid.injected.signing.key.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEY_PASSWORD }}
83+
84+
echo "Printing Gradle profile report:"
85+
# Print the latest generated profile report
86+
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
87+
cat "$PROFILE_REPORT"
88+
89+
buildStandaloneAndroid:
90+
name: Build Standalone Android
91+
runs-on: ubuntu-latest-xl
92+
steps:
93+
- name: Checkout
94+
uses: actions/checkout@v4
95+
with:
96+
token: ${{ secrets.OS_BOTIFY_TOKEN }}
97+
98+
- name: Configure MapBox SDK
99+
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}
100+
101+
- name: Setup Node
102+
id: setup-node
103+
uses: ./.github/actions/composite/setupNode
104+
with:
105+
IS_HYBRID_BUILD: 'false'
106+
107+
- name: Decrypt keystore to sign the APK/AAB
108+
run: gpg --batch --yes --decrypt --passphrase="${{ secrets.LARGE_SECRET_PASSPHRASE }}" --output my-upload-key.keystore my-upload-key.keystore.gpg
109+
working-directory: android/app
110+
111+
- name: Build Android Release
112+
working-directory: android
113+
env:
114+
MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.MYAPP_UPLOAD_STORE_PASSWORD }}
115+
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }}
116+
run: |
117+
./gradlew --profile assembleProductionRelease
118+
119+
echo "Printing Gradle profile report:"
120+
# Print the latest generated profile report
121+
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
122+
cat "$PROFILE_REPORT"

0 commit comments

Comments
 (0)