Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into rodrigo-later-payment…
Browse files Browse the repository at this point in the history
…-type
  • Loading branch information
rlinoz committed Aug 2, 2024
2 parents 1640c67 + 49435db commit d4b3a47
Show file tree
Hide file tree
Showing 43 changed files with 280 additions and 105 deletions.
20 changes: 20 additions & 0 deletions .github/actions/composite/buildAndroidE2EAPK/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ inputs:
EXPENSIFY_PARTNER_PASSWORD_EMAIL:
description: The email address of the Expensify partner to use for the build
required: true
SLACK_WEBHOOK_URL:
description: 'URL of the slack webhook'
required: true

runs:
using: composite
Expand Down Expand Up @@ -75,6 +78,23 @@ runs:
env:
RUBYOPT: '-rostruct'

- name: Announce failed workflow in Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: custom
custom_payload: |
{
channel: '#e2e-announce',
attachments: [{
color: 'danger',
text: `🚧 ${process.env.AS_REPO} E2E APK build run failed on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}> workflow 🚧`,
}]
}
env:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }}

- name: Upload APK
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
EXPENSIFY_PARTNER_USER_ID: ${{ secrets.EXPENSIFY_PARTNER_USER_ID }}
EXPENSIFY_PARTNER_USER_SECRET: ${{ secrets.EXPENSIFY_PARTNER_USER_SECRET }}
EXPENSIFY_PARTNER_PASSWORD_EMAIL: ${{ secrets.EXPENSIFY_PARTNER_PASSWORD_EMAIL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
PATH_ENV_FILE: tests/e2e/.env.e2e

buildDelta:
Expand Down Expand Up @@ -137,6 +138,7 @@ jobs:
EXPENSIFY_PARTNER_USER_ID: ${{ secrets.EXPENSIFY_PARTNER_USER_ID }}
EXPENSIFY_PARTNER_USER_SECRET: ${{ secrets.EXPENSIFY_PARTNER_USER_SECRET }}
EXPENSIFY_PARTNER_PASSWORD_EMAIL: ${{ secrets.EXPENSIFY_PARTNER_PASSWORD_EMAIL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
PATH_ENV_FILE: tests/e2e/.env.e2edelta

runTestsInAWS:
Expand Down Expand Up @@ -239,7 +241,7 @@ jobs:
channel: '#e2e-announce',
attachments: [{
color: 'danger',
text: `💥 ${process.env.AS_REPO} E2E Test run failed failed on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}> workflow 💥`,
text: `💥 ${process.env.AS_REPO} E2E Test run failed on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}> workflow 💥`,
}]
}
env:
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009001509
versionName "9.0.15-9"
versionCode 1009001600
versionName "9.0.16-0"
// 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
11 changes: 11 additions & 0 deletions assets/images/filter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ If your group/room is Private, you can only share the chat link with other membe
{% include option.html value="desktop" %}
1. Open the chat group or room you want to invite someone to.
2. Click the room or group header.
3. Click **Share code**.
3. Click **Share**.
4. Copy the link or share the QR code.
- **Copy link**: Click **Copy URL** and paste the link into another chat, email, Slack, etc.
- **Share QR Code**: Present your device to another user so they can scan the QR code with their device.
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/new-expensify/chat/Leave-a-chat-room.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you wish to no longer be part of a chat room, you can leave the room. This me

{% include option.html value="mobile" %}
1. Open the chat room.
2. Tap the 3 dot menu icon in the top right and select **Leave**.
2. Tap the header and select **Leave**.
{% include end-option.html %}

{% include end-selector.html %}
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>9.0.15</string>
<string>9.0.16</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.15.9</string>
<string>9.0.16.0</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>9.0.15</string>
<string>9.0.16</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.15.9</string>
<string>9.0.16.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>9.0.15</string>
<string>9.0.16</string>
<key>CFBundleVersion</key>
<string>9.0.15.9</string>
<string>9.0.16.0</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.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "9.0.15-9",
"version": "9.0.16-0",
"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 Expand Up @@ -60,7 +60,7 @@
"workflow-test": "./workflow_tests/scripts/runWorkflowTests.sh",
"workflow-test:generate": "ts-node workflow_tests/utils/preGenerateTest.ts",
"setup-https": "mkcert -install && mkcert -cert-file config/webpack/certificate.pem -key-file config/webpack/key.pem dev.new.expensify.com localhost 127.0.0.1",
"e2e-test-runner-build": "ncc build tests/e2e/testRunner.ts -o tests/e2e/dist/",
"e2e-test-runner-build": "node --max-old-space-size=8192 node_modules/.bin/ncc build tests/e2e/testRunner.ts -o tests/e2e/dist/",
"react-compiler-healthcheck": "react-compiler-healthcheck --verbose",
"generate-search-parser": "peggy --format es -o src/libs/SearchParser/searchParser.js src/libs/SearchParser/searchParser.peggy "
},
Expand Down
4 changes: 2 additions & 2 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ const ROUTES = {
},
MONEY_REQUEST_STEP_CONFIRMATION: {
route: ':action/:iouType/confirmation/:transactionID/:reportID',
getRoute: (action: IOUAction, iouType: IOUType, transactionID: string, reportID: string) =>
`${action as string}/${iouType as string}/confirmation/${transactionID}/${reportID}` as const,
getRoute: (action: IOUAction, iouType: IOUType, transactionID: string, reportID: string, participantsAutoAssigned?: boolean) =>
`${action as string}/${iouType as string}/confirmation/${transactionID}/${reportID}${participantsAutoAssigned ? '?participantsAutoAssigned=true' : ''}` as const,
},
MONEY_REQUEST_STEP_AMOUNT: {
route: ':action/:iouType/amount/:transactionID/:reportID',
Expand Down
4 changes: 3 additions & 1 deletion src/components/ButtonWithDropdownMenu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type {MutableRefObject} from 'react';
import React, {useEffect, useRef, useState} from 'react';
import {View} from 'react-native';
import Button from '@components/Button';
Expand Down Expand Up @@ -48,6 +49,7 @@ function ButtonWithDropdownMenu<IValueType>({
const selectedItem = options[selectedItemIndex] || options[0];
const innerStyleDropButton = StyleUtils.getDropDownButtonHeight(buttonSize);
const isButtonSizeLarge = buttonSize === CONST.DROPDOWN_BUTTON_SIZE.LARGE;
const nullCheckRef = (ref: MutableRefObject<View | null>) => ref ?? null;

useEffect(() => {
if (!dropdownAnchor.current) {
Expand Down Expand Up @@ -149,7 +151,7 @@ function ButtonWithDropdownMenu<IValueType>({
onModalShow={onOptionsMenuShow}
onItemSelected={() => setIsMenuVisible(false)}
anchorPosition={popoverAnchorPosition}
anchorRef={dropdownAnchor}
anchorRef={nullCheckRef(dropdownAnchor)}
withoutOverlay
anchorAlignment={anchorAlignment}
headerText={menuHeaderText}
Expand Down
4 changes: 4 additions & 0 deletions src/components/HeaderWithBackButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ function HeaderWithBackButton({
horizontal: 0,
},
threeDotsMenuItems = [],
threeDotsMenuIcon,
threeDotsMenuIconFill,
shouldEnableDetailPageNavigation = false,
children = null,
shouldOverlayDots = false,
Expand Down Expand Up @@ -234,6 +236,8 @@ function HeaderWithBackButton({
{shouldShowPinButton && !!report && <PinButton report={report} />}
{shouldShowThreeDotsButton && (
<ThreeDotsMenu
icon={threeDotsMenuIcon}
iconFill={threeDotsMenuIconFill}
disabled={shouldDisableThreeDotsButton}
menuItems={threeDotsMenuItems}
onIconPress={onThreeDotsButtonPress}
Expand Down
6 changes: 6 additions & 0 deletions src/components/HeaderWithBackButton/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ type HeaderWithBackButtonProps = Partial<ChildrenProps> & {
/** The anchor position of the menu */
threeDotsAnchorPosition?: AnchorPosition;

/** Icon displayed on the right of the title */
threeDotsMenuIcon?: IconAsset;

/** The fill color to pass into the icon. */
threeDotsMenuIconFill?: string;

/** Whether we should show a close button */
shouldShowCloseButton?: boolean;

Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import ExpensifyLogoNew from '@assets/images/expensify-logo-new.svg';
import ExpensifyWordmark from '@assets/images/expensify-wordmark.svg';
import EyeDisabled from '@assets/images/eye-disabled.svg';
import Eye from '@assets/images/eye.svg';
import Filter from '@assets/images/filter.svg';
import Filters from '@assets/images/filters.svg';
import Flag from '@assets/images/flag.svg';
import FlagLevelOne from '@assets/images/flag_level_01.svg';
Expand Down Expand Up @@ -380,4 +381,5 @@ export {
QBOCircle,
Filters,
CalendarSolid,
Filter,
};
5 changes: 4 additions & 1 deletion src/components/KYCWall/BaseKYCWall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ function KYCWall({
Navigation.navigate(addDebitCardRoute);
} else if (paymentMethod === CONST.PAYMENT_METHODS.BUSINESS_BANK_ACCOUNT) {
if (iouReport && ReportUtils.isIOUReport(iouReport)) {
const policyID = Policy.createWorkspaceFromIOUPayment(iouReport);
const {policyID, workspaceChatReportID, reportPreviewReportActionID} = Policy.createWorkspaceFromIOUPayment(iouReport) ?? {};
if (workspaceChatReportID) {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(workspaceChatReportID, reportPreviewReportActionID));
}

// Navigate to the bank account set up flow for this specific policy
Navigation.navigate(ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.getRoute('', policyID));
Expand Down
6 changes: 6 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ export default {
value: 'Value',
downloadFailedTitle: 'Download failed',
downloadFailedDescription: "Your download couldn't be completed. Please try again later.",
filterLogs: 'Filter Logs',
network: 'Network',
reportID: 'Report ID',
},
location: {
Expand Down Expand Up @@ -2085,6 +2087,7 @@ export default {
letsDoubleCheck: "Let's double check that everything looks right.",
lineItemLevel: 'Line-item level',
reportLevel: 'Report level',
topLevel: 'Top level',
appliedOnExport: 'Not imported into Expensify, applied on export',
shareNote: {
header: 'Easily share your workspace with other members.',
Expand Down Expand Up @@ -3212,9 +3215,12 @@ export default {
return 'Marking NetSuite bills and invoices as paid';
case 'intacctCheckConnection':
return 'Checking Sage Intacct connection';
case 'intacctImportDimensions':
return 'Importing Sage Intacct dimensions';
case 'intacctImportTitle':
return 'Importing Sage Intacct data';
default: {
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
return `Translation missing for stage: ${stage}`;
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ export default {
value: 'Valor',
downloadFailedTitle: 'Error en la descarga',
downloadFailedDescription: 'No se pudo completar la descarga. Por favor, inténtalo más tarde.',
filterLogs: 'Registros de filtrado',
network: 'La red',
reportID: 'ID del informe',
},
connectionComplete: {
Expand Down Expand Up @@ -2133,6 +2135,7 @@ export default {
reuseExistingConnection: 'Reutilizar la conexión existente',
existingConnections: 'Conexiones existentes',
lastSyncDate: (connectionName: string, formattedDate: string) => `${connectionName} - Última sincronización ${formattedDate}`,
topLevel: 'Nivel superior',
},
qbo: {
importDescription: 'Elige que configuraciónes de codificación son importadas desde QuickBooks Online a Expensify.',
Expand Down
12 changes: 6 additions & 6 deletions src/libs/Console/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function logMessage(args: unknown[]) {
return String(arg);
})
.join(' ');
const newLog = {time: new Date(), level: CONST.DEBUG_CONSOLE.LEVELS.INFO, message};
const newLog = {time: new Date(), level: CONST.DEBUG_CONSOLE.LEVELS.INFO, message, extraData: ''};
addLog(newLog);
}

Expand Down Expand Up @@ -105,15 +105,15 @@ function createLog(text: string) {

if (result !== undefined) {
return [
{time, level: CONST.DEBUG_CONSOLE.LEVELS.INFO, message: `> ${text}`},
{time, level: CONST.DEBUG_CONSOLE.LEVELS.RESULT, message: String(result)},
{time, level: CONST.DEBUG_CONSOLE.LEVELS.INFO, message: `> ${text}`, extraData: ''},
{time, level: CONST.DEBUG_CONSOLE.LEVELS.RESULT, message: String(result), extraData: ''},
];
}
return [{time, level: CONST.DEBUG_CONSOLE.LEVELS.INFO, message: `> ${text}`}];
return [{time, level: CONST.DEBUG_CONSOLE.LEVELS.INFO, message: `> ${text}`, extraData: ''}];
} catch (error) {
return [
{time, level: CONST.DEBUG_CONSOLE.LEVELS.ERROR, message: `> ${text}`},
{time, level: CONST.DEBUG_CONSOLE.LEVELS.ERROR, message: `Error: ${(error as Error).message}`},
{time, level: CONST.DEBUG_CONSOLE.LEVELS.ERROR, message: `> ${text}`, extraData: ''},
{time, level: CONST.DEBUG_CONSOLE.LEVELS.ERROR, message: `Error: ${(error as Error).message}`, extraData: ''},
];
}
}
Expand Down
15 changes: 8 additions & 7 deletions src/libs/Log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {Merge} from 'type-fest';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import pkg from '../../package.json';
import {addLog} from './actions/Console';
import {addLog, flushAllLogsOnAppLaunch} from './actions/Console';
import {shouldAttachLog} from './Console';
import getPlatform from './getPlatform';
import * as Network from './Network';
Expand Down Expand Up @@ -66,16 +66,17 @@ function serverLoggingCallback(logger: Logger, params: ServerLoggingCallbackOpti
// callback methods are passed in here so we can decouple the logging library from the logging methods.
const Log = new Logger({
serverLoggingCallback,
clientLoggingCallback: (message) => {
clientLoggingCallback: (message, extraData) => {
if (!shouldAttachLog(message)) {
return;
}

console.debug(message);

if (shouldCollectLogs) {
addLog({time: new Date(), level: CONST.DEBUG_CONSOLE.LEVELS.DEBUG, message});
}
flushAllLogsOnAppLaunch().then(() => {
console.debug(message, extraData);
if (shouldCollectLogs) {
addLog({time: new Date(), level: CONST.DEBUG_CONSOLE.LEVELS.DEBUG, message, extraData});
}
});
},
isDebug: true,
});
Expand Down
Loading

0 comments on commit d4b3a47

Please sign in to comment.