Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/tienifr/App into fix/42117
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Jul 15, 2024
2 parents 920dc1d + 77d95c5 commit a02e906
Show file tree
Hide file tree
Showing 80 changed files with 991 additions and 280 deletions.
2 changes: 1 addition & 1 deletion .github/actions/composite/buildAndroidE2EAPK/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ runs:
shell: bash

- name: Upload APK
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.ARTIFACT_NAME }}
path: ${{ inputs.APP_OUTPUT_PATH }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
run: mkdir zip

- name: Download baseline APK
uses: actions/download-artifact@348754975ef0295bfa2c111cba996120cfdf8a5d
uses: actions/download-artifact@v4
id: downloadBaselineAPK
with:
name: baseline-apk-${{ needs.buildBaseline.outputs.VERSION }}
Expand All @@ -170,7 +170,7 @@ jobs:
run: mv "${{steps.downloadBaselineAPK.outputs.download-path}}/app-e2e-release.apk" "${{steps.downloadBaselineAPK.outputs.download-path}}/app-e2eRelease.apk"

- name: Download delta APK
uses: actions/download-artifact@348754975ef0295bfa2c111cba996120cfdf8a5d
uses: actions/download-artifact@v4
id: downloadDeltaAPK
with:
name: delta-apk-${{ needs.buildDelta.outputs.DELTA_REF }}
Expand All @@ -184,7 +184,7 @@ jobs:

- name: Copy e2e code into zip folder
run: cp tests/e2e/dist/index.js zip/testRunner.ts

- name: Copy profiler binaries into zip folder
run: cp -r node_modules/@perf-profiler/android/cpp-profiler/bin zip/bin

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ jobs:
VERSION: ${{ env.VERSION_CODE }}

- name: Archive Android sourcemaps
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: android-sourcemap-${{ github.ref_name }}
path: android/app/build/generated/sourcemaps/react/productionRelease/index.android.bundle.map

- name: Upload Android version to GitHub artifacts
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: app-production-release.aab
path: android/app/build/outputs/bundle/productionRelease/app-production-release.aab
Expand Down Expand Up @@ -246,14 +246,14 @@ jobs:
APPLE_DEMO_PASSWORD: ${{ secrets.APPLE_DEMO_PASSWORD }}

- name: Archive iOS sourcemaps
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ios-sourcemap-${{ github.ref_name }}
path: main.jsbundle.map

- name: Upload iOS version to GitHub artifacts
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: New Expensify.ipa
path: /Users/runner/work/App/App/New Expensify.ipa
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }}

- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: android
path: ./android_paths.json
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
S3_REGION: us-east-1

- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ios
path: ./ios_paths.json
Expand Down Expand Up @@ -321,7 +321,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }}

- name: Download Artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
if: ${{ fromJSON(needs.validateActor.outputs.READY_TO_BUILD) }}

- name: Read JSONs with android paths
Expand Down
5 changes: 3 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fullstory {
org 'o-1WN56P-na1'
enabledVariants 'all'
logcatLevel 'debug'
recordOnStart false
}

react {
Expand Down Expand Up @@ -107,8 +108,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009000602
versionName "9.0.6-2"
versionCode 1009000603
versionName "9.0.6-3"
// 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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ description: Details on requesting the Expensify Card as an employee
To start using the Expensify Card, do the following:
1. **Enable Expensify Cards:** An admin must first enable the cards. Then, an admin can assign you a card by setting a limit, which allows access to the card.
2. **Request the Card:**
- If you haven’t been assigned a limit, look for the task on your account’s homepage that says, “Ask your admin for the card!” Use this task to message your admin team.
- If you haven’t been assigned a limit, look for the task on your account’s homepage that says, “Ask your admin for the card!”
- Completing that task will send an in-product notification to your admin team that you requested the card.
- Once you’re assigned a card limit, you’ll receive an email notification. Click the link in the email to provide your shipping address on your account’s homepage.
- Enter your address, and the physical card will be shipped within 3-5 business days.
3. **Activate the Card:** When your physical card arrives, activate it in Expensify by entering the last four digits of the card in the activation task on your homepage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Egencia controls the feed, so to connect Expensify you will need to:
# How to Connect to a Central Purchasing Account
Once your Egencia account manager has established the feed, you can automatically forward all Egencia booking receipts to a single Expensify account. To do this:
1. Open a chat with Concierge.
2. Tell Concierge “Please enable Central Purchasing Account for our Egencia feed. The account email is: xxx@yourdomain.com”.
2. Tell Concierge the address of your central purchasing account, “Please enable Central Purchasing Account for our Egencia feed. The account email is: xxx@yourdomain.com”.

The receipt the traveler receives is a "reservation expense." Reservation expenses are non-reimbursable and won’t be included in any integrated accounting system exports. The reservation sent to the traveler's account is added to their mobile app Trips feature so that the traveler can easily keep tabs on upcoming travel and receive trip notifications.
A receipt will be sent to both the traveler and the central account. The receipt sent to the traveler is a "reservation expense." Reservation expenses are non-reimbursable and won’t be included in any integrated accounting system exports.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Expensify Travel demo video
description: Check out a demo of Expensify Travel
---

Check out a video of how Expensify Travel works below:

<iframe src="https://drive.google.com/file/d/125j1iFdce9VP6VkDZ609TrfaaSMzdc8M/preview" allowfullscreen width="560" height="315" allow="autoplay"></iframe>
4 changes: 3 additions & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.6.2</string>
<string>9.0.6.3</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
<string>o-1WN56P-na1</string>
<key>RecordOnStart</key>
<false/>
</dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
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.6.2</string>
<string>9.0.6.3</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.6</string>
<key>CFBundleVersion</key>
<string>9.0.6.2</string>
<string>9.0.6.3</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.6-2",
"version": "9.0.6-3",
"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
3 changes: 2 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ const CONST = {
VERIFICATION_MAX_ATTEMPTS: 7,
STATE: {
VERIFYING: 'VERIFYING',
VALIDATING: 'VALIDATING',
SETUP: 'SETUP',
PENDING: 'PENDING',
OPEN: 'OPEN',
},
Expand All @@ -361,7 +363,6 @@ const CONST = {
DEFAULT_ROOMS: 'defaultRooms',
VIOLATIONS: 'violations',
DUPE_DETECTION: 'dupeDetection',
REPORT_FIELDS: 'reportFields',
P2P_DISTANCE_REQUESTS: 'p2pDistanceRequests',
WORKFLOWS_DELAYED_SUBMISSION: 'workflowsDelayedSubmission',
SPOTNANA_TRAVEL: 'spotnanaTravel',
Expand Down
4 changes: 4 additions & 0 deletions src/Expensify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import * as Report from './libs/actions/Report';
import * as User from './libs/actions/User';
import * as ActiveClientManager from './libs/ActiveClientManager';
import BootSplash from './libs/BootSplash';
import FS from './libs/Fullstory';
import * as Growl from './libs/Growl';
import Log from './libs/Log';
import migrateOnyx from './libs/migrateOnyx';
Expand Down Expand Up @@ -147,6 +148,9 @@ function Expensify({
// Initialize this client as being an active client
ActiveClientManager.init();

// Initialize Fullstory lib
FS.init();

// Used for the offline indicator appearing when someone is offline
const unsubscribeNetInfo = NetworkConnection.subscribeToNetInfo();

Expand Down
15 changes: 14 additions & 1 deletion src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,10 +676,15 @@ const ROUTES = {
route: 'settings/workspaces/:policyID/accounting/quickbooks-online/invoice-account-selector',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/quickbooks-online/invoice-account-selector` as const,
},
WORKSPACE_ACCOUNTING_RECONCILIATION_ACCOUNT_SETTINGS: {
WORKSPACE_ACCOUNTING_CARD_RECONCILIATION: {
route: 'settings/workspaces/:policyID/accounting/:connection/card-reconciliation',
getRoute: (policyID: string, connection: ValueOf<typeof CONST.POLICY.CONNECTIONS.NAME>) => `settings/workspaces/${policyID}/accounting/${connection}/card-reconciliation` as const,
},
WORKSPACE_ACCOUNTING_RECONCILIATION_ACCOUNT_SETTINGS: {
route: 'settings/workspaces/:policyID/accounting/:connection/card-reconciliation/account',
getRoute: (policyID: string, connection: ValueOf<typeof CONST.POLICY.CONNECTIONS.NAME>) =>
`settings/workspaces/${policyID}/accounting/${connection}/card-reconciliation/account` as const,
},
WORKSPACE_CATEGORIES: {
route: 'settings/workspaces/:policyID/categories',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/categories` as const,
Expand All @@ -704,6 +709,10 @@ const ROUTES = {
route: 'settings/workspaces/:policyID/categories/:categoryName/edit',
getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/edit` as const,
},
WORKSPACE_CATEGORY_PAYROLL_CODE: {
route: 'settings/workspaces/:policyID/categories/:categoryName/payroll-code',
getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/payroll-code` as const,
},
WORKSPACE_CATEGORY_GL_CODE: {
route: 'settings/workspaces/:policyID/categories/:categoryName/gl-code',
getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/gl-code` as const,
Expand Down Expand Up @@ -842,6 +851,10 @@ const ROUTES = {
route: 'settings/workspaces/:policyID/expensify-card/issue-new',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/expensify-card/issue-new` as const,
},
WORKSPACE_EXPENSIFY_CARD_BANK_ACCOUNT: {
route: 'settings/workspaces/:policyID/expensify-card/choose-bank-account',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/expensify-card/choose-bank-account` as const,
},
WORKSPACE_DISTANCE_RATES: {
route: 'settings/workspaces/:policyID/distance-rates',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/distance-rates` as const,
Expand Down
3 changes: 3 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ const SCREENS = {
SAGE_INTACCT_NON_REIMBURSABLE_CREDIT_CARD_ACCOUNT: 'Policy_Accounting_Sage_Intacct_Non_Reimbursable_Credit_Card_Account',
SAGE_INTACCT_ADVANCED: 'Policy_Accounting_Sage_Intacct_Advanced',
SAGE_INTACCT_PAYMENT_ACCOUNT: 'Policy_Accounting_Sage_Intacct_Payment_Account',
CARD_RECONCILIATION: 'Policy_Accounting_Card_Reconciliation',
RECONCILIATION_ACCOUNT_SETTINGS: 'Policy_Accounting_Reconciliation_Account_Settings',
},
INITIAL: 'Workspace_Initial',
Expand All @@ -341,6 +342,7 @@ const SCREENS = {
RATE_AND_UNIT_UNIT: 'Workspace_RateAndUnit_Unit',
EXPENSIFY_CARD: 'Workspace_ExpensifyCard',
EXPENSIFY_CARD_ISSUE_NEW: 'Workspace_ExpensifyCard_New',
EXPENSIFY_CARD_BANK_ACCOUNT: 'Workspace_ExpensifyCard_BankAccount',
BILLS: 'Workspace_Bills',
INVOICES: 'Workspace_Invoices',
TRAVEL: 'Workspace_Travel',
Expand Down Expand Up @@ -385,6 +387,7 @@ const SCREENS = {
NAME: 'Workspace_Profile_Name',
CATEGORY_CREATE: 'Category_Create',
CATEGORY_EDIT: 'Category_Edit',
CATEGORY_PAYROLL_CODE: 'Category_Payroll_Code',
CATEGORY_GL_CODE: 'Category_GL_Code',
CATEGORY_SETTINGS: 'Category_Settings',
CATEGORIES_SETTINGS: 'Categories_Settings',
Expand Down
14 changes: 13 additions & 1 deletion src/components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {useIsFocused} from '@react-navigation/native';
import type {ForwardedRef} from 'react';
import React, {useCallback, useMemo} from 'react';
import React, {useCallback, useMemo, useState} from 'react';
import type {GestureResponderEvent, StyleProp, TextStyle, ViewStyle} from 'react-native';
import {ActivityIndicator, View} from 'react-native';
import Icon from '@components/Icon';
Expand Down Expand Up @@ -89,6 +89,9 @@ type ButtonProps = Partial<ChildrenProps> & {
/** Whether we should use the danger theme color */
danger?: boolean;

/** Whether we should display the button as a link */
link?: boolean;

/** Should we remove the right border radius top + bottom? */
shouldRemoveRightBorderRadius?: boolean;

Expand Down Expand Up @@ -205,6 +208,7 @@ function Button(
id = '',
accessibilityLabel = '',
isSplitButton = false,
link = false,
isContentCentered = false,
...rest
}: ButtonProps,
Expand All @@ -213,6 +217,7 @@ function Button(
const theme = useTheme();
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const [isHovered, setIsHovered] = useState(false);

const renderContent = () => {
if ('children' in rest) {
Expand All @@ -233,6 +238,10 @@ function Button(
danger && styles.buttonDangerText,
!!icon && styles.textAlignLeft,
textStyles,
link && styles.link,
link && isHovered && StyleUtils.getColorStyle(theme.linkHover),
link && styles.fontWeightNormal,
link && styles.fontSizeLabel,
]}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
>
Expand Down Expand Up @@ -343,6 +352,7 @@ function Button(
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
text && shouldShowRightIcon ? styles.alignItemsStretch : undefined,
innerStyles,
link && styles.bgTransparent,
]}
hoverStyle={[
shouldUseDefaultHover && !isDisabled ? styles.buttonDefaultHovered : undefined,
Expand All @@ -353,6 +363,8 @@ function Button(
accessibilityLabel={accessibilityLabel}
role={CONST.ROLE.BUTTON}
hoverDimmingValue={1}
onHoverIn={() => setIsHovered(true)}
onHoverOut={() => setIsHovered(false)}
>
{renderContent()}
{isLoading && (
Expand Down
11 changes: 5 additions & 6 deletions src/components/Composer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,11 @@ function Composer(
}, [shouldClear, onClear]);

useEffect(() => {
setSelection((prevSelection) => {
if (!!prevSelection && selectionProp.start === prevSelection.start && selectionProp.end === prevSelection.end) {
return;
}
return selectionProp;
});
if (!!selection && selectionProp.start === selection.start && selectionProp.end === selection.end) {
return;
}
setSelection(selectionProp);
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
}, [selectionProp]);

/**
Expand Down
Loading

0 comments on commit a02e906

Please sign in to comment.