Skip to content

Commit

Permalink
Merge branch 'main' into aswin_s/issue-16526
Browse files Browse the repository at this point in the history
  • Loading branch information
aswin-s committed Apr 26, 2023
2 parents f9c99c5 + f3fae40 commit 0ab51e7
Show file tree
Hide file tree
Showing 269 changed files with 20,085 additions and 2,047 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }}

- name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it
run: |
cp .env.staging .env.adhoc
sed -i 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
Expand Down Expand Up @@ -121,6 +127,12 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }}

- name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it
run: |
cp .env.staging .env.adhoc
sed -i '' 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
Expand Down Expand Up @@ -178,6 +190,12 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }}
fetch-depth: 0

- name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it
run: |
cp .env.staging .env.adhoc
sed -i '' 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Decrypt Developer ID Certificate
Expand All @@ -192,7 +210,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Build desktop app for testing
run: npm run desktop-build-internal -- --publish always
run: npm run desktop-build-adhoc -- --publish always
env:
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
Expand All @@ -214,6 +232,12 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }}

- name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it
run: |
cp .env.staging .env.adhoc
sed -i 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Configure AWS Credentials
Expand All @@ -223,7 +247,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Build web for testing
run: npm run build-staging
run: npm run build-adhoc

- name: Build docs
run: npm run storybook-build
Expand Down Expand Up @@ -257,7 +281,8 @@ jobs:
content_android="${content_android//'%'/'%25'}"
content_android="${content_android//$'\n'/'%0A'}"
content_android="${content_android//$'\r'/'%0D'}"
echo "android_paths=$content_android" >> "$GITHUB_OUTPUT"
android_path=$(echo "$content_android" | jq -r '.html_path')
echo "android_path=$android_path" >> "$GITHUB_OUTPUT"
- name: Read JSONs with iOS paths
id: get_ios_path
Expand All @@ -267,7 +292,8 @@ jobs:
content_ios="${content_ios//'%'/'%25'}"
content_ios="${content_ios//$'\n'/'%0A'}"
content_ios="${content_ios//$'\r'/'%0D'}"
echo "ios_paths=$content_ios" >> "$GITHUB_OUTPUT"
ios_path=$(echo "$content_ios" | jq -r '.html_path')
echo "ios_path=$ios_path" >> "$GITHUB_OUTPUT"
# This step removes previous comments with links connected to the PR
- name: maintain-comment
Expand All @@ -289,7 +315,7 @@ jobs:
DESKTOP: ${{ needs.desktop.result }}
IOS: ${{ needs.iOS.result }}
WEB: ${{ needs.web.result }}
ANDROID_LINK: ${{fromJson(steps.get_android_path.outputs.android_paths).html_path}}
ANDROID_LINK: ${{steps.get_android_path.outputs.android_path}}
DESKTOP_LINK: https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/${{ env.PULL_REQUEST_NUMBER }}/NewExpensify.dmg
IOS_LINK: ${{ fromJson(steps.get_ios_path.outputs.ios_paths).html_path }}
IOS_LINK: ${{steps.get_ios_path.outputs.ios_path}}
WEB_LINK: https://${{ env.PULL_REQUEST_NUMBER }}.pr-testing.expensify.com
2 changes: 2 additions & 0 deletions .github/workflows/validateGithubActions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
paths:
- .github/**

jobs:
verify:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/verifyPodfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
paths:
- ios/**
- "package.json"
- "package-lock.json"

jobs:
verify:
Expand Down
2 changes: 2 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import Onyx from 'react-native-onyx';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import './fonts.css';
import ComposeProviders from '../src/components/ComposeProviders';
import HTMLEngineProvider from '../src/components/HTMLEngineProvider';
Expand All @@ -18,6 +19,7 @@ const decorators = [
OnyxProvider,
LocaleContextProvider,
HTMLEngineProvider,
SafeAreaProvider,
]}
>
<Story />
Expand Down
16 changes: 10 additions & 6 deletions .storybook/public/index.css
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
.search-field *, .sidebar-item, .search-result-item--label {
color: #fff !important;
color: #E7ECE9 !important;
}

.sidebar-subheading *, .search-result-item {
color: #fff;
color: #E7ECE9;
}

a.sidebar-item > svg {
color: #03d47c;
}

a.sidebar-item[data-selected="true"], a.sidebar-item[data-selected="true"]:focus, a.sidebar-item[data-selected="true"]:hover {
background: #1A3D32;
}

.search-result-item--label span {
color: #ffffffaa !important;
color: #E7ECE9aa !important;
}

#panel-tab-content :is(input:checked ~ span:last-of-type, input:not(:checked) ~ span:first-of-type) {
background: #ff7101;
color: #fff;
background: #03D47C;
color: #E7ECE9;
}

.sidebar-container {
background: #0b1b34;
background: #07271f;
}
Binary file modified .storybook/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 24 additions & 14 deletions .storybook/public/logomark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 15 additions & 7 deletions .storybook/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@ import {create} from '@storybook/theming';
import colors from '../src/styles/colors';

export default create({
appBg: colors.dark,
barSelectedColor: colors.blue,
base: 'light',
brandTitle: 'Expensify UI Docs',
brandTitle: 'New Expensify UI Docs',
brandImage: 'logomark.svg',
colorPrimary: colors.dark,
colorSecondary: colors.orange,
fontBase: 'ExpensifyNeue-Regular',
fontCode: 'monospace',
textInverseColor: colors.black,
base: 'dark',
appBg: colors.greenHighlightBackground,
colorPrimary: colors.greenDefaultButton,
colorSecondary: colors.green,
appContentBg: colors.greenAppBackground,
textColor: colors.white,
barTextColor: colors.white,
barSelectedColor: colors.green,
barBg: colors.greenAppBackground,
appBorderColor: colors.greenBorders,
inputBg: colors.greenHighlightBackground,
inputBorder: colors.greenBorders,
appBorderRadius: 8,
inputBorderRadius: 8,
});
3 changes: 3 additions & 0 deletions __mocks__/react-native-dev-menu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
addItem: jest.fn(),
};
13 changes: 13 additions & 0 deletions __mocks__/react-native-key-command.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const registerKeyCommands = () => {};
const unregisterKeyCommands = () => {};
const constants = {};
const eventEmitter = () => {};
const addListener = () => {};

export {
registerKeyCommands,
unregisterKeyCommands,
constants,
eventEmitter,
addListener,
};
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001030000
versionName "1.3.0-0"
versionCode 1001030600
versionName "1.3.6-0"
}

splits {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.expensify.chat;

import android.content.Context;
import com.facebook.react.ReactInstanceManager;

/**
* Class responsible of loading Flipper inside your React Native application. This is the release
* flavor of it so it's empty as we don't want to load Flipper.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
// Do nothing as we don't want to initialize Flipper on Release.
}
}
Binary file modified android/app/src/main/assets/fonts/ExpensifyMono-Bold.otf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/ExpensifyMono-Regular.otf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/ExpensifyNeue-Bold.otf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/ExpensifyNeue-BoldItalic.otf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/ExpensifyNeue-Italic.otf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/ExpensifyNeue-Regular.otf
Binary file not shown.
32 changes: 32 additions & 0 deletions android/app/src/main/java/com/expensify/chat/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import android.os.Bundle;
import android.content.pm.ActivityInfo;
import android.view.KeyEvent;
import com.expensify.chat.bootsplash.BootSplash;
import com.expensify.reactnativekeycommand.KeyCommandModule;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
Expand Down Expand Up @@ -44,4 +46,34 @@ protected void onCreate(Bundle savedInstanceState) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
}

/**
* This method is called when a key down event has occurred.
* Forwards the event to the KeyCommandModule
*/
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// Disabling hardware ESCAPE support which is handled by Android
if (event.getKeyCode() == KeyEvent.KEYCODE_ESCAPE) {
return false;
}
KeyCommandModule.getInstance().onKeyDownEvent(keyCode, event);
return super.onKeyDown(keyCode, event);
}

@Override
public boolean onKeyLongPress(int keyCode, KeyEvent event) {
// Disabling hardware ESCAPE support which is handled by Android
if (event.getKeyCode() == KeyEvent.KEYCODE_ESCAPE) { return false; }
KeyCommandModule.getInstance().onKeyDownEvent(keyCode, event);
return super.onKeyLongPress(keyCode, event);
}

@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
// Disabling hardware ESCAPE support which is handled by Android
if (event.getKeyCode() == KeyEvent.KEYCODE_ESCAPE) { return false; }
KeyCommandModule.getInstance().onKeyDownEvent(keyCode, event);
return super.onKeyUp(keyCode, event);
}
}
12 changes: 6 additions & 6 deletions android/link-assets-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
"data": [
{
"path": "assets/fonts/native/ExpensifyMono-Bold.otf",
"sha1": "6b83b1c1c0c8650f6258fd05771b4e25696c4046"
"sha1": "d70e12540200613e9e6ac9068bed57e4bf477bfe"
},
{
"path": "assets/fonts/native/ExpensifyMono-Regular.otf",
"sha1": "c0522536213e24609badc298ed82a6c47cdb5b20"
"sha1": "9bbd3795afea1b1136c5b6a8ecd7d470fd5ea1b2"
},
{
"path": "assets/fonts/native/ExpensifyNeue-Bold.otf",
"sha1": "c61cccfb6091f06381fa5b514272eab7105246d8"
"sha1": "fba09dcd16261f9fd181a772e3f7879e5deafb7f"
},
{
"path": "assets/fonts/native/ExpensifyNeue-BoldItalic.otf",
"sha1": "039065b262036e708ebb5f64b236ef08cc4e8f4e"
"sha1": "fe3969031652a5160819514bd62c36acb8ef7d24"
},
{
"path": "assets/fonts/native/ExpensifyNeue-Italic.otf",
"sha1": "7ddd0652175a9f27380fc63eec4395d65ed189eb"
"sha1": "e07eeb6fbabec2b46d708f59bccdacc5bbf8acbf"
},
{
"path": "assets/fonts/native/ExpensifyNeue-Regular.otf",
"sha1": "57b2cdd2f4adea3fad34464248502cd4edcaadd7"
"sha1": "32290ecbda86b5938c7538f6bf5c3106b43e5a6e"
},
{
"path": "assets/fonts/native/ExpensifyNewKansas-Medium.otf",
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ include ':react-native-config'
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
include ':react-native-plaid-link-sdk'
project(':react-native-plaid-link-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-plaid-link-sdk/android')
include ':react-native-dev-menu'
project(':react-native-dev-menu').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dev-menu/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/react-native-gradle-plugin')
Binary file modified assets/fonts/native/ExpensifyMono-Bold.otf
Binary file not shown.
Binary file modified assets/fonts/native/ExpensifyMono-Regular.otf
Binary file not shown.
Binary file modified assets/fonts/native/ExpensifyNeue-Bold.otf
Binary file not shown.
Binary file modified assets/fonts/native/ExpensifyNeue-BoldItalic.otf
Binary file not shown.
Binary file modified assets/fonts/native/ExpensifyNeue-Italic.otf
Binary file not shown.
Binary file modified assets/fonts/native/ExpensifyNeue-Regular.otf
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyMono-Bold.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyMono-Bold.woff2
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyMono-Regular.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyMono-Regular.woff2
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Bold.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Bold.woff2
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-BoldItalic.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-BoldItalic.woff2
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Italic.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Italic.woff2
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Regular.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Regular.woff2
Binary file not shown.
Loading

0 comments on commit 0ab51e7

Please sign in to comment.