Skip to content

Commit

Permalink
Merge branch 'main' into @cdOut/guided-3-onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
blazejkustra committed Nov 13, 2024
2 parents 346157d + c24d217 commit 54c71f8
Show file tree
Hide file tree
Showing 100 changed files with 799 additions and 776 deletions.
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 1009006000
versionName "9.0.60-0"
versionCode 1009006100
versionName "9.0.61-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
1 change: 1 addition & 0 deletions contributingGuides/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ You can create as many accounts as needed in order to test your changes directly

1. When testing chat functionality in the app please do this between accounts you or your fellow contributors own - **do not test chatting with Concierge**, as this diverts to our customer support team. Thank you.
2. A member of our customer onboarding team gets auto-assigned to every new policy created by a non-paying account to help them set up. Please **do not interact with these teams, ask for calls, or support on your issues.** If you do need to test functionality inside the defaultRooms (#admins & #announce) for any issues you’re working on, please let them know that you are a contributor and don’t need assistance. They will proceed to ignore the chat.
3. Please **do not post in any Expensify owned public room for testing** (e.g #exfy-roadmap, #new-expensify-feedback). These rooms include real customers and investors. You can create your own public rooms, or [use this test public room](https://staging.new.expensify.com/r/2091104345528462) on either staging or production. Thanks!

#### Generating Multiple Test Accounts
You can generate multiple test accounts by using a `+` postfix, for example if your email is [email protected], you can create multiple New Expensify accounts connected to the same email address by using [email protected], [email protected], etc.
Expand Down
19 changes: 7 additions & 12 deletions contributingGuides/PERFORMANCE_METRICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,16 @@ Project is using Firebase for tracking these metrics. However, not all of them a
| `js_loaded` || The time it takes for the JavaScript bundle to load. <br><br>**Platforms:** Android, iOS | **Android:** Starts in the `onCreate` method.<br><br>**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. |
| `_app_in_foreground` || The time when the app is running in the foreground and available to the user.<br><br>**Platforms:** Android, iOS | **Android:** Starts when the first activity to reach the foreground has its `onResume()` method called. <br><br>**iOS:** Starts when the application receives the `UIApplicationDidBecomeActiveNotification` notification. | **Android:** Stops when the last activity to leave the foreground has its `onStop()` method called. <br><br>**iOS:** Stops when it receives the `UIApplicationWillResignActiveNotification` notification. |
| `_app_in_background` || Time when the app is running in the background.<br><br>**Platforms:** Android, iOS | **Android:** Starts when the last activity to leave the foreground has its `onStop()` method called. <br><br>**iOS:** Starts when the application receives the `UIApplicationWillResignActiveNotification` notification. | **Android:** Stops when the first activity to reach the foreground has its `onResume()` method called. <br><br>**iOS:** Stops when it receives the `UIApplicationDidBecomeActiveNotification` notification. |
| `homepage_initial_render` || Time taken for the initial render of the app for a logged in user.<br><br>**Platforms:** All | Starts with the first render of the `AuthScreens` component. | Stops once the `AuthScreens` component is mounted. |
| `sidebar_loaded` || Time taken for the Sidebar to load.<br><br>**Platforms:** All | Starts when the Sidebar is mounted. | Stops when the Splash Screen is hidden. |
| `sidebar_loaded` || Time taken for the Sidebar to load.<br><br>**Platforms:** All | Starts when the Sidebar is mounted. | Stops when the LHN finishes laying out. |
| `calc_most_recent_last_modified_action` || Time taken to find the most recently modified report action or report.<br><br>**Platforms:** All | Starts when the app reconnects to the network | Ends when the app reconnects to the network and the most recent report action or report is found. |
| `search_render` || Time taken to render the Chat Finder page.<br><br>**Platforms:** All | Starts when the Chat Finder icon in LHN is pressed. | Stops when the list of available options is rendered for the first time. |
| `load_search_options` || Time taken to generate the list of options used in Chat Finder.<br><br>**Platforms:** All | Starts when the `getSearchOptions` function is called. | Stops when the list of available options is generated. |
| `search_filter_options` || Time taken to filter search options in Chat Finder by given search value.<br><br>**Platforms:** All | Starts when user types something in the Chat Finder search input. | Stops when the list of filtered options is generated. |
| `open_search` || Time taken to open up the Search Router.<br><br>**Platforms:** All | Starts when the Search Router icon in LHN is pressed. | Stops when the list of available options finishes laying out. |
| `load_search_options` || Time taken to generate the list of options used in the Search Router.<br><br>**Platforms:** All | Starts when the `getSearchOptions` function is called. | Stops when the list of available options is generated. |
| `search_filter_options` || Time taken to filter search options in the Search Router by the given search value.<br><br>**Platforms:** All | Starts when user types something in the Search Router search input. | Stops when the list of filtered options is generated. |
| `trie_initialization` || Time taken to build the emoji trie.<br><br>**Platforms:** All | Starts when emoji trie begins to build. | Stops when emoji trie building is complete. |
| `open_report` || Time taken to open a report.<br><br>**Platforms:** All | Starts when the row in the `LHNOptionsList` is pressed. | Stops when the `ReportActionsList` finishes laying out. |
| `switch_report` || Time taken to open report.<br><br>**Platforms:** All | Starts when the chat in the LHN is pressed. | Stops when the `ReportActionsList` finishes laying out. |
| `open_report` || Time taken to open a report.<br><br>**Platforms:** All | Starts when the row in the `LHNOptionsList` is pressed. | Stops when the `ReportActionsList` finishes laying out. |
| `open_report_from_preview` || Time taken to open a report from preview.<br><br>(previously `switch_report_from_preview`)<br><br>**Platforms:** All | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. |
| `switch_report_from_preview` || **[REMOVED]** Time taken to open a report from preview. | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. |
| `chat_render` || Time taken to render the Report screen.<br><br>**Platforms:** All | Starts when the `ReportScreen` is being rendered for the first time. | Stops once the `ReportScreen` component is mounted. |
| `report_initial_render` || Time taken to render the Report screen.<br><br>**Platforms:** All | Starts when the first item is rendered in the `LHNOptionsList`. | Stops when the `ReportActionsList` finishes laying out. |
| `open_report_thread` || Time taken to open a thread in a report.<br><br>**Platforms:** All | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. |
| `message_sent` | | Time taken to send a message.<br><br>**Platforms:** All | Starts when the new message is sent. | Stops when the message is being rendered in the chat. |
| `send_message` | | Time taken to send a message.<br><br>**Platforms:** All | Starts when the new message is sent. | Stops when the message is being rendered in the chat. |

## Documentation Maintenance

Expand All @@ -46,4 +41,4 @@ To ensure this documentation remains accurate and useful, please adhere to the f
## Additional Resources

- [Firebase Documentation](https://firebase.google.com/docs)
- [Firebase Performance Monitoring](https://firebase.google.com/docs/perf-mon)
- [Firebase Performance Monitoring](https://firebase.google.com/docs/perf-mon)
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The following steps help you determine how data will be exported from Expensify
- Journal Entries - This is a single itemized journal entry for each Expensify report.
- _Non-reimbursable expenses_: Non-reimbursable expenses export to QuickBooks Online as:
- Credit Card expenses - Each expense will be exported as a bank transaction with its transaction date.
- Note: The Expensify Card transactions will always export as Credit Card charges, even if the non-reimbursable setting is configured differently (such as a Vendor Bill.)
- Debit Card Expenses - Each expense will be exported as a bank transaction with its transaction date.
- Vendor Bills - A single detailed vendor bill is generated for each Expensify report.
- If the accounting period is closed, the vendor bill will be posted on the first day of the next open period. If you choose to export non-reimbursable expenses as Vendor Bills, you can assign a default vendor to the bill.
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.60</string>
<string>9.0.61</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.60.0</string>
<string>9.0.61.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.60</string>
<string>9.0.61</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.60.0</string>
<string>9.0.61.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.60</string>
<string>9.0.61</string>
<key>CFBundleVersion</key>
<string>9.0.60.0</string>
<string>9.0.61.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.

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.60-0",
"version": "9.0.61-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
18 changes: 18 additions & 0 deletions patches/react-native+0.75.2+020+keyboard-avoiding-view.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
index e26d677..597be5a 100644
--- a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
+++ b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
@@ -175,6 +175,13 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
}

componentDidMount(): void {
+ // Fix KeyboardAvoidingView not aware of the keyboard closing after it is unmounted.
+ // Remove this patch after the upstream fix https://github.com/facebook/react-native/commit/08bd8ac47da60121225e7b281bbf566e2c5a291e is released.
+ if (!Keyboard.isVisible()) {
+ this._keyboardEvent = null;
+ this._setBottom(0);
+ }
+
if (Platform.OS === 'ios') {
this._subscriptions = [
Keyboard.addListener('keyboardWillChangeFrame', this._onKeyboardChange),
23 changes: 3 additions & 20 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ const CONST = {
DEFAULT_TABLE_NAME: 'keyvaluepairs',
DEFAULT_ONYX_DUMP_FILE_NAME: 'onyx-state.txt',
DEFAULT_POLICY_ROOM_CHAT_TYPES: [chatTypes.POLICY_ADMINS, chatTypes.POLICY_ANNOUNCE, chatTypes.DOMAIN_ALL],
DEFAULT_IMAGE_FILE_NAME: 'image',
DISABLED_MAX_EXPENSE_VALUE: 10000000000,
POLICY_BILLABLE_MODES: {
BILLABLE: 'billable',
Expand Down Expand Up @@ -1261,17 +1262,13 @@ const CONST = {
},
TIMING: {
CALCULATE_MOST_RECENT_LAST_MODIFIED_ACTION: 'calc_most_recent_last_modified_action',
SEARCH_ROUTER_RENDER: 'search_router_render',
CHAT_RENDER: 'chat_render',
OPEN_SEARCH: 'open_search',
OPEN_REPORT: 'open_report',
HOMEPAGE_INITIAL_RENDER: 'homepage_initial_render',
REPORT_INITIAL_RENDER: 'report_initial_render',
SWITCH_REPORT: 'switch_report',
OPEN_REPORT_FROM_PREVIEW: 'open_report_from_preview',
OPEN_REPORT_THREAD: 'open_report_thread',
SIDEBAR_LOADED: 'sidebar_loaded',
LOAD_SEARCH_OPTIONS: 'load_search_options',
MESSAGE_SENT: 'message_sent',
SEND_MESSAGE: 'send_message',
COLD: 'cold',
WARM: 'warm',
REPORT_ACTION_ITEM_LAYOUT_DEBOUNCE_TIME: 1500,
Expand Down Expand Up @@ -1866,7 +1863,6 @@ const CONST = {
JOBS: 'jobs',
},
},
NETSUITE_CUSTOM_LIST_LIMIT: 8,
NETSUITE_ADD_CUSTOM_LIST_STEP_NAMES: ['1', '2,', '3', '4'],
NETSUITE_ADD_CUSTOM_SEGMENT_STEP_NAMES: ['1', '2,', '3', '4', '5', '6,'],
},
Expand Down Expand Up @@ -4555,9 +4551,6 @@ const CONST = {
},
INDENTS: ' ',
PARENT_CHILD_SEPARATOR: ': ',
CATEGORY_LIST_THRESHOLD: 8,
TAG_LIST_THRESHOLD: 8,
TAX_RATES_LIST_THRESHOLD: 8,
COLON: ':',
MAPBOX: {
PADDING: 32,
Expand Down Expand Up @@ -4641,11 +4634,6 @@ const CONST = {
*/
MAX_SELECTION_LIST_PAGE_LENGTH: 500,

/**
* We only include the members search bar when we have 8 or more members
*/
SHOULD_SHOW_MEMBERS_SEARCH_INPUT_BREAKPOINT: 8,

/**
* Bank account names
*/
Expand Down Expand Up @@ -4819,7 +4807,6 @@ const CONST = {
WORKSPACE_SWITCHER: {
NAME: 'Expensify',
SUBSCRIPT_ICON_SIZE: 8,
MINIMUM_WORKSPACES_TO_SHOW_SEARCH: 8,
},

WELCOME_VIDEO_URL: `${CLOUDFRONT_URL}/videos/intro-1280.mp4`,
Expand Down Expand Up @@ -5897,7 +5884,6 @@ const CONST = {

MAX_TAX_RATE_INTEGER_PLACES: 4,
MAX_TAX_RATE_DECIMAL_PLACES: 4,
MIN_TAX_RATE_DECIMAL_PLACES: 2,

DOWNLOADS_PATH: '/Downloads',
DOWNLOADS_TIMEOUT: 5000,
Expand All @@ -5919,9 +5905,6 @@ const CONST = {
ACTION_TYPES: {
VIEW: 'view',
REVIEW: 'review',
SUBMIT: 'submit',
APPROVE: 'approve',
PAY: 'pay',
DONE: 'done',
PAID: 'paid',
},
Expand Down
2 changes: 0 additions & 2 deletions src/Expensify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import NavigationRoot from './libs/Navigation/NavigationRoot';
import NetworkConnection from './libs/NetworkConnection';
import PushNotification from './libs/Notification/PushNotification';
import './libs/Notification/PushNotification/subscribePushNotification';
import Performance from './libs/Performance';
import setCrashlyticsUserId from './libs/setCrashlyticsUserId';
import StartupTimer from './libs/StartupTimer';
// This lib needs to be imported, but it has nothing to export since all it contains is an Onyx connection
Expand Down Expand Up @@ -138,7 +137,6 @@ function Expensify() {

const onSplashHide = useCallback(() => {
setSplashScreenState(CONST.BOOT_SPLASH_STATE.HIDDEN);
Performance.markEnd(CONST.TIMING.SIDEBAR_LOADED);
}, [setSplashScreenState]);

useLayoutEffect(() => {
Expand Down
6 changes: 4 additions & 2 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,13 @@ const ROUTES = {
},
ATTACHMENTS: {
route: 'attachment',
getRoute: (reportID: string, type: ValueOf<typeof CONST.ATTACHMENT_TYPE>, url: string, accountID?: number, isAuthTokenRequired?: boolean) => {
getRoute: (reportID: string, type: ValueOf<typeof CONST.ATTACHMENT_TYPE>, url: string, accountID?: number, isAuthTokenRequired?: boolean, fileName?: string) => {
const reportParam = reportID ? `&reportID=${reportID}` : '';
const accountParam = accountID ? `&accountID=${accountID}` : '';
const authTokenParam = isAuthTokenRequired ? '&isAuthTokenRequired=true' : '';
return `attachment?source=${encodeURIComponent(url)}&type=${type}${reportParam}${accountParam}${authTokenParam}` as const;
const fileNameParam = fileName ? `&fileName=${fileName}` : '';

return `attachment?source=${encodeURIComponent(url)}&type=${type}${reportParam}${accountParam}${authTokenParam}${fileNameParam}` as const;
},
},
REPORT_PARTICIPANTS: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/CategoryPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function CategoryPicker({selectedCategory, policyID, onSubmit}: CategoryPickerPr
const categoryData = categoryOptions?.at(0)?.data ?? [];
const header = OptionsListUtils.getHeaderMessageForNonUserList(categoryData.length > 0, debouncedSearchValue);
const categoriesCount = OptionsListUtils.getEnabledCategoriesCount(categories);
const isCategoriesCountBelowThreshold = categoriesCount < CONST.CATEGORY_LIST_THRESHOLD;
const isCategoriesCountBelowThreshold = categoriesCount < CONST.STANDARD_LIST_ITEM_LIMIT;
const showInput = !isCategoriesCountBelowThreshold;

return [categoryOptions, header, showInput];
Expand Down
2 changes: 2 additions & 0 deletions src/components/FocusModeNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ function FocusModeNotification() {
confirmText={translate('common.buttonConfirm')}
onConfirm={User.clearFocusModeNotification}
shouldShowCancelButton={false}
onBackdropPress={User.clearFocusModeNotification}
onCancel={User.clearFocusModeNotification}
prompt={
<Text>
{translate('focusModeUpdateModal.prompt')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ function ImageRenderer({tnode}: ImageRendererProps) {
const [hasLoadFailed, setHasLoadFailed] = useState(true);
const theme = useTheme();

let fileName = htmlAttribs[CONST.ATTACHMENT_ORIGINAL_FILENAME_ATTRIBUTE] || FileUtils.getFileName(`${isAttachmentOrReceipt ? attachmentSourceAttribute : htmlAttribs.src}`);
const fileInfo = FileUtils.splitExtensionFromFileName(fileName);
if (!fileInfo.fileExtension) {
fileName = `${fileInfo?.fileName || CONST.DEFAULT_IMAGE_FILE_NAME}.jpg`;
}

const thumbnailImageComponent = (
<ThumbnailImage
previewSourceURL={previewSource}
Expand Down Expand Up @@ -101,7 +107,7 @@ function ImageRenderer({tnode}: ImageRendererProps) {
return;
}

const route = ROUTES.ATTACHMENTS?.getRoute(reportID ?? '-1', type, source, accountID, isAttachmentOrReceipt);
const route = ROUTES.ATTACHMENTS?.getRoute(reportID ?? '-1', type, source, accountID, isAttachmentOrReceipt, fileName);
Navigation.navigate(route);
}}
onLongPress={(event) => {
Expand Down
Loading

0 comments on commit 54c71f8

Please sign in to comment.