Skip to content

Commit a77f3de

Browse files
committed
Merge branch 'main' of https://github.com/Expensify/App into feat/#Expensify#23229-linking
2 parents c108d9d + 34fa987 commit a77f3de

File tree

346 files changed

+8610
-11833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

346 files changed

+8610
-11833
lines changed

.eslintrc.js

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ const restrictedImportPaths = [
5151
name: '@styles/theme/illustrations',
5252
message: 'Do not import theme illustrations directly. Please use the `useThemeIllustrations` hook instead.',
5353
},
54+
{
55+
name: 'date-fns/locale',
56+
message: "Do not import 'date-fns/locale' directly. Please use the submodule import instead, like 'date-fns/locale/en-GB'.",
57+
},
5458
];
5559

5660
const restrictedImportPatterns = [

.github/actions/javascript/getGraphiteString/getGraphiteString.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ const run = () => {
3535
// Graphite doesn't accept metrics name with space, we replace spaces with "-"
3636
const formattedName = current.name.split(' ').join('-');
3737

38-
const renderDurationString = `${GRAPHITE_PATH}.PR-${prNumber}.${formattedName}.renderDuration ${current.meanDuration} ${timestamp}`;
39-
const renderCountString = `${GRAPHITE_PATH}.PR-${prNumber}.${formattedName}.renderCount ${current.meanCount} ${timestamp}`;
38+
const renderDurationString = `${GRAPHITE_PATH}.${formattedName}.renderDuration ${current.meanDuration} ${timestamp}`;
39+
const renderCountString = `${GRAPHITE_PATH}.${formattedName}.renderCount ${current.meanCount} ${timestamp}`;
40+
const renderPRNumberString = `${GRAPHITE_PATH}.${formattedName}.prNumber ${prNumber} ${timestamp}`;
4041

41-
return `${renderDurationString}\n${renderCountString}`;
42+
return `${renderDurationString}\n${renderCountString}\n${renderPRNumberString}`;
4243
})
4344
.join('\n');
4445

.github/actions/javascript/getGraphiteString/index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ const run = () => {
4444
// Graphite doesn't accept metrics name with space, we replace spaces with "-"
4545
const formattedName = current.name.split(' ').join('-');
4646

47-
const renderDurationString = `${GRAPHITE_PATH}.PR-${prNumber}.${formattedName}.renderDuration ${current.meanDuration} ${timestamp}`;
48-
const renderCountString = `${GRAPHITE_PATH}.PR-${prNumber}.${formattedName}.renderCount ${current.meanCount} ${timestamp}`;
47+
const renderDurationString = `${GRAPHITE_PATH}.${formattedName}.renderDuration ${current.meanDuration} ${timestamp}`;
48+
const renderCountString = `${GRAPHITE_PATH}.${formattedName}.renderCount ${current.meanCount} ${timestamp}`;
49+
const renderPRNumberString = `${GRAPHITE_PATH}.${formattedName}.prNumber ${prNumber} ${timestamp}`;
4950

50-
return `${renderDurationString}\n${renderCountString}`;
51+
return `${renderDurationString}\n${renderCountString}\n${renderPRNumberString}`;
5152
})
5253
.join('\n');
5354

.github/workflows/e2ePerformanceTests.yml

-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ on:
1515
type: string
1616
required: true
1717

18-
concurrency:
19-
group: "${{ github.ref }}-e2e"
20-
cancel-in-progress: true
21-
2218
jobs:
2319
buildBaseline:
2420
runs-on: ubuntu-latest-xl

android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ android {
9898
minSdkVersion rootProject.ext.minSdkVersion
9999
targetSdkVersion rootProject.ext.targetSdkVersion
100100
multiDexEnabled rootProject.ext.multiDexEnabled
101-
versionCode 1001045103
102-
versionName "1.4.51-3"
101+
versionCode 1001045401
102+
versionName "1.4.54-1"
103103
}
104104

105105
flavorDimensions "default"

assets/css/fonts.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
}
5656

5757
@font-face {
58-
font-family: Noto Color Emoji;
59-
src: url('/fonts/NotoColorEmoji-Regular.woff2') format('woff2'), url('/fonts/NotoColorEmoji-Regular.woff') format('woff');
58+
font-family: Windows Segoe UI Emoji;
59+
src: url('/fonts/seguiemj.ttf');
6060
}
6161

6262
* {
-2.16 MB
Binary file not shown.
-5.17 MB
Binary file not shown.

assets/images/document-slash.svg

+1-6
Loading

assets/images/qrcode.svg

+14-1
Loading

assets/images/tax.svg

+8
Loading

config/webpack/webpack.desktop.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ module.exports = (env) => {
2828
name: 'desktop-main',
2929
target: 'electron-main',
3030
entry: {
31-
main: './desktop/main.js',
32-
contextBridge: './desktop/contextBridge.js',
31+
main: './desktop/main.ts',
32+
contextBridge: './desktop/contextBridge.ts',
3333
},
3434
output: {
3535
filename: '[name].js',

contributingGuides/APPLE_GOOGLE_SIGNIN.md

+39-64
Original file line numberDiff line numberDiff line change
@@ -98,27 +98,6 @@ Due to some technical constraints, Apple and Google sign-in may require addition
9898

9999
## Apple
100100

101-
### iOS/Android
102-
103-
The iOS and Android implementations do not require extra steps to test, aside from signing into an Apple account on the iOS device before being able to use Sign in with Apple.
104-
105-
### Web and desktop
106-
107-
#### Render the web Sign In with Apple button in development
108-
109-
The Google Sign In button renders differently in development mode. To prevent confusion
110-
for developers about a possible regression, we decided to not render third party buttons in
111-
development mode.
112-
113-
To show the Apple Sign In button in development mode, you can comment out the following code in the
114-
LoginForm.js file:
115-
116-
```js
117-
if (CONFIG.ENVIRONMENT === CONST.ENVIRONMENT.DEV) {
118-
return;
119-
}
120-
```
121-
122101
#### Port requirements
123102

124103
The Sign in with Apple process will break after the user signs in if the pop-up process is not started from a page at an HTTPS domain registered with Apple. To fix this, you could make a new configuration with your own HTTPS domain, but then the Apple configuration won't match that of Expensify's backend.
@@ -240,53 +219,49 @@ open desktop-build
240219

241220
2. Even with this build, the deep link may not be handled by the correct app, as the development Electron config seems to intercept it sometimes. To manage this, install [SwiftDefaultApps](https://github.com/Lord-Kamina/SwiftDefaultApps), which adds a preference pane that can be used to configure which app should handle deep links.
242221

243-
## Google
244-
245-
### Web
246-
247-
#### Render the web Sign In with Google button in Development
222+
### Test the Apple / Google SSO buttons in development environment
248223

249-
The Google Sign In button renders differently in development mode. To prevent confusion
224+
The Apple/Google Sign In button renders differently in development mode. To prevent confusion
250225
for developers about a possible regression, we decided to not render third party buttons in
251226
development mode.
252227

253-
To show the Google Sign In button in development mode, you can comment out the following code in the
254-
LoginForm.js file:
255-
256-
```js
257-
if (CONFIG.ENVIRONMENT === CONST.ENVIRONMENT.DEV) {
258-
return;
259-
}
260-
```
261-
262-
#### Host/Port requirements
263-
264-
Google allows the web app to be hosted at localhost, but according to the
265-
current Google console configuration for the Expensify client ID, it must be
266-
hosted on port 8082.
267-
268-
Also note that you'll need to update the webpack.dev.js config to change `host` from `dev.new.expensify.com` to `localhost` and server type from `https` to `http`. The reason for this is that Google Sign In allows localhost, but `dev.new.expensify.com` is not a registered Google Sign In domain.
269-
270-
```diff
271-
diff --git a/config/webpack/webpack.dev.js b/config/webpack/webpack.dev.js
272-
index e28383eff5..b14f6f34aa 100644
273-
--- a/config/webpack/webpack.dev.js
274-
+++ b/config/webpack/webpack.dev.js
275-
@@ -44,9 +44,9 @@ module.exports = (env = {}) =>
276-
...proxySettings,
277-
historyApiFallback: true,
278-
port,
279-
- host: 'dev.new.expensify.com',
280-
+ host: 'localhost',
281-
server: {
282-
- type: 'https',
283-
+ type: 'http',
284-
options: {
285-
key: path.join(__dirname, 'key.pem'),
286-
cert: path.join(__dirname, 'certificate.pem'),
287-
```
288-
289-
### Desktop
228+
Here's how you can re-enable the SSO buttons in development mode:
229+
230+
- Remove this [condition](https://github.com/Expensify/App/blob/c2a718c9100e704c89ad9564301348bc53a49777/src/pages/signin/LoginForm/BaseLoginForm.tsx#L300) so that we always render the SSO button components
231+
```diff
232+
diff --git a/src/pages/signin/LoginForm/BaseLoginForm.tsx b/src/pages/signin/LoginForm/BaseLoginForm.tsx
233+
index 4286a26033..850f8944ca 100644
234+
--- a/src/pages/signin/LoginForm/BaseLoginForm.tsx
235+
+++ b/src/pages/signin/LoginForm/BaseLoginForm.tsx
236+
@@ -288,7 +288,7 @@ function BaseLoginForm({account, credentials, closeAccount, blurOnSubmit = false
237+
// for developers about possible regressions, we won't render buttons in development mode.
238+
// For more information about these differences and how to test in development mode,
239+
// see`Expensify/App/contributingGuides/APPLE_GOOGLE_SIGNIN.md`
240+
- CONFIG.ENVIRONMENT !== CONST.ENVIRONMENT.DEV && (
241+
+ (
242+
<View style={[getSignInWithStyles()]}>
243+
<Text
244+
accessibilityElementsHidden
245+
```
246+
- Update the webpack.dev.js [config](https://github.com/Expensify/App/blob/1d6bb1d14cff3dd029868a0a7c8ee14ae78c527b/config/webpack/webpack.dev.js#L47-L49) to change `host` from `dev.new.expensify.com` to `localhost` and server type from `https` to `http`. The reason for this is that Google Sign In allows localhost, but `dev.new.expensify.com` is not a registered Google Sign In domain.
247+
```diff
248+
diff --git a/config/webpack/webpack.dev.js b/config/webpack/webpack.dev.js
249+
index e28383eff5..b14f6f34aa 100644
250+
--- a/config/webpack/webpack.dev.js
251+
+++ b/config/webpack/webpack.dev.js
252+
@@ -44,9 +44,9 @@ module.exports = (env = {}) =>
253+
...proxySettings,
254+
historyApiFallback: true,
255+
port,
256+
- host: 'dev.new.expensify.com',
257+
+ host: 'localhost',
258+
server: {
259+
- type: 'https',
260+
+ type: 'http',
261+
options: {
262+
key: path.join(__dirname, 'key.pem'),
263+
cert: path.join(__dirname, 'certificate.pem'),
264+
```
290265

291266
#### Set Environment to something other than "Development"
292267

desktop/ELECTRON_EVENTS.js desktop/ELECTRON_EVENTS.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ const ELECTRON_EVENTS = {
99
KEYBOARD_SHORTCUTS_PAGE: 'keyboard-shortcuts-page',
1010
START_UPDATE: 'start-update',
1111
UPDATE_DOWNLOADED: 'update-downloaded',
12-
};
12+
} as const;
1313

14-
module.exports = ELECTRON_EVENTS;
14+
export default ELECTRON_EVENTS;

desktop/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ The New Expensify desktop app is built using [Electron.js](https://www.electronj
3131
The desktop app is organized in three pieces:
3232

3333
1. The Electron main process
34-
- Implemented in https://github.com/Expensify/App/blob/main/desktop/main.js.
34+
- Implemented in https://github.com/Expensify/App/blob/main/desktop/main.ts.
3535
- This file has access to the full set of Electron and Node.JS APIs.
3636
2. The Electron renderer process
3737
- This is the webpack-bundled version of our react-native-web app (except using `index.desktop.js` files instead of `index.website.js`, where applicable)
3838
- This is _very_ similar to our web app, and code in this process should assume it will be run in the context of a browser (no access to `require`, Electron, or Node.js APis)
3939
3. The context bridge
40-
- Implemented in https://github.com/Expensify/App/blob/main/desktop/contextBridge.js
40+
- Implemented in https://github.com/Expensify/App/blob/main/desktop/contextBridge.ts
4141
- The context bridge enables communication between the main and renderer processes. For example, if the renderer process needs to make use of a Node.js or Electron API it must:
42-
1. Define an event in https://github.com/Expensify/App/blob/main/desktop/ELECTRON_EVENTS.js
42+
1. Define an event in https://github.com/Expensify/App/blob/main/desktop/ELECTRON_EVENTS.ts
4343
2. Add that event to the whitelist defined in the context bridge
4444
3. Set up a handler for the event in the main process that can respond to the renderer process back through the bridge, if necessary.
4545

@@ -131,7 +131,7 @@ The root [package.json](../package.json) serves for `devDependencies` and shared
131131
The [desktop/package.json](./package.json) serves for desktop (electron-main) specific dependencies
132132
We use Webpack with a [desktop specific config](../config/webpack/webpack.desktop.js) to bundle our js code
133133
Half of the config takes care of packaging root package dependencies - everything related to rendering App in the Electron window. Packaged under `dist/www`
134-
The other half is about bundling the `main.js` script which initializes Electron and renders `www`
134+
The other half is about bundling the `main.ts` script which initializes Electron and renders `www`
135135

136136
## See what is getting packaged in the app
137137
If you suspect unnecessary items might be getting packaged you can inspect the package content in `desktop-build/`

desktop/contextBridge.js

-98
This file was deleted.

0 commit comments

Comments
 (0)