Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Expensify/App into fix/37517
Browse files Browse the repository at this point in the history
  • Loading branch information
ikevin127 committed Mar 2, 2024
2 parents 36a4563 + af68510 commit 0e370c0
Show file tree
Hide file tree
Showing 61 changed files with 536 additions and 178 deletions.
4 changes: 2 additions & 2 deletions .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ runs:
desktop/package-lock.json
- id: cache-node-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json', 'patches/**') }}

- id: cache-desktop-node-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: desktop/node_modules
key: ${{ runner.os }}-desktop-node-modules-${{ hashFiles('desktop/package-lock.json', 'desktop/patches/**') }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
type: string
required: true

concurrency:
group: "${{ github.ref }}-e2e"
cancel-in-progress: true

jobs:
buildBaseline:
runs-on: ubuntu-latest-xl
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ on:
branches-ignore: [staging, production]
paths: ['**.js', '**.ts', '**.tsx', '**.json', '**.mjs', '**.cjs', 'config/.editorconfig', '.watchmanconfig', '.imgbotconfig']

concurrency:
group: "${{ github.ref }}-lint"
cancel-in-progress: true

jobs:
lint:
name: Run ESLint
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:
bundler-cache: true

- name: Cache Pod dependencies
uses: actions/cache@v3
uses: actions/cache@v4
id: pods-cache
with:
path: ios/Pods
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
branches-ignore: [staging, production]
paths: ['**.js', '**.ts', '**.tsx', '**.sh', 'package.json', 'package-lock.json']

concurrency:
group: "${{ github.ref }}-jest"
cancel-in-progress: true

jobs:
jest:
if: ${{ github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' || github.event_name == 'workflow_call' }}
Expand All @@ -31,7 +35,7 @@ jobs:

- name: Cache Jest cache
id: cache-jest-cache
uses: actions/cache@ac25611caef967612169ab7e95533cf932c32270
uses: actions/cache@v4
with:
path: .jest-cache
key: ${{ runner.os }}-jest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:
bundler-cache: true

- name: Cache Pod dependencies
uses: actions/cache@v3
uses: actions/cache@v4
id: pods-cache
with:
path: ios/Pods
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001044600
versionName "1.4.46-0"
versionCode 1001044601
versionName "1.4.46-1"
}

flavorDimensions "default"
Expand Down
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>1.4.46.0</string>
<string>1.4.46.1</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</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>1.4.46.0</string>
<string>1.4.46.1</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>1.4.46</string>
<key>CFBundleVersion</key>
<string>1.4.46.0</string>
<string>1.4.46.1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
},
testEnvironment: 'jsdom',
setupFiles: ['<rootDir>/jest/setup.ts', './node_modules/@react-native-google-signin/google-signin/jest/build/setup.js'],
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect', '<rootDir>/jest/setupAfterEnv.ts', '<rootDir>/tests/perf-test/setupAfterEnv.js'],
setupFilesAfterEnv: ['<rootDir>/jest/setupAfterEnv.ts', '<rootDir>/tests/perf-test/setupAfterEnv.js'],
cacheDirectory: '<rootDir>/.jest-cache',
moduleNameMapper: {
'\\.(lottie)$': '<rootDir>/__mocks__/fileMock.ts',
Expand Down
3 changes: 3 additions & 0 deletions jest/setupAfterEnv.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
// This is required in order for jest to recognize custom matchers like toBeDisabled. This can be removed once testing-library/react-native version is bumped to v12.4 or later
import '@testing-library/jest-native/extend-expect';

jest.useRealTimers();
45 changes: 19 additions & 26 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": "1.4.46-0",
"version": "1.4.46-1",
"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 @@ -250,7 +250,7 @@
"css-loader": "^6.7.2",
"diff-so-fancy": "^1.3.0",
"dotenv": "^16.0.3",
"electron": "^26.6.8",
"electron": "^29.0.0",
"electron-builder": "24.6.4",
"eslint": "^7.6.0",
"eslint-config-airbnb-typescript": "^17.1.0",
Expand Down
5 changes: 5 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ const CONST = {
DOMAIN_ALL: 'domainAll',
POLICY_ROOM: 'policyRoom',
POLICY_EXPENSE_CHAT: 'policyExpenseChat',
SELF_DM: 'selfDM',
},
WORKSPACE_CHAT_ROOMS: {
ANNOUNCE: '#announce',
Expand Down Expand Up @@ -3338,6 +3339,10 @@ const CONST = {
SESSION_STORAGE_KEYS: {
INITIAL_URL: 'INITIAL_URL',
},

AUTH_TOKEN_TYPE: {
ANONYMOUS: 'anonymousAccount',
},
} as const;

type Country = keyof typeof CONST.ALL_COUNTRIES;
Expand Down
4 changes: 4 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,10 @@ const ROUTES = {
route: 'workspace/:policyID/workflows',
getRoute: (policyID: string) => `workspace/${policyID}/workflows` as const,
},
WORKSPACE_WORKFLOWS_APPROVER: {
route: 'workspace/:policyID/settings/workflows/approver',
getRoute: (policyId: string) => `workspace/${policyId}/settings/workflows/approver` as const,
},
WORKSPACE_WORKFLOWS_AUTOREPORTING_FREQUENCY: {
route: 'workspace/:policyID/settings/workflows/auto-reporting-frequency',
getRoute: (policyID: string) => `workspace/${policyID}/settings/workflows/auto-reporting-frequency` as const,
Expand Down
1 change: 1 addition & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ const SCREENS = {
CATEGORIES: 'Workspace_Categories',
CURRENCY: 'Workspace_Profile_Currency',
WORKFLOWS: 'Workspace_Workflows',
WORKFLOWS_APPROVER: 'Workspace_Workflows_Approver',
WORKFLOWS_AUTO_REPORTING_FREQUENCY: 'Workspace_Workflows_Auto_Reporting_Frequency',
WORKFLOWS_AUTO_REPORTING_MONTHLY_OFFSET: 'Workspace_Workflows_Auto_Reporting_Monthly_Offset',
DESCRIPTION: 'Workspace_Profile_Description',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function FocusModeNotification() {
<Text>
{translate('focusModeUpdateModal.prompt')}
<TextLinkWithRef
href={href}
style={styles.link}
onPress={() => {
User.clearFocusModeNotification();
Expand Down
3 changes: 3 additions & 0 deletions src/components/OptionsSelector/index.android.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React, {forwardRef} from 'react';
import BaseOptionsSelector from './BaseOptionsSelector';

/**
* @deprecated Please use `SelectionList` instead.
*/
const OptionsSelector = forwardRef((props, ref) => (
<BaseOptionsSelector
// eslint-disable-next-line react/jsx-props-no-spreading
Expand Down
3 changes: 3 additions & 0 deletions src/components/OptionsSelector/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React, {forwardRef} from 'react';
import BaseOptionsSelector from './BaseOptionsSelector';

/**
* @deprecated Please use `SelectionList` instead.
*/
const OptionsSelector = forwardRef((props, ref) => (
<BaseOptionsSelector
// eslint-disable-next-line react/jsx-props-no-spreading
Expand Down
27 changes: 22 additions & 5 deletions src/components/ReportWelcomeText.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, {useMemo} from 'react';
import {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
Expand Down Expand Up @@ -35,7 +35,8 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP
const styles = useThemeStyles();
const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(report);
const isChatRoom = ReportUtils.isChatRoom(report);
const isDefault = !(isChatRoom || isPolicyExpenseChat);
const isSelfDM = ReportUtils.isSelfDM(report);
const isDefault = !(isChatRoom || isPolicyExpenseChat || isSelfDM);
const participantAccountIDs = report?.participantAccountIDs ?? [];
const isMultipleParticipant = participantAccountIDs.length > 1;
const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(OptionsListUtils.getPersonalDetailsForAccountIDs(participantAccountIDs, personalDetails), isMultipleParticipant);
Expand All @@ -44,6 +45,7 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP
const moneyRequestOptions = ReportUtils.getMoneyRequestOptions(report, policy, participantAccountIDs);
const additionalText = moneyRequestOptions.map((item) => translate(`reportActionsView.iouTypes.${item}`)).join(', ');
const canEditPolicyDescription = ReportUtils.canEditPolicyDescription(policy);
const reportName = ReportUtils.getReportName(report);

const navigateToReport = () => {
if (!report?.reportID) {
Expand All @@ -53,12 +55,22 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP
Navigation.navigate(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(report.reportID));
};

const welcomeHeroText = useMemo(() => {
if (isChatRoom) {
return translate('reportActionsView.welcomeToRoom', {roomName: reportName});
}

if (isSelfDM) {
return translate('reportActionsView.yourSpace');
}

return translate('reportActionsView.sayHello');
}, [isChatRoom, isSelfDM, translate, reportName]);

return (
<>
<View>
<Text style={[styles.textHero]}>
{isChatRoom ? translate('reportActionsView.welcomeToRoom', {roomName: ReportUtils.getReportName(report)}) : translate('reportActionsView.sayHello')}
</Text>
<Text style={[styles.textHero]}>{welcomeHeroText}</Text>
</View>
<View style={[styles.mt3, styles.mw100]}>
{isPolicyExpenseChat &&
Expand Down Expand Up @@ -114,6 +126,11 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP
{roomWelcomeMessage.phrase2 !== undefined && <Text>{roomWelcomeMessage.phrase2}</Text>}
</Text>
))}
{isSelfDM && (
<Text>
<Text>{translate('reportActionsView.beginningOfChatHistorySelfDM')}</Text>
</Text>
)}
{isDefault && (
<Text>
<Text>{translate('reportActionsView.beginningOfChatHistory')}</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {StyleSheet, View} from 'react-native';
import useLocalize from '@hooks/useLocalize';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import variables from '@styles/variables';
import Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';
import * as Illustrations from './Icon/Illustrations';
Expand All @@ -23,8 +24,13 @@ function SAMLLoadingIndicator() {
/>
</View>
<Text style={[styles.textHeadline, styles.textXXLarge, styles.textAlignCenter]}>{translate('samlSignIn.launching')}</Text>
<View style={[styles.mt2, styles.mh2, styles.fontSizeNormal, styles.textAlignCenter]}>
<Text style={[styles.textAlignCenter]}>{translate('samlSignIn.oneMoment')}</Text>
<View style={[styles.mt2, styles.mh2, styles.textAlignCenter]}>
<Text
style={[styles.textAlignCenter]}
fontSize={variables.fontSizeNormal}
>
{translate('samlSignIn.oneMoment')}
</Text>
</View>
</View>
<View style={styles.deeplinkWrapperFooter}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/SelectionList/UserListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function UserListItem({
style={[
styles.optionDisplayName,
isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText,
styles.sidebarLinkTextBold,
item.isBold !== false && styles.sidebarLinkTextBold,
styles.pre,
item.alternateText ? styles.mb1 : null,
]}
Expand Down
Loading

0 comments on commit 0e370c0

Please sign in to comment.