Skip to content

Commit

Permalink
Merge branch 'main' into cleanup/refactor-getTagListSections
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg authored Nov 12, 2024
2 parents 165d756 + 1fdc8a7 commit 4c3982e
Show file tree
Hide file tree
Showing 118 changed files with 1,745 additions and 1,347 deletions.
5 changes: 5 additions & 0 deletions __mocks__/@react-native-firebase/analytics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function analytics() {
return {
logEvent: jest.fn(),
};
}
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 1009006001
versionName "9.0.60-1"
// 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
2 changes: 1 addition & 1 deletion config/webpack/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
isWeb: platform === 'web',
isProduction: file === '.env.production',
isStaging: file === '.env.staging',
useThirdPartyScripts: process.env.USE_THIRD_PARTY_SCRIPTS === 'true' || (platform === 'web' && file === '.env.production'),
useThirdPartyScripts: process.env.USE_THIRD_PARTY_SCRIPTS === 'true' || (platform === 'web' && ['.env.production', '.env.staging'].includes(file)),
}),
new PreloadWebpackPlugin({
rel: 'preload',
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
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 4c3982e

Please sign in to comment.