Skip to content

Commit 62fdc63

Browse files
committed
Merge branch 'main' into fix-implement-custom-fields
2 parents c5943e1 + d391099 commit 62fdc63

File tree

508 files changed

+10178
-4466
lines changed

Some content is hidden

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

508 files changed

+10178
-4466
lines changed

.github/ISSUE_TEMPLATE/Accessibility.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ What can we do to fix the issue?
3535
Check off any platforms that are affected by this issue
3636
--->
3737
Which of our officially supported platforms is this issue occurring on? Please only tick the box if you have provided a screen-recording in the thread for each platform:
38-
- [ ] Android: Native
38+
- [ ] Android: App
3939
- [ ] Android: mWeb Chrome
40-
- [ ] iOS: Native
40+
- [ ] iOS: App
4141
- [ ] iOS: mWeb Safari
42+
- [ ] iOS: mWeb Chrome
43+
- [ ] Windows: Chrome
4244
- [ ] MacOS: Chrome / Safari
4345
- [ ] MacOS: Desktop
4446

.github/ISSUE_TEMPLATE/Performance.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ Note: These should be the same as the benchmarks collected before any changes.
2525

2626
## Platforms:
2727
Select the officially supported platforms where the issue was reproduced:
28-
- [ ] Android: Standalone
29-
- [ ] Android: HybridApp
28+
- [ ] Android: App
3029
- [ ] Android: mWeb Chrome
31-
- [ ] iOS: Standalone
32-
- [ ] iOS: HybridApp
30+
- [ ] iOS: App
3331
- [ ] iOS: mWeb Safari
32+
- [ ] iOS: mWeb Chrome
3433
- [ ] Windows: Chrome
3534
- [ ] MacOS: Chrome / Safari
3635
- [ ] MacOS: Desktop
@@ -39,12 +38,11 @@ Select the officially supported platforms where the issue was reproduced:
3938
<summary>Platforms Tested:</summary>
4039
On which of our officially supported platforms was this issue tested:
4140

42-
- [ ] Android: Standalone
43-
- [ ] Android: HybridApp
41+
- [ ] Android: App
4442
- [ ] Android: mWeb Chrome
45-
- [ ] iOS: Standalone
46-
- [ ] iOS: HybridApp
43+
- [ ] iOS: App
4744
- [ ] iOS: mWeb Safari
45+
- [ ] iOS: mWeb Chrome
4846
- [ ] Windows: Chrome
4947
- [ ] MacOS: Chrome / Safari
5048
- [ ] MacOS: Desktop

.github/ISSUE_TEMPLATE/Standard.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ ___
1010
**Version Number:**
1111
**Reproducible in staging?:**
1212
**Reproducible in production?:**
13-
**If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:**
1413
**If this was caught during regression testing, add the test name, ID and link from TestRail:**
1514
**Email or phone of affected tester (no customers):**
1615
**Logs:** https://stackoverflow.com/c/expensify/questions/4856
@@ -32,12 +31,11 @@ Can the user still use Expensify without this being fixed? Have you informed the
3231

3332
## Platforms:
3433
Select the officially supported platforms where the issue was reproduced:
35-
- [ ] Android: Standalone
36-
- [ ] Android: HybridApp
34+
- [ ] Android: App
3735
- [ ] Android: mWeb Chrome
38-
- [ ] iOS: Standalone
39-
- [ ] iOS: HybridApp
36+
- [ ] iOS: App
4037
- [ ] iOS: mWeb Safari
38+
- [ ] iOS: mWeb Chrome
4139
- [ ] Windows: Chrome
4240
- [ ] MacOS: Chrome / Safari
4341
- [ ] MacOS: Desktop
@@ -46,12 +44,11 @@ Select the officially supported platforms where the issue was reproduced:
4644
<summary>Platforms Tested:</summary>
4745
On which of our officially supported platforms was this issue tested:
4846

49-
- [ ] Android: Standalone
50-
- [ ] Android: HybridApp
47+
- [ ] Android: App
5148
- [ ] Android: mWeb Chrome
52-
- [ ] iOS: Standalone
53-
- [ ] iOS: HybridApp
49+
- [ ] iOS: App
5450
- [ ] iOS: mWeb Safari
51+
- [ ] iOS: mWeb Chrome
5552
- [ ] Windows: Chrome
5653
- [ ] MacOS: Chrome / Safari
5754
- [ ] MacOS: Desktop

.github/PULL_REQUEST_TEMPLATE.md

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
8787
- [ ] MacOS: Chrome / Safari
8888
- [ ] MacOS: Desktop
8989
- [ ] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
90+
- [ ] I verified there are no new alerts related to the `canBeMissing` param for `useOnyx`
9091
- [ ] I followed proper code patterns (see [Reviewing the code](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md#reviewing-the-code))
9192
- [ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. `toggleReport` and not `onIconClick`)
9293
- [ ] I verified that comments were added to code that is not self explanatory

.github/actions/composite/announceFailedWorkflowInSlack/action.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ inputs:
55
SLACK_WEBHOOK:
66
description: 'URL of the slack webhook'
77
required: true
8+
CHANNEL:
9+
description: 'Slack channel to post announcement in'
10+
required: false
11+
default: '#announce'
812

913
runs:
1014
using: composite
@@ -16,7 +20,7 @@ runs:
1620
fields: workflow, repo
1721
custom_payload: |
1822
{
19-
channel: '#announce',
23+
channel: '${{ inputs.CHANNEL }}',
2024
attachments: [{
2125
color: "#DB4545",
2226
pretext: `<!subteam^S4TJJ3PSL>`,
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
if [ -z "$GITHUB_TOKEN" ]; then
4+
echo "GITHUB_TOKEN env variable is not set"
5+
exit 1
6+
fi
7+
8+
if [[ "$IS_HYBRID_BUILD" == "true" ]]; then
9+
readonly PACKAGE="react-hybrid"
10+
else
11+
readonly PACKAGE="react-standalone"
12+
fi
13+
14+
VERSION="$(jq -r '.dependencies["react-native"]' package.json)"
15+
readonly VERSION
16+
17+
# List all versions of the package
18+
PACKAGE_VERSIONS="$(gh api "/orgs/Expensify/packages/maven/com.expensify.${PACKAGE}.react-android/versions" --paginate --jq '.[].name')"
19+
20+
# Filter only versions matching the base React Native version
21+
PACKAGE_VERSIONS="$(echo "$PACKAGE_VERSIONS" | grep "$VERSION")"
22+
23+
# Grab the highest patch version from there
24+
LATEST_PATCHED_VERSION="$(echo "$PACKAGE_VERSIONS" | sort | tail -n1)"
25+
26+
if [[ -n "$LATEST_PATCHED_VERSION" ]]; then
27+
PATCH_ITERATION=${LATEST_PATCHED_VERSION##*-}
28+
INCREMENTED_PATCH_ITERATION=$((PATCH_ITERATION + 1))
29+
echo "${VERSION}-${INCREMENTED_PATCH_ITERATION}"
30+
else
31+
echo "$VERSION-0"
32+
fi

.github/workflows/cherryPick.yml

+6-16
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
PULL_REQUEST_URL:
7-
description: The full URL of the Expensify/App pull request to cherry-pick
7+
description: The full URL of the E/App or E/Mobile-Expensify pull request to cherry-pick
88
required: true
99

1010
jobs:
@@ -43,9 +43,9 @@ jobs:
4343
submodules: true
4444
# Only fetch depth 0 for Mobile-Expensify, because it's a submodule and we need more history to cherry pick successfully
4545
fetch-depth: 0
46-
46+
4747
- name: Checkout staging branch without full history if cherry picking App
48-
if: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME == 'Expensify/App' }}
48+
if: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME == github.repository }}
4949
# v4
5050
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
5151
with:
@@ -77,21 +77,11 @@ jobs:
7777
SEMVER_LEVEL: "PATCH"
7878

7979
- name: Fetch history of relevant refs if cherry picking an App change
80-
if: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME == 'Expensify/App' }}
80+
if: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME == github.repository }}
8181
run: |
82-
# Temporary hack during transition when -staging suffix is being added to tags
83-
if git ls-remote origin refs/tags/${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} | grep -q . ; then
84-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
85-
else
86-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}-staging
87-
fi
82+
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
8883
cd Mobile-Expensify
89-
# Temporary hack during transition when -staging suffix is being added to tags
90-
if git ls-remote origin refs/tags/${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} | grep -q . ; then
91-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
92-
else
93-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}-staging
94-
fi
84+
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
9585
9686
- name: Get E/App version bump commit
9787
id: getVersionBumpCommit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
name: Publish React Native Android Artifacts
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- package.json
9+
- patches/react-native+*.patch
10+
- patches/@react-native+*.patch
11+
- Mobile-Expensify
12+
13+
jobs:
14+
publish:
15+
runs-on: ${{ github.repository_owner == 'Expensify' && 'ubuntu-latest-xl' || 'ubuntu-latest' }}
16+
strategy:
17+
matrix:
18+
is_hybrid: [true, false]
19+
steps:
20+
# v4
21+
- name: Checkout
22+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
23+
with:
24+
submodules: ${{ matrix.is_hybrid }}
25+
ref: ${{ github.event.before }}
26+
token: ${{ secrets.OS_BOTIFY_TOKEN }}
27+
28+
- name: Get previous App commit hash
29+
id: getOldAppHash
30+
run: echo "HASH=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
31+
32+
- name: Get previous Mobile-Expensify commit hash
33+
if: ${{ matrix.is_hybrid == 'true' }}
34+
id: getOldMobileExpensifyHash
35+
run: echo "HASH=$(git rev-parse :Mobile-Expensify)" >> "$GITHUB_OUTPUT"
36+
37+
- name: Get previous react-native version
38+
id: getOldVersion
39+
run: echo "VERSION=$(jq -r '.dependencies["react-native"]' package.json)" >> "$GITHUB_OUTPUT"
40+
41+
- name: Checkout new ref
42+
run: |
43+
git fetch origin ${{ github.event.after }} --depth=1
44+
git checkout ${{ github.event.after }}
45+
git submodule update
46+
47+
- name: Get new App commit hash
48+
id: getNewAppHash
49+
run: echo "HASH=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
50+
51+
- name: Get new Mobile-Expensify commit hash
52+
if: ${{ matrix.is_hybrid == 'true' }}
53+
id: getNewMobileExpensifyHash
54+
run: echo "HASH=$(git rev-parse :Mobile-Expensify)" >> "$GITHUB_OUTPUT"
55+
56+
- name: Get new react-native version
57+
id: getNewVersion
58+
run: echo "VERSION=$(jq -r '.dependencies["react-native"]' package.json)" >> "$GITHUB_OUTPUT"
59+
60+
- name: Check if version changed
61+
id: didVersionChange
62+
run: |
63+
readonly DID_VERSION_CHANGE=${{ steps.getOldVersion.outputs.VERSION != steps.getNewVersion.outputs.VERSION && 'true' || 'false' }}
64+
echo "DID_VERSION_CHANGE=$DID_VERSION_CHANGE" >> "$GITHUB_OUTPUT"
65+
if [[ "$DID_VERSION_CHANGE" == 'true' ]]; then
66+
echo "::notice::Detected react-native version bump (${{ steps.getOldVersion.outputs.VERSION }} -> ${{ steps.getNewVersion.outputs.VERSION }})"
67+
fi
68+
69+
- name: Check if patches changed
70+
id: didPatchesChange
71+
run: |
72+
if ! git diff --exit-code --name-only ${{ steps.getOldAppHash.outputs.HASH }}..${{ steps.getNewAppHash.outputs.HASH }} -- patches/react-native+*.patch patches/@react-native+*.patch; then
73+
echo "::notice::Detected changes in patches"
74+
echo "DID_PATCHES_CHANGE=true" >> "$GITHUB_OUTPUT"
75+
exit 0
76+
fi
77+
78+
if [[ '${{ matrix.is_hybrid }}' == 'true' ]]; then
79+
if ! git -C Mobile-Expensify diff --exit-code --name-only ${{ steps.getOldMobileExpensifyHash.outputs.HASH }}..${{ steps.getNewMobileExpensifyHash.outputs.HASH }} -- patches/react-native+*.patch patches/@react-native+*.patch; then
80+
echo "::notice::Detected changes in patches"
81+
echo "DID_PATCHES_CHANGE=true" >> "$GITHUB_OUTPUT"
82+
exit 0
83+
fi
84+
fi
85+
86+
echo "DID_PATCHES_CHANGE=false" >> "$GITHUB_OUTPUT"
87+
88+
- name: Check if we should build and publish the package
89+
id: shouldPublish
90+
run: |
91+
if [[ '${{ steps.didVersionChange.outputs.DID_VERSION_CHANGE }}' == 'true' || '${{ steps.didPatchesChange.outputs.DID_PATCHES_CHANGE }}' == 'true' ]]; then
92+
echo "SHOULD_PUBLISH=true" >> "$GITHUB_OUTPUT"
93+
else
94+
echo "::notice::No relevant changes, skipping publishing a new React Native build"
95+
echo "SHOULD_PUBLISH=false" >> "$GITHUB_OUTPUT"
96+
fi
97+
98+
- name: Setup Node
99+
if: ${{ steps.shouldPublish.outputs.SHOULD_PUBLISH == 'true' }}
100+
uses: ./.github/actions/composite/setupNode
101+
with:
102+
IS_HYBRID_BUILD: ${{ matrix.is_hybrid }}
103+
104+
# v4
105+
- name: Setup Java
106+
if: ${{ steps.shouldPublish.outputs.SHOULD_PUBLISH == 'true' }}
107+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
108+
with:
109+
distribution: oracle
110+
java-version: 17
111+
112+
# v4
113+
- name: Setup Gradle
114+
if: ${{ steps.shouldPublish.outputs.SHOULD_PUBLISH == 'true' }}
115+
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244
116+
117+
- name: Determine new patched RN version
118+
if: ${{ steps.shouldPublish.outputs.SHOULD_PUBLISH == 'true' }}
119+
id: getNewPatchedVersion
120+
run: echo "NEW_PATCHED_VERSION=$(./.github/scripts/getNewPatchedRNVersion.sh)" >> "$GITHUB_OUTPUT"
121+
env:
122+
GITHUB_TOKEN: ${{ github.token }}
123+
IS_HYBRID_BUILD: ${{ matrix.is_hybrid }}
124+
125+
- name: Build and publish RN artifacts
126+
if: ${{ steps.shouldPublish.outputs.SHOULD_PUBLISH == 'true' }}
127+
working-directory: ${{ matrix.is_hybrid == 'true' && 'Mobile-Expensify/Android' || 'android' }}
128+
run: |
129+
echo "Starting artifacts build for ${{ matrix.is_hybrid == 'true' && 'HybridApp' || 'NewDot Standalone' }}"
130+
echo "Version: ${{ env.PATCHED_VERSION }}"
131+
echo "Commit hash: ${{ env.COMMIT_HASH }}"
132+
export ORG_GRADLE_PROJECT_reactNativeArchitectures="armeabi-v7a,arm64-v8a,x86,x86_64"
133+
./gradlew buildReactNativeArtifacts -x lint -x test -x check
134+
./gradlew publishReactNativeArtifacts
135+
env:
136+
GH_PUBLISH_ACTOR: ${{ github.actor }}
137+
GH_PUBLISH_TOKEN: ${{ github.token }}
138+
IS_HYBRID_BUILD: ${{ matrix.is_hybrid }}
139+
PATCHED_VERSION: ${{ steps.getNewPatchedVersion.outputs.NEW_PATCHED_VERSION }}
140+
COMMIT_HASH: ${{ github.event.after }}
141+
142+
- name: Announce failed workflow in Slack
143+
if: ${{ failure() }}
144+
uses: ./.github/actions/composite/announceFailedWorkflowInSlack
145+
with:
146+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
147+
CHANNEL: '#expensify-open-source'

.github/workflows/testBuildHybrid.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ jobs:
125125
script: |
126126
if ('${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER}}') return '${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER}}';
127127
128-
if (!'${{ github.event.inputs.APP_PULL_REQUEST_NUMBER }}') return '';
128+
if (!'${{ github.event.inputs.APP_PULL_REQUEST_NUMBER }}' && !'${{ inputs.APP_PR_NUMBER }}') return '';
129129
130130
const pullRequest = await github.rest.pulls.get({
131131
owner: context.repo.owner,
132132
repo: context.repo.repo,
133-
pull_number: '${{ github.event.inputs.APP_PULL_REQUEST_NUMBER }}',
133+
pull_number: '${{ github.event.inputs.APP_PULL_REQUEST_NUMBER || inputs.APP_PR_NUMBER }}',
134134
});
135135
136136
const body = pullRequest.data.body;

Mobile-Expensify

android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009013200
118-
versionName "9.1.32-0"
117+
versionCode 1009013305
118+
versionName "9.1.33-5"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil
224224

225225
// Use the formatted alert message from the backend. Otherwise fallback on the message in the Onyx data.
226226
String message = alert != null ? alert : messageData.get("message").getList().get(0).getMap().get("text").getString();
227-
String roomName = payload.get("roomName") == null ? "" : payload.get("roomName").getString("");
227+
String subtitle = payload.get("subtitle") == null ? "" : payload.get("subtitle").getString("");
228228

229229
// Create the Person object who sent the latest report comment
230230
Bitmap personIcon = fetchIcon(context, avatar);
@@ -257,11 +257,11 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil
257257
}
258258

259259
// Conversational styling should be applied to groups chats, rooms, and any 1:1 chats with more than one notification (ensuring the large profile image is always shown)
260-
if (!roomName.isEmpty()) {
260+
if (!subtitle.isEmpty()) {
261261
// Create the messaging style notification builder for this notification, associating it with the person who sent the report comment
262262
messagingStyle
263263
.setGroupConversation(true)
264-
.setConversationTitle(roomName);
264+
.setConversationTitle(subtitle);
265265
}
266266
builder.setStyle(messagingStyle);
267267
builder.setShortcutId(accountID);

0 commit comments

Comments
 (0)