Skip to content

Commit

Permalink
Merge branch 'issuenewpage' of https://github.com/twilight2294/App in…
Browse files Browse the repository at this point in the history
…to issuenewpage
  • Loading branch information
twilight2294 authored Nov 13, 2024
2 parents 357da49 + 33dc114 commit 205ff74
Show file tree
Hide file tree
Showing 115 changed files with 1,272 additions and 1,375 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 1009005900
versionName "9.0.59-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
18 changes: 18 additions & 0 deletions assets/images/attachment-not-found.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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)
26 changes: 14 additions & 12 deletions desktop/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {app, BrowserWindow, clipboard, dialog, ipcMain, Menu, shell} from 'electron';
import type {BrowserView, MenuItem, MenuItemConstructorOptions, WebContents, WebviewTag} from 'electron';
import type {BaseWindow, BrowserView, MenuItem, MenuItemConstructorOptions, WebContents, WebviewTag} from 'electron';
import contextMenu from 'electron-context-menu';
import log from 'electron-log';
import type {ElectronLog} from 'electron-log';
Expand Down Expand Up @@ -47,6 +47,8 @@ function pasteAsPlainText(browserWindow: BrowserWindow | BrowserView | WebviewTa
const text = clipboard.readText();

if ('webContents' in browserWindow) {
// https://github.com/sindresorhus/electron-context-menu is passing in deprecated `BrowserView` to this function
// eslint-disable-next-line deprecation/deprecation
browserWindow.webContents.insertText(text);
}
}
Expand Down Expand Up @@ -107,7 +109,7 @@ process.argv.forEach((arg) => {
return;
}

expectedUpdateVersion = arg.substr(`${EXPECTED_UPDATE_VERSION_FLAG}=`.length);
expectedUpdateVersion = arg.slice(`${EXPECTED_UPDATE_VERSION_FLAG}=`.length);
});

// Add the listeners and variables required to ensure that auto-updating
Expand All @@ -132,7 +134,7 @@ const quitAndInstallWithUpdate = () => {
};

/** Menu Item callback to trigger an update check */
const manuallyCheckForUpdates = (menuItem?: MenuItem, browserWindow?: BrowserWindow) => {
const manuallyCheckForUpdates = (menuItem?: MenuItem, browserWindow?: BaseWindow) => {
if (menuItem) {
// Disable item until the check (and download) is complete
// eslint-disable-next-line no-param-reassign -- menu item flags like enabled or visible can be dynamically toggled by mutating the object
Expand Down Expand Up @@ -427,30 +429,30 @@ const mainWindow = (): Promise<void> => {
id: 'back',
accelerator: process.platform === 'darwin' ? 'Cmd+[' : 'Shift+[',
click: () => {
browserWindow.webContents.goBack();
browserWindow.webContents.navigationHistory.goBack();
},
},
{
label: 'backWithKeyShortcut',
visible: false,
accelerator: process.platform === 'darwin' ? 'Cmd+Left' : 'Shift+Left',
click: () => {
browserWindow.webContents.goBack();
browserWindow.webContents.navigationHistory.goBack();
},
},
{
id: 'forward',
accelerator: process.platform === 'darwin' ? 'Cmd+]' : 'Shift+]',
click: () => {
browserWindow.webContents.goForward();
browserWindow.webContents.navigationHistory.goForward();
},
},
{
label: 'forwardWithKeyShortcut',
visible: false,
accelerator: process.platform === 'darwin' ? 'Cmd+Right' : 'Shift+Right',
click: () => {
browserWindow.webContents.goForward();
browserWindow.webContents.navigationHistory.goForward();
},
},
],
Expand Down Expand Up @@ -507,7 +509,7 @@ const mainWindow = (): Promise<void> => {
const denial = {action: 'deny'} as const;

// Make sure local urls stay in electron perimeter
if (url.substr(0, 'file://'.length).toLowerCase() === 'file://') {
if (url.slice(0, 'file://'.length).toLowerCase() === 'file://') {
return denial;
}

Expand Down Expand Up @@ -539,19 +541,19 @@ const mainWindow = (): Promise<void> => {
// Initiating a browser-back or browser-forward with mouse buttons should navigate history.
browserWindow.on('app-command', (e, cmd) => {
if (cmd === 'browser-backward') {
browserWindow.webContents.goBack();
browserWindow.webContents.navigationHistory.goBack();
}
if (cmd === 'browser-forward') {
browserWindow.webContents.goForward();
browserWindow.webContents.navigationHistory.goForward();
}
});

browserWindow.on('swipe', (e, direction) => {
if (direction === 'left') {
browserWindow.webContents.goBack();
browserWindow.webContents.navigationHistory.goBack();
}
if (direction === 'right') {
browserWindow.webContents.goForward();
browserWindow.webContents.navigationHistory.goForward();
}
});

Expand Down
Loading

0 comments on commit 205ff74

Please sign in to comment.