Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/dominictb/epsf-app into fix…
Browse files Browse the repository at this point in the history
…/46646
  • Loading branch information
dominictb committed Oct 23, 2024
2 parents 0386167 + faf48fc commit 33b1993
Show file tree
Hide file tree
Showing 125 changed files with 1,830 additions and 1,312 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,21 @@ jobs:
runs-on: ubuntu-latest
name: Find the baseline and delta refs, and check for an existing build artifact for that commit
outputs:
BASELINE_ARTIFACT_FOUND: ${{ steps.checkForExistingArtifact.outputs.ARTIFACT_FOUND }}
BASELINE_ARTIFACT_WORKFLOW_ID: ${{ steps.checkForExistingArtifact.outputs.ARTIFACT_WORKFLOW_ID }}
BASELINE_VERSION: ${{ steps.getMostRecentRelease.outputs.VERSION }}
BASELINE_REF: ${{ steps.getBaselineRef.outputs.BASELINE_REF }}
DELTA_REF: ${{ steps.getDeltaRef.outputs.DELTA_REF }}
IS_PR_MERGED: ${{ steps.getPullRequestDetails.outputs.IS_MERGED }}
steps:
- uses: actions/checkout@v4
with:
# The OS_BOTIFY_COMMIT_TOKEN is a personal access token tied to osbotify (we need a PAT to access the artifact API)
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}

- name: Get most recent release version
id: getMostRecentRelease
run: echo "VERSION=$(gh release list --limit 1 | awk '{ print $1 }')" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Check if there's an existing artifact for this baseline
id: checkForExistingArtifact
uses: ./.github/actions/javascript/getArtifactInfo
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
ARTIFACT_NAME: baseline-${{ steps.getMostRecentRelease.outputs.VERSION }}android-artifact-apk
fetch-depth: 0 # Fetches the entire history

- name: Skip build if there's already an existing artifact for the baseline
if: ${{ fromJSON(steps.checkForExistingArtifact.outputs.ARTIFACT_FOUND) }}
run: echo 'APK for baseline ${{ steps.getMostRecentRelease.outputs.VERSION }} already exists, reusing existing build'
- name: Determine "baseline ref" (prev merge commit)
id: getBaselineRef
run: |
previous_merge=$(git rev-list --merges HEAD~1 | head -n 1)
git checkout "$previous_merge"
echo "$previous_merge"
echo "BASELINE_REF=$previous_merge" >> "$GITHUB_OUTPUT"
- name: Get pull request details
id: getPullRequestDetails
Expand Down Expand Up @@ -84,15 +72,14 @@ jobs:
fi
buildBaseline:
name: Build apk from latest release as a baseline
name: Build apk from baseline
uses: ./.github/workflows/buildAndroid.yml
needs: prep
if: ${{ !fromJSON(needs.prep.outputs.BASELINE_ARTIFACT_FOUND) }}
secrets: inherit
with:
type: e2e
ref: ${{ needs.prep.outputs.BASELINE_VERSION }}
artifact-prefix: baseline-${{ needs.prep.outputs.BASELINE_VERSION }}
ref: ${{ needs.prep.outputs.BASELINE_REF }}
artifact-prefix: baseline-${{ needs.prep.outputs.BASELINE_REF }}

buildDelta:
name: Build apk from delta ref
Expand Down Expand Up @@ -127,9 +114,6 @@ jobs:
with:
name: ${{ needs.buildBaseline.outputs.APK_ARTIFACT_NAME }}
path: zip
# Set github-token only if the baseline was built in this workflow run:
github-token: ${{ needs.prep.outputs.BASELINE_ARTIFACT_WORKFLOW_ID && github.token }}
run-id: ${{ needs.prep.outputs.BASELINE_ARTIFACT_WORKFLOW_ID }}

# The downloaded artifact will be a file named "app-e2e-release.apk" so we have to rename it
- name: Rename baseline APK
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 1009005200
versionName "9.0.52-0"
versionCode 1009005205
versionName "9.0.52-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
Binary file modified ios/NewApp_AdHoc.mobileprovision.gpg
Binary file not shown.
Binary file added ios/NewApp_Development.mobileprovision.gpg
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.52.0</string>
<string>9.0.52.5</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.52.0</string>
<string>9.0.52.5</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.0.52</string>
<key>CFBundleVersion</key>
<string>9.0.52.0</string>
<string>9.0.52.5</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
4 changes: 2 additions & 2 deletions 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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "9.0.52-0",
"version": "9.0.52-5",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
79 changes: 72 additions & 7 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ const ROUTES = {
},
SETTINGS_DELEGATE_CONFIRM: {
route: 'settings/security/delegate/:login/role/:role/confirm',
getRoute: (login: string, role: string) => `settings/security/delegate/${encodeURIComponent(login)}/role/${role}/confirm` as const,
getRoute: (login: string, role: string, showValidateActionModal?: boolean) => {
const validateActionModalParam = showValidateActionModal ? `?showValidateActionModal=true` : '';
return `settings/security/delegate/${encodeURIComponent(login)}/role/${role}/confirm${validateActionModalParam}` as const;
},
},
SETTINGS_ABOUT: 'settings/about',
SETTINGS_APP_DOWNLOAD_LINKS: 'settings/about/app-download-links',
Expand Down Expand Up @@ -444,6 +447,54 @@ const ROUTES = {
getRoute: (action: IOUAction, iouType: IOUType, transactionID: string, reportID: string, backTo = '', reportActionID?: string) =>
getUrlWithBackToParam(`${action as string}/${iouType as string}/category/${transactionID}/${reportID}${reportActionID ? `/${reportActionID}` : ''}`, backTo),
},
SETTINGS_TAGS_ROOT: {
route: 'settings/:policyID/tags',
getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/tags`, backTo),
},
SETTINGS_TAGS_SETTINGS: {
route: 'settings/:policyID/tags/settings',
getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/tags/settings` as const, backTo),
},
SETTINGS_TAGS_EDIT: {
route: 'settings/:policyID/tags/:orderWeight/edit',
getRoute: (policyID: string, orderWeight: number, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/tags/${orderWeight}/edit` as const, backTo),
},
SETTINGS_TAG_CREATE: {
route: 'settings/:policyID/tags/new',
getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/tags/new` as const, backTo),
},
SETTINGS_TAG_EDIT: {
route: 'settings/:policyID/tag/:orderWeight/:tagName/edit',
getRoute: (policyID: string, orderWeight: number, tagName: string, backTo = '') =>
getUrlWithBackToParam(`settings/${policyID}/tag/${orderWeight}/${encodeURIComponent(tagName)}/edit` as const, backTo),
},
SETTINGS_TAG_SETTINGS: {
route: 'settings/:policyID/tag/:orderWeight/:tagName',
getRoute: (policyID: string, orderWeight: number, tagName: string, backTo = '') =>
getUrlWithBackToParam(`settings/${policyID}/tag/${orderWeight}/${encodeURIComponent(tagName)}` as const, backTo),
},
SETTINGS_TAG_APPROVER: {
route: 'settings/:policyID/tag/:orderWeight/:tagName/approver',
getRoute: (policyID: string, orderWeight: number, tagName: string, backTo = '') =>
getUrlWithBackToParam(`settings/${policyID}/tag/${orderWeight}/${encodeURIComponent(tagName)}/approver` as const, backTo),
},
SETTINGS_TAG_LIST_VIEW: {
route: 'settings/:policyID/tag-list/:orderWeight',
getRoute: (policyID: string, orderWeight: number, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/tag-list/${orderWeight}` as const, backTo),
},
SETTINGS_TAG_GL_CODE: {
route: 'settings/:policyID/tag/:orderWeight/:tagName/gl-code',
getRoute: (policyID: string, orderWeight: number, tagName: string, backTo = '') =>
getUrlWithBackToParam(`settings/${policyID}/tag/${orderWeight}/${encodeURIComponent(tagName)}/gl-code` as const, backTo),
},
SETTINGS_TAGS_IMPORT: {
route: 'settings/:policyID/tags/import',
getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/tags/import` as const, backTo),
},
SETTINGS_TAGS_IMPORTED: {
route: 'settings/:policyID/tags/imported',
getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/tags/imported` as const, backTo),
},
SETTINGS_CATEGORIES_ROOT: {
route: 'settings/:policyID/categories',
getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/categories`, backTo),
Expand All @@ -462,7 +513,25 @@ const ROUTES = {
},
SETTINGS_CATEGORY_EDIT: {
route: 'settings/:policyID/category/:categoryName/edit',
getRoute: (policyID: string, categoryName: string, backTo = '') => getUrlWithBackToParam(`settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/edit`, backTo),
getRoute: (policyID: string, categoryName: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/category/${encodeURIComponent(categoryName)}/edit`, backTo),
},
SETTINGS_CATEGORIES_IMPORT: {
route: 'settings/:policyID/categories/import',
getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/categories/import` as const, backTo),
},
SETTINGS_CATEGORIES_IMPORTED: {
route: 'settings/:policyID/categories/imported',
getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/categories/imported` as const, backTo),
},
SETTINGS_CATEGORY_PAYROLL_CODE: {
route: 'settings/:policyID/category/:categoryName/payroll-code',
getRoute: (policyID: string, categoryName: string, backTo = '') =>
getUrlWithBackToParam(`settings/${policyID}/category/${encodeURIComponent(categoryName)}/payroll-code` as const, backTo),
},
SETTINGS_CATEGORY_GL_CODE: {
route: 'settings/:policyID/category/:categoryName/gl-code',
getRoute: (policyID: string, categoryName: string, backTo = '') =>
getUrlWithBackToParam(`settings/${policyID}/category/${encodeURIComponent(categoryName)}/gl-code` as const, backTo),
},
MONEY_REQUEST_STEP_CURRENCY: {
route: ':action/:iouType/currency/:transactionID/:reportID/:pageIndex?',
Expand Down Expand Up @@ -514,10 +583,6 @@ const ROUTES = {
getRoute: (action: IOUAction, iouType: IOUType, orderWeight: number, transactionID: string, reportID: string, backTo = '', reportActionID?: string) =>
getUrlWithBackToParam(`${action as string}/${iouType as string}/tag/${orderWeight}/${transactionID}/${reportID}${reportActionID ? `/${reportActionID}` : ''}`, backTo),
},
SETTINGS_TAGS_ROOT: {
route: 'settings/:policyID/tags',
getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/tags`, backTo),
},
MONEY_REQUEST_STEP_WAYPOINT: {
route: ':action/:iouType/waypoint/:transactionID/:reportID/:pageIndex',
getRoute: (action: IOUAction, iouType: IOUType, transactionID: string, reportID?: string, pageIndex = '', backTo = '') =>
Expand Down Expand Up @@ -958,7 +1023,7 @@ const ROUTES = {
},
WORKSPACE_TAG_APPROVER: {
route: 'settings/workspaces/:policyID/tag/:orderWeight/:tagName/approver',
getRoute: (policyID: string, orderWeight: number, tagName: string) => `settings/workspaces/${policyID}/tag/${orderWeight}/${tagName}/approver` as const,
getRoute: (policyID: string, orderWeight: number, tagName: string) => `settings/workspaces/${policyID}/tag/${orderWeight}/${encodeURIComponent(tagName)}/approver` as const,
},
WORKSPACE_TAG_LIST_VIEW: {
route: 'settings/workspaces/:policyID/tag-list/:orderWeight',
Expand Down
19 changes: 18 additions & 1 deletion src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ const SCREENS = {
SEARCH_ADVANCED_FILTERS: 'SearchAdvancedFilters',
SEARCH_SAVED_SEARCH: 'SearchSavedSearch',
SETTINGS_CATEGORIES: 'SettingsCategories',
SETTINGS_TAGS: 'SettingsTags',
EXPENSIFY_CARD: 'ExpensifyCard',
DOMAIN_CARD: 'DomainCard',
RESTRICTED_ACTION: 'RestrictedAction',
Expand Down Expand Up @@ -244,6 +245,10 @@ const SCREENS = {
SETTINGS_CATEGORY_CREATE: 'Settings_Category_Create',
SETTINGS_CATEGORY_EDIT: 'Settings_Category_Edit',
SETTINGS_CATEGORIES_ROOT: 'Settings_Categories',
SETTINGS_CATEGORIES_IMPORT: 'Settings_Categories_Import',
SETTINGS_CATEGORIES_IMPORTED: 'Settings_Categories_Imported',
SETTINGS_CATEGORY_PAYROLL_CODE: 'Settings_Category_Payroll_Code',
SETTINGS_CATEGORY_GL_CODE: 'Settings_Category_GL_Code',
},
EXPENSIFY_CARD: {
EXPENSIFY_CARD_DETAILS: 'Expensify_Card_Details',
Expand All @@ -256,7 +261,19 @@ const SCREENS = {
DOMAIN_CARD_REPORT_FRAUD: 'Domain_Card_Report_Fraud',
},

SETTINGS_TAGS_ROOT: 'Settings_Tags',
SETTINGS_TAGS: {
SETTINGS_TAGS_ROOT: 'Settings_Tags',
SETTINGS_TAGS_SETTINGS: 'Settings_Tags_Settings',
SETTINGS_TAGS_EDIT: 'Settings_Tags_Edit',
SETTINGS_TAG_CREATE: 'Settings_Tag_Create',
SETTINGS_TAG_EDIT: 'Settings_Tag_Edit',
SETTINGS_TAG_SETTINGS: 'Settings_Tag_Settings',
SETTINGS_TAG_APPROVER: 'Settings_Tag_Approver',
SETTINGS_TAG_LIST_VIEW: 'Settings_Tag_List_View',
SETTINGS_TAG_GL_CODE: 'Settings_Tag_GL_Code',
SETTINGS_TAGS_IMPORT: 'Settings_Tags_Import',
SETTINGS_TAGS_IMPORTED: 'Settings_Tags_Imported',
},

REPORT_SETTINGS: {
ROOT: 'Report_Settings_Root',
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeaderWithBackButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ function HeaderWithBackButton({
</PressableWithoutFeedback>
</Tooltip>
)}
{shouldDisplaySearchRouter && <SearchButton style={styles.ml2} />}
</View>
{shouldDisplaySearchRouter && <SearchButton style={styles.mr5} />}
</View>
</View>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ImportSpreadsheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function ImportSpreedsheet({backTo, goTo}: ImportSpreedsheetProps) {
<View style={[styles.flex1, safeAreaPaddingBottomStyle]}>
<HeaderWithBackButton
title={translate('spreadsheet.importSpreadsheet')}
onBackButtonPress={() => Navigation.navigate(backTo)}
onBackButtonPress={() => Navigation.goBack(backTo)}
/>

<View style={[styles.flex1, styles.uploadFileView(isSmallScreenWidth)]}>
Expand Down
Loading

0 comments on commit 33b1993

Please sign in to comment.