Skip to content

Commit

Permalink
Merge branch 'main' of github.com:margelo/expensify-app-fork into han…
Browse files Browse the repository at this point in the history
…no/feat-add-remove-reactions
  • Loading branch information
hannojg committed Feb 19, 2023
2 parents 1b8041f + a5b9c9b commit 33c0554
Show file tree
Hide file tree
Showing 89 changed files with 1,127 additions and 274 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
- [ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like `Avatar` is modified, I verified that `Avatar` is working as expected in all cases)
- [ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
- [ ] If a new page is added, I verified it's using the `ScrollView` component to make it scrollable when more elements are added to the page.
- [ ] If the `main` branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the `Test` steps.
- [ ] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

### Screenshots/Videos
Expand Down
3 changes: 3 additions & 0 deletions __mocks__/react-native-device-info.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import MockDeviceInfo from 'react-native-device-info/jest/react-native-device-info-mock';

export default MockDeviceInfo;
1 change: 1 addition & 0 deletions __mocks__/urbanairship-react-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const UrbanAirship = {
removeAllListeners: jest.fn(),
setBadgeNumber: jest.fn(),
setForegroundPresentationOptions: jest.fn(),
getNotificationStatus: () => Promise.resolve({airshipOptIn: false, systemEnabled: false}),
};

export default UrbanAirship;
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 1001027200
versionName "1.2.72-0"
versionCode 1001027400
versionName "1.2.74-0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import java.util.concurrent.TimeUnit;

public class CustomNotificationProvider extends ReactNotificationProvider {

// Resize icons to 100 dp x 100 dp
private static final int MAX_ICON_SIZE_DPS = 100;

Expand Down
1 change: 1 addition & 0 deletions contributingGuides/REVIEWER_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
- [ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like `Avatar` is modified, I verified that `Avatar` is working as expected in all cases)
- [ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
- [ ] If a new page is added, I verified it's using the `ScrollView` component to make it scrollable when more elements are added to the page.
- [ ] If the `main` branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the `Test` steps.
- [ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

### Screenshots/Videos
Expand Down
9 changes: 5 additions & 4 deletions desktop/ELECTRON_EVENTS.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
const ELECTRON_EVENTS = {
BLUR: 'blur',
FOCUS: 'focus',
LOCALE_UPDATED: 'locale-updated',
REQUEST_DEVICE_ID: 'requestDeviceID',
REQUEST_FOCUS_APP: 'requestFocusApp',
REQUEST_UPDATE_BADGE_COUNT: 'requestUpdateBadgeCount',
REQUEST_VISIBILITY: 'requestVisibility',
REQUEST_FOCUS_APP: 'requestFocusApp',
SHOW_KEYBOARD_SHORTCUTS_MODAL: 'show-keyboard-shortcuts-modal',
START_UPDATE: 'start-update',
UPDATE_DOWNLOADED: 'update-downloaded',
FOCUS: 'focus',
BLUR: 'blur',
LOCALE_UPDATED: 'locale-updated',
};

module.exports = ELECTRON_EVENTS;
16 changes: 16 additions & 0 deletions desktop/contextBridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {
const ELECTRON_EVENTS = require('./ELECTRON_EVENTS');

const WHITELIST_CHANNELS_RENDERER_TO_MAIN = [
ELECTRON_EVENTS.REQUEST_DEVICE_ID,
ELECTRON_EVENTS.REQUEST_FOCUS_APP,
ELECTRON_EVENTS.REQUEST_UPDATE_BADGE_COUNT,
ELECTRON_EVENTS.REQUEST_VISIBILITY,
Expand Down Expand Up @@ -59,6 +60,21 @@ contextBridge.exposeInMainWorld('electron', {
return ipcRenderer.sendSync(channel, data);
},

/**
* Execute a function in the main process and return a promise that resolves with its response.
*
* @param {String} channel
* @param {*} args
* @returns {Promise}
*/
invoke: (channel, ...args) => {
if (!_.contains(WHITELIST_CHANNELS_RENDERER_TO_MAIN, channel)) {
throw new Error(getErrorMessage(channel));
}

return ipcRenderer.invoke(channel, ...args);
},

/**
* Set up a listener for events emitted from the main process and sent to the renderer process.
*
Expand Down
3 changes: 3 additions & 0 deletions desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const serve = require('electron-serve');
const contextMenu = require('electron-context-menu');
const {autoUpdater} = require('electron-updater');
const log = require('electron-log');
const {machineId} = require('node-machine-id');
const ELECTRON_EVENTS = require('./ELECTRON_EVENTS');
const checkForUpdates = require('../src/libs/checkForUpdates');
const CONFIG = require('../src/CONFIG').default;
Expand Down Expand Up @@ -282,6 +283,8 @@ const mainWindow = (() => {
titleBarStyle: 'hidden',
});

ipcMain.handle(ELECTRON_EVENTS.REQUEST_DEVICE_ID, () => machineId());

/*
* The default origin of our Electron app is app://- instead of https://new.expensify.com or https://staging.new.expensify.com
* This causes CORS errors because the referer and origin headers are wrong and the API responds with an Access-Control-Allow-Origin that doesn't match app://-
Expand Down
13 changes: 12 additions & 1 deletion desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"electron-context-menu": "^2.3.0",
"electron-log": "^4.4.7",
"electron-serve": "^1.0.0",
"electron-updater": "^4.3.4"
"electron-updater": "^4.3.4",
"node-machine-id": "^1.1.12"
},
"author": "Expensify, Inc.",
"license": "MIT",
Expand Down
2 changes: 2 additions & 0 deletions docs/_data/routes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,7 @@ hubs:
articles:
- href: Your-Expensify-Account-Manager
title: Your Expensify Account Manager
- href: Your-Expensify-Partner-Manager
title: Your Expensify Partner Manager
- href: Everything-About-Chat
title: Everything About Chat
121 changes: 121 additions & 0 deletions docs/_includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<div class="page-footer">
<div class="page-footer__wrapper">
<div class="columns">
<div class="column">
<h3>Features</h3>
<ul>
<li>
<a href="https://use.expensify.com/expense-management" alt="Expense Management" target="_blank">Expense Management</a>
</li>
<li>
<a href="https://use.expensify.com/spend-management" alt="Spend Management" target="_blank">Spend Management</a>
</li>
<li>
<a href="https://use.expensify.com/expense-reports" alt="Expense Reports" target="_blank">Expense Reports</a>
</li>
<li>
<a href="https://use.expensify.com/company-credit-card" alt="Company Credit Card" target="_blank">Company Credit Card</a>
</li>
<li>
<a href="https://use.expensify.com/receipt-scanning-app" alt="Receipt Scanning App" target="_blank">Receipt Scanning App</a>
</li>
<li>
<a href="https://use.expensify.com/bills" alt="Bill Pay" target="_blank">Bill Pay</a>
</li>
<li>
<a href="https://use.expensify.com/invoices" alt="Invoicing" target="_blank">Invoicing</a>
</li>
<li>
<a href="https://use.expensify.com/cpa-card" alt="CPA Card" target="_blank">CPA Card</a>
</li>
<li>
<a href="https://use.expensify.com/payroll" alt="Payroll" target="_blank">Payroll</a>
</li>
<li>
<a href="https://use.expensify.com/travel" alt="Travel" target="_blank">Travel</a>
</li>
</ul>
</div>
<div class="column">
<h3>Resources</h3>
<ul>
<li>
<a href="https://use.expensify.com/accountants" alt="ExpensifyApproved!" target="_blank">ExpensifyApproved!</a>
</li>

<li>
<a href="https://use.expensify.com/press-kit" alt="Press Kit" target="_blank">Press Kit</a>
</li>
<li>
<a href="https://use.expensify.com/support" alt="Support" target="_blank">Support</a>
</li>
<li>
<a href="https://help.expensify.com/" alt="ExpensifyHelp" target="_blank">ExpensifyHelp</a>
</li>
<li>
<a href="https://community.expensify.com/" alt="Community" target="_blank">Community</a>
</li>
<li>
<a href="https://use.expensify.com/privacy" alt="Privacy" target="_blank">Privacy</a>
</li>
</ul>
</div>
<div class="column">
<h3>Learn more</h3>
<ul>
<li>
<a href="https://we.are.expensify.com/how-we-got-here" alt="About Expensify" target="_blank">About Expensify</a>
</li>
<li>
<a href="https://blog.expensify.com/" alt="Blog" target="_blank">Blog</a>
</li>
<li>
<a href="https://we.are.expensify.com/" alt="Jobs" target="_blank">Jobs</a>
</li>
<li>
<a href="https://www.expensify.org" alt="Expensify.org" target="_blank">Expensify.org</a>
</li>
<li>
<a href="https://ir.expensify.com" alt="Investor Relations" target="_blank">Investor Relations</a>
</li>
</ul>

<div class="page-footer__social-icons">
<a href="https://we.are.expensify.com/podcast" class="social-media-link expensicons expensicons-podcast">
<img src="/assets/images/social-podcast.svg" alt="Podcast" width="24" height="24">
</a>
<a href="https://www.twitter.com/expensify" class="social-media-link expensicons expensicons-twitter" target="_blank" rel="noreferer noopener">
<img src="/assets/images/social-twitter.svg" alt="Twitter" width="24" height="24">
</a>
<a href="http://www.instagram.com/expensify" class="social-media-link expensicons expensicons-instagram" target="_blank" rel="noreferer noopener">
<img src="/assets/images/social-instagram.svg" alt="Instagram" width="24" height="24">
</a>
<a href="https://www.facebook.com/expensify" class="social-media-link expensicons expensicons-facebook" target="_blank" rel="noreferer noopener">
<img src="/assets/images/social-facebook.svg" alt="Twitter" width="24" height="24">
</a>
<a href="http://www.linkedin.com/company/expensify" class="social-media-link expensicons expensicons-linkedin" target="_blank" rel="noreferer noopener">
<img src="/assets/images/social-linkedin.svg" alt="LinkedIn" width="24" height="24">
</a>
</div>
</div>
<div class="column">
<h3>Get Started</h3>
<ul>
<li>
<a href="https://www.expensify.com" alt="Create a new account" target="_blank">Create a new account</a>
</li>

<li>
<a href="https://www.expensify.com" alt="Log in" target="_blank">Log in</a>
</li>
</ul>

<p class="page-footer__fine-print">&copy;2008-<script type="text/javascript">document.write(new Date().getFullYear());</script> Expensify, Inc.</p>
</div>
</div>

<div class="page-footer__logo">
<img src="/assets/images/expensify-footer-logo.svg" alt="Expensify" />
</div>
</div>
</div>
4 changes: 4 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ <h3 class="title with-margin">Didn't find what you were looking for?</h3>
<button class="success">Send a message</button>
</div>
</a>

<div id="footer">
{% include footer.html %}
</div>
</div>
</body>
</html>
Loading

0 comments on commit 33c0554

Please sign in to comment.