Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Expensify/App into perf/onyx-pump-n…
Browse files Browse the repository at this point in the history
…ew-storage-wrapper
  • Loading branch information
hannojg committed Aug 24, 2023
2 parents 72506e3 + 329cac3 commit 64f335f
Show file tree
Hide file tree
Showing 229 changed files with 7,461 additions and 2,668 deletions.
4 changes: 0 additions & 4 deletions .github/actions/composite/buildAndroidAPK/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ runs:
steps:
- uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Setup credentails for Mapbox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}
shell: bash

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
ruby-version: '2.7'
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ The GitHub workflows require a large list of secrets to deploy, notify and test
1. `APPLE_DEMO_PASSWORD` - Demo account password used for https://appstoreconnect.apple.com/
1. `BROWSERSTACK` - Used to access Browserstack's API

### Important note about Secrets
Secrets are available by default in most workflows. The exception to the rule is callable workflows. If a workflow is triggered by the `workflow_call` event, it will only have access to repo secrets if the workflow that called it passed in the secrets explicitly (for example, using `secrets: inherit`).

Furthermore, secrets are not accessible in actions. If you need to access a secret in an action, you must declare it as an input and pass it in. GitHub _should_ still obfuscate the value of the secret in workflow run logs.

## Actions

All these _workflows_ are comprised of atomic _actions_. Most of the time, we can use pre-made and independently maintained actions to create powerful workflows that meet our needs. However, when we want to do something very specific or have a more complex or robust action in mind, we can create our own _actions_.
Expand Down Expand Up @@ -144,4 +149,4 @@ In order to bundle actions with their dependencies into a single Node.js executa
Do not try to use a relative path.
- Confusingly, paths in action metadata files (`action.yml`) _must_ use relative paths.
- You can't use any dynamic values or environment variables in a `uses` statement
- In general, it is a best practice to minimize any side-effects of each action. Using atomic ("dumb") actions that have a clear and simple purpose will promote reuse and make it easier to understand the workflows that use them.
- In general, it is a best practice to minimize any side-effects of each action. Using atomic ("dumb") actions that have a clear and simple purpose will promote reuse and make it easier to understand the workflows that use them.
6 changes: 5 additions & 1 deletion .github/workflows/deployExpensifyHelp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,27 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- name: Setup NodeJS
uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Setup Pages
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382

- name: Create docs routes file
run: ./.github/scripts/createDocsRoutes.sh

- name: Build with Jekyll
uses: actions/jekyll-build-pages@0143c158f4fa0c5dcd99499a5d00859d79f70b0e
with:
source: ./docs/
destination: ./docs/_site

- name: Upload artifact
uses: actions/upload-pages-artifact@64bcae551a7b18bcb9a09042ddf1960979799187
with:
path: ./docs/_site


# Deployment job
deploy:
environment:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
git fetch origin tag ${{ steps.getMostRecentRelease.outputs.VERSION }} --no-tags --depth=1
git switch --detach ${{ steps.getMostRecentRelease.outputs.VERSION }}
- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Build APK
if: ${{ !fromJSON(steps.checkForExistingArtifact.outputs.exists) }}
uses: Expensify/App/.github/actions/composite/buildAndroidAPK@main
Expand Down Expand Up @@ -112,6 +115,9 @@ jobs:
- name: Checkout "delta ref"
run: git checkout ${{ steps.getDeltaRef.outputs.DELTA_REF }}

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Build APK
uses: Expensify/App/.github/actions/composite/buildAndroidAPK@main
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupNode@main

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
Expand Down Expand Up @@ -144,16 +147,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupNode@main

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
ruby-version: '2.7'
bundler-cache: true

- name: Setup credentails for Mapbox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Install cocoapods
uses: nick-invision/retry@0711ba3d7808574133d713a0d92d2941be03a350
with:
Expand Down Expand Up @@ -244,9 +247,6 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Setup credentails for Mapbox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Build web for production
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: npm run build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ jobs:
name: Storybook tests
steps:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Storybook run
run: npm run storybook -- --smoke-test --ci

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Setup credentails for Mapbox SDK
- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Run Fastlane beta test
Expand Down Expand Up @@ -135,6 +135,9 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }}

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it
run: |
cp .env.staging .env.adhoc
Expand All @@ -151,9 +154,6 @@ jobs:
ruby-version: '2.7'
bundler-cache: true

- name: Setup credentails for Mapbox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Install cocoapods
uses: nick-invision/retry@0711ba3d7808574133d713a0d92d2941be03a350
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/verifyPodfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main

- run: ./.github/scripts/verifyPodfile.sh
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001035507
versionName "1.3.55-7"
versionCode 1001035701
versionName "1.3.57-1"
}

flavorDimensions "default"
Expand Down
9 changes: 7 additions & 2 deletions assets/emojis/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ const emojiNameTable = _.reduce(
{},
);

const emojiCodeTable = _.reduce(
const emojiCodeTableWithSkinTones = _.reduce(
emojis,
(prev, cur) => {
const newValue = prev;
if (!cur.header) {
newValue[cur.code] = cur;
}
if (cur.types) {
cur.types.forEach((type) => {
newValue[type] = cur;
});
}
return newValue;
},
{},
Expand All @@ -32,5 +37,5 @@ const localeEmojis = {
es: esEmojis,
};

export {emojiNameTable, emojiCodeTable, localeEmojis};
export {emojiNameTable, emojiCodeTableWithSkinTones, localeEmojis};
export {skinTones, categoryFrequentlyUsed, default} from './common';
18 changes: 18 additions & 0 deletions assets/images/expensify-app-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 10 additions & 5 deletions contributingGuides/APPLE_GOOGLE_SIGNIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ Due to Expensify's expectation that a user will be using the same account on web

The current Sign in with Google library for web [does not allow arbitrary customization of the sign-in button](https://developers.google.com/identity/gsi/web/guides/offerings#sign_in_with_google_button). (The recently deprecated version of the Sign in with Google for web did offer this capability.)

This means the button is limited in design: there are no offline or hover states, and there can only be a white background for the button. We were able to get the official Apple button options to match, so we used the Google options as the starting point for the design.

Additionally, note that the Google button has a rectangular white background when shown in a client app served on `localhost`, due to the iframe it uses in that scenario. This is expected, and will not be present when the app is hosted on other domains.
This means the button is limited in design: there are no offline or hover states, and there can only be a white background for the button. We were able to get the official Apple button options to match, so we used the Google options as the starting point for the design.

### Sign in with Apple does not allow `localhost`

Expand Down Expand Up @@ -146,10 +144,17 @@ On an Android build, alter the `AppleSignIn` component to log the token generate

If you need to check that you received the correct data, check it on [jwt.io](https://jwt.io), which will decode it if it is a valid JWT token. It will also show when the token expires.

Add this token to a `.env` file at the root of the project:
Hardcode this token into `Session.beginAppleSignIn`, and but also verify a valid token was passed into the function, for example:

```
ASI_TOKEN_OVERRIDE="..."
function beginAppleSignIn(idToken) {
+ // Show that a token was passed in, without logging the token, for privacy
+ window.alert(`ORIGINAL ID TOKEN LENGTH: ${idToken.length}`);
+ const hardcodedToken = '...';
const {optimisticData, successData, failureData} = signInAttemptState();
+ API.write('SignInWithApple', {idToken: hardcodedToken}, {optimisticData, successData, failureData});
- API.write('SignInWithApple', {idToken}, {optimisticData, successData, failureData});
}
```

#### Configure the SSH tunneling
Expand Down
17 changes: 17 additions & 0 deletions docs/Card-Rev-Share-for-Approved-Partners.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Expensify Card revenue share for ExpensifyApproved! partners
description: Earn money when your clients adopt the Expensify Card
---
<!-- The lines above are required by Jekyll to process the .md file -->

# About
Start making more with us! We're thrilled to announce a new incentive for our US-based ExpensifyApproved! partner accountants. You can now earn additional income for your firm every time your client uses their Expensify Card. We're offering 0.5% of the total Expensify Card spend of your clients in cashback returned to your firm. The more your clients spend, the more cashback your firm receives!<br>
<br>This program is currently only available to US-based ExpensifyApproved! partner accountants.

# How-to
To benefit from this program, all you need to do is ensure that you are listed as a domain admin on your client's Expensify account. If you're not currently a domain admin, your client can follow the instructions outlined in [our help article](https://community.expensify.com/discussion/5749/how-to-add-and-remove-domain-admins#:~:text=Domain%20Admins%20have%20total%20control,a%20member%20of%20the%20domain.) to assign you this role.
# FAQ
- What if my firm is not permitted to accept revenue share from our clients? <br>
<br>We understand that different firms may have different policies. If your firm is unable to accept this revenue share, you can pass the revenue share back to your client to give them an additional 0.5% of cash back using your own internal payment tools.<br><br>
- What if my firm does not wish to participate in the program? <br>
<br>Please reach out to your assigned partner manager at new.expensify.com to inform them you would not like to accept the revenue share nor do you want to pass the revenue share to your clients.
2 changes: 1 addition & 1 deletion docs/context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<search_restrict_args lr="" cr="" gl="" filter="0" sort="" as_siteseach="" as_oq=""></search_restrict_args>
</image_advanced_options>
<search_options link_target=""></search_options>
<custom_search_control_options no_results_string="Oops no results found, Please try again..."></custom_search_control_options>
<custom_search_control_options no_results_string="Oops, I couldn't find that. Please try again!"></custom_search_control_options>
</cse_advance_settings>
<sort_by_keys label="Relevance" key=""></sort_by_keys>
<sort_by_keys label="Date" key="date"></sort_by_keys>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.55</string>
<string>1.3.57</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.55.7</string>
<string>1.3.57.1</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.3.55</string>
<string>1.3.57</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.55.7</string>
<string>1.3.57.1</string>
</dict>
</plist>
Loading

0 comments on commit 64f335f

Please sign in to comment.