Skip to content

Commit

Permalink
Merge branch 'Expensify:main' into arrow-feature-signed
Browse files Browse the repository at this point in the history
  • Loading branch information
JediWattson authored Jan 11, 2023
2 parents bc8fc1a + 5a09253 commit 1c3c3f7
Show file tree
Hide file tree
Showing 59 changed files with 1,067 additions and 256 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cherryPick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
description: The number of a pull request to CP
required: true
NEW_VERSION:
description: The new app version
description: The new app version (leave empty if running manually)
required: false
default: ''

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001025013
versionName "1.2.50-13"
versionCode 1001025204
versionName "1.2.52-4"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
Expand Down
5 changes: 1 addition & 4 deletions assets/images/expensify-wordmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
286 changes: 286 additions & 0 deletions assets/images/product-illustrations/rocket--blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions config/electronBuilder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ module.exports = {
app: 'desktop',
output: 'desktop-build',
},
protocols: {
name: 'New Expensify',
schemes: ['new-expensify'],
},
};
3 changes: 2 additions & 1 deletion contributingGuides/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ A job could be fixing a bug or working on a new feature. There are two ways you
This is the most common scenario for contributors. The Expensify team posts new jobs to the Upwork job list [here](https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&sort=recency&user_location_match=2) (you must be signed in to Upwork to view jobs). Each job in Upwork has a corresponding GitHub issue, which will include instructions to follow. You can also view all open jobs in the Expensify/App GH repository by searching for GH issues with the [`Help Wanted` label](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22). Lastly, you can follow the [@ExpensifyOSS](https://twitter.com/ExpensifyOSS) Twitter account to see a live feed of jobs that are posted.

#### Proposing a job that Expensify hasn't posted
It’s possible that you found a new bug or new feature that we haven’t posted as a job to the [GitHub repository](https://github.com/Expensify/App/issues?q=is%3Aissue). This is an opportunity to propose a job, and (optionally) a solution for that job. If it's a valid job proposal that we choose to implement by deploying it to production — either internally or via an external contributor — then we will compensate you $250 for identifying and proposing the bug or feature. If the bug or feature is fixed by a PR that is not associated with your proposal, then you will not be eligible for the corresponding compensation unless you can find the PR that fixed it and prove your proposal came first.
It’s possible that you found a new bug or new feature that we haven’t posted as a job to the [GitHub repository](https://github.com/Expensify/App/issues?q=is%3Aissue). This is an opportunity to propose a job. If it's a valid job proposal that we choose to implement by deploying it to production — either internally or via an external contributor — then we will compensate you $250 for identifying and proposing the bug or feature. If the bug or feature is fixed by a PR that is not associated with your proposal, then you will not be eligible for the corresponding compensation unless you can find the PR that fixed it and prove your proposal came first.
- Note: If you get assigned the job you proposed **and** you complete the job, this $250 for identifying the improvement is *in addition to* the reward you will be paid for completing the job.
- Note about proposed bugs or features: Expensify has the right not to pay the $250 reward if the suggested bug has already been reported or the feature request is already planned. Following, if more than one contributor proposes the same bug, the contributor who posted it first is the one who is eligible for the bonus.
- Note: whilst you may optionally propose a solution for that job on Slack, solutions are ultimately reviewed in GitHub. The onus is on you to propose the solution on GitHub, and/or ensure the issue creator will include a link to your proposal.
Expand Down Expand Up @@ -113,6 +113,7 @@ Additionally if you want to discuss an idea with the open source community witho
- Note: Before submitting a proposal on an issue, be sure to read any other existing proposals. Any new proposal should be substantively different from existing proposals.
5. Pause at this step until someone from the Contributor-Plus team and / or someone from Expensify provides feedback on your proposal (do not create a pull request yet).
6. If your solution proposal is accepted by the Expensify engineer assigned to the issue, Expensify will hire you on Upwork and assign the GitHub issue to you.
7. Once hired, post a comment in the Github issue stating when you expect to have your PR ready for review

#### Begin coding your solution in a pull request
7. When you are ready to start, fork the repository and create a new branch.
Expand Down
44 changes: 38 additions & 6 deletions desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ const localizeMenuItems = (browserWindow, systemMenu) => {
};

const mainWindow = (() => {
let deeplinkUrl;
let browserWindow;

const loadURL = __DEV__
? win => win.loadURL(`http://localhost:${port}`)
: serve({directory: `${__dirname}/www`});
Expand All @@ -238,6 +241,19 @@ const mainWindow = (() => {
app.setName('New Expensify');
}

app.on('will-finish-launching', () => {
app.on('open-url', (event, url) => {
event.preventDefault();
const urlObject = new URL(url);
deeplinkUrl = `${APP_DOMAIN}${urlObject.pathname}`;

if (browserWindow) {
browserWindow.loadURL(deeplinkUrl);
browserWindow.show();
}
});
});

/*
* Starting from Electron 20, it shall be required to set sandbox option to false explicitly.
* Running a preload script contextBridge.js require access to nodeJS modules from the javascript code.
Expand All @@ -246,7 +262,15 @@ const mainWindow = (() => {
* */
return app.whenReady()
.then(() => {
const browserWindow = new BrowserWindow({
/**
* We only want to register the scheme this way when in dev, since
* when the app is bundled electron-builder will take care of it.
*/
if (__DEV__) {
app.setAsDefaultProtocolClient('new-expensify');
}

browserWindow = new BrowserWindow({
backgroundColor: '#FAFAFA',
width: 1200,
height: 900,
Expand Down Expand Up @@ -455,18 +479,26 @@ const mainWindow = (() => {
})

// After initializing and configuring the browser window, load the compiled JavaScript
.then((browserWindow) => {
loadURL(browserWindow);
return browserWindow;
.then((browserWindowRef) => {
loadURL(browserWindow).then(() => {
if (!deeplinkUrl) {
return;
}

browserWindow.loadURL(deeplinkUrl);
browserWindow.show();
});

return browserWindowRef;
})

// Start checking for JS updates
.then((browserWindow) => {
.then((browserWindowRef) => {
if (__DEV__) {
return;
}

checkForUpdates(electronUpdater(browserWindow));
checkForUpdates(electronUpdater(browserWindowRef));
});
});

Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.50</string>
<string>1.2.52</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.2.50.13</string>
<string>1.2.52.4</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</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>1.2.50</string>
<string>1.2.52</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2.50.13</string>
<string>1.2.52.4</string>
</dict>
</plist>
18 changes: 16 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -478,13 +478,19 @@ PODS:
- React-Core
- react-native-pdf (6.6.2):
- React-Core
- react-native-performance (4.0.0):
- React-Core
- react-native-plaid-link-sdk (7.4.0):
- Plaid (~> 2.5.1)
- React-Core
- react-native-progress-bar-android (1.0.4):
- React
- react-native-progress-view (1.3.2):
- React-Core
- react-native-quick-sqlite (5.1.0):
- React
- React-callinvoker
- React-Core
- react-native-render-html (6.3.1):
- React-Core
- react-native-safe-area-context (4.4.1):
Expand Down Expand Up @@ -561,7 +567,7 @@ PODS:
- React-jsi (= 0.70.4-alpha.2)
- React-logger (= 0.70.4-alpha.2)
- React-perflogger (= 0.70.4-alpha.2)
- RNCAsyncStorage (1.17.10):
- RNCAsyncStorage (1.17.11):
- React-Core
- RNCClipboard (1.5.1):
- React-Core
Expand Down Expand Up @@ -700,9 +706,11 @@ DEPENDENCIES:
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-pdf (from `../node_modules/react-native-pdf`)
- react-native-performance (from `../node_modules/react-native-performance`)
- react-native-plaid-link-sdk (from `../node_modules/react-native-plaid-link-sdk`)
- "react-native-progress-bar-android (from `../node_modules/@react-native-community/progress-bar-android`)"
- "react-native-progress-view (from `../node_modules/@react-native-community/progress-view`)"
- react-native-quick-sqlite (from `../node_modules/react-native-quick-sqlite`)
- react-native-render-html (from `../node_modules/react-native-render-html`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-webview (from `../node_modules/react-native-webview`)
Expand Down Expand Up @@ -845,12 +853,16 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-community/netinfo"
react-native-pdf:
:path: "../node_modules/react-native-pdf"
react-native-performance:
:path: "../node_modules/react-native-performance"
react-native-plaid-link-sdk:
:path: "../node_modules/react-native-plaid-link-sdk"
react-native-progress-bar-android:
:path: "../node_modules/@react-native-community/progress-bar-android"
react-native-progress-view:
:path: "../node_modules/@react-native-community/progress-view"
react-native-quick-sqlite:
:path: "../node_modules/react-native-quick-sqlite"
react-native-render-html:
:path: "../node_modules/react-native-render-html"
react-native-safe-area-context:
Expand Down Expand Up @@ -983,9 +995,11 @@ SPEC CHECKSUMS:
react-native-image-picker: bf34f3f516d139ed3e24c5f5a381a91819e349ea
react-native-netinfo: 1a6035d3b9780221d407c277ebfb5722ace00658
react-native-pdf: 33c622cbdf776a649929e8b9d1ce2d313347c4fa
react-native-performance: 224bd53e6a835fda4353302cf891d088a0af7406
react-native-plaid-link-sdk: 77052f329310ff5a36ddda276793f40d27c02bc4
react-native-progress-bar-android: be43138ab7da30d51fc038bafa98e9ed594d0c40
react-native-progress-view: 4d3bbe6a099ba027b1fedb1548c2c87f74249b70
react-native-quick-sqlite: a7bd4139fb07194ef8534d1cc14c1aec6daa4d84
react-native-render-html: 96c979fe7452a0a41559685d2f83b12b93edac8c
react-native-safe-area-context: 99b24a0c5acd0d5dcac2b1a7f18c49ea317be99a
react-native-webview: e771bc375f789ebfa02a26939a57dbc6fa897336
Expand All @@ -1001,7 +1015,7 @@ SPEC CHECKSUMS:
React-RCTVibration: eb5fb0bb3d78e31dcaeae5f127c75a7caf4b6af9
React-runtimeexecutor: a8cee6fe3fb7994f07b735c7024a08a4fa5f8446
ReactCommon: 1ebf2df5c764ebb52048e7a1cf42c75a6246171a
RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca
RNCAsyncStorage: 8616bd5a58af409453ea4e1b246521bb76578d60
RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495
RNCPicker: 0b65be85fe7954fbb2062ef079e3d1cde252d888
RNDateTimePicker: 7658208086d86d09e1627b5c34ba0cf237c60140
Expand Down
4 changes: 4 additions & 0 deletions jest/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ reanimatedJestUtils.setUpTests();
// https://reactnavigation.org/docs/testing/#mocking-native-modules
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');

// We have to mock the SQLiteStorage provider because it uses the native module SQLiteStorage, which is not available in jest.
// Mocking this file in __mocks__ does not work because jest doesn't support mocking files that are not directly used in the testing project
jest.mock('react-native-onyx/lib/storage/providers/SQLiteStorage', () => require('react-native-onyx/lib/storage/providers/__mocks__/SQLiteStorage'));

// Turn off the console logs for timing events. They are not relevant for unit tests and create a lot of noise
jest.spyOn(console, 'debug').mockImplementation((...params) => {
if (params[0].indexOf('Timing:') === 0) {
Expand Down
Loading

0 comments on commit 1c3c3f7

Please sign in to comment.