Skip to content

Commit

Permalink
Merge pull request #3 from Expensify/main
Browse files Browse the repository at this point in the history
Even with dev
  • Loading branch information
graylewis authored Oct 20, 2023
2 parents 6a66f0b + 51fc2f2 commit 38ea8a2
Show file tree
Hide file tree
Showing 400 changed files with 11,504 additions and 5,937 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ module.exports = {
overrides: [
{
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
plugins: ['react'],
rules: {
'rulesdir/no-multiple-onyx-in-file': 'off',
'rulesdir/onyx-props-must-have-default': 'off',
'react-native-a11y/has-accessibility-hint': ['off'],
'react/jsx-no-constructed-context-values': 'error',
'react-native-a11y/has-valid-accessibility-descriptors': [
'error',
{
Expand Down Expand Up @@ -116,7 +118,7 @@ module.exports = {
},
{
selector: ['parameter', 'method'],
format: ['camelCase'],
format: ['camelCase', 'PascalCase'],
},
],
'@typescript-eslint/ban-types': [
Expand Down
3 changes: 0 additions & 3 deletions .github/actions/javascript/bumpVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,6 @@ function getPreviousVersion(currentVersion, level) {
if (patch === 0) {
return getPreviousVersion(currentVersion, SEMANTIC_VERSION_LEVELS.MINOR);
}
if (major === 1 && minor === 3 && patch === 83) {
return getVersionStringFromNumber(major, minor, patch - 2, 0);
}
return getVersionStringFromNumber(major, minor, patch - 1, 0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -998,9 +998,6 @@ function getPreviousVersion(currentVersion, level) {
if (patch === 0) {
return getPreviousVersion(currentVersion, SEMANTIC_VERSION_LEVELS.MINOR);
}
if (major === 1 && minor === 3 && patch === 83) {
return getVersionStringFromNumber(major, minor, patch - 2, 0);
}
return getVersionStringFromNumber(major, minor, patch - 1, 0);
}

Expand Down
3 changes: 0 additions & 3 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -961,9 +961,6 @@ function getPreviousVersion(currentVersion, level) {
if (patch === 0) {
return getPreviousVersion(currentVersion, SEMANTIC_VERSION_LEVELS.MINOR);
}
if (major === 1 && minor === 3 && patch === 83) {
return getVersionStringFromNumber(major, minor, patch - 2, 0);
}
return getVersionStringFromNumber(major, minor, patch - 1, 0);
}

Expand Down
3 changes: 0 additions & 3 deletions .github/actions/javascript/getPreviousVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,6 @@ function getPreviousVersion(currentVersion, level) {
if (patch === 0) {
return getPreviousVersion(currentVersion, SEMANTIC_VERSION_LEVELS.MINOR);
}
if (major === 1 && minor === 3 && patch === 83) {
return getVersionStringFromNumber(major, minor, patch - 2, 0);
}
return getVersionStringFromNumber(major, minor, patch - 1, 0);
}

Expand Down
3 changes: 0 additions & 3 deletions .github/libs/versionUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ function getPreviousVersion(currentVersion, level) {
if (patch === 0) {
return getPreviousVersion(currentVersion, SEMANTIC_VERSION_LEVELS.MINOR);
}
if (major === 1 && minor === 3 && patch === 83) {
return getVersionStringFromNumber(major, minor, patch - 2, 0);
}
return getVersionStringFromNumber(major, minor, patch - 1, 0);
}

Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ jobs:
name: android-sourcemap
path: android/app/build/generated/sourcemaps/react/release/*.map

- name: Upload Android version to GitHub artifacts
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
uses: actions/upload-artifact@v3
with:
name: app-production-release.aab
path: android/app/build/outputs/bundle/productionRelease/app-production-release.aab

- name: Upload Android version to Browser Stack
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@./android/app/build/outputs/bundle/productionRelease/app-production-release.aab"
Expand Down Expand Up @@ -238,6 +245,13 @@ jobs:
name: ios-sourcemap
path: main.jsbundle.map

- name: Upload iOS version to GitHub artifacts
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
uses: actions/upload-artifact@v3
with:
name: New Expensify.ipa
path: /Users/runner/work/App/App/New Expensify.ipa

- name: Upload iOS version to Browser Stack
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@/Users/runner/work/App/App/New Expensify.ipa"
Expand Down
8 changes: 8 additions & 0 deletions .well-known/apple-app-site-association
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@
{
"/": "/search/*",
"comment": "Search"
},
{
"/": "/send/*",
"comment": "Send money"
},
{
"/": "/money2020/*",
"comment": "Money 2020"
}
]
}
Expand Down
1 change: 1 addition & 0 deletions __mocks__/react-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jest.doMock('react-native', () => {
BootSplash: {
getVisibilityStatus: jest.fn(),
hide: jest.fn(),
logoSizeRatio: 1,
navigationBarHeight: 0,
},
StartupTimer: {stop: jest.fn()},
Expand Down
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 1001038400
versionName "1.3.84-0"
versionCode 1001038708
versionName "1.3.87-8"
}

flavorDimensions "default"
Expand Down
4 changes: 4 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/request"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/new"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/search"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/send"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/money2020"/>

<!-- Staging URLs -->
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/r"/>
Expand All @@ -87,6 +89,8 @@
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/request"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/new"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/search"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/send"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/money2020"/>
</intent-filter>
</activity>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import android.view.Window;
import android.view.WindowManager.LayoutParams;
import androidx.annotation.NonNull;
import com.expensify.chat.R;

public class BootSplashDialog extends Dialog {

Expand All @@ -26,6 +27,10 @@ protected void onCreate(Bundle savedInstanceState) {

if (window != null) {
window.setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);

if (BootSplashModule.isSamsungOneUI4()) {
window.setBackgroundDrawableResource(R.drawable.bootsplash_samsung_oneui_4);
}
}

super.onCreate(savedInstanceState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.facebook.react.common.ReactConstants;
import com.facebook.react.module.annotations.ReactModule;
import com.facebook.react.uimanager.PixelUtil;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;
import java.util.Timer;
Expand All @@ -47,6 +48,19 @@ public String getName() {
return NAME;
}

// From https://stackoverflow.com/a/61062773
public static boolean isSamsungOneUI4() {
String name = "SEM_PLATFORM_INT";

try {
Field field = Build.VERSION.class.getDeclaredField(name);
int version = (field.getInt(null) - 90000) / 10000;
return version == 4;
} catch (Exception ignored) {
return false;
}
}

@Override
public Map<String, Object> getConstants() {
final HashMap<String, Object> constants = new HashMap<>();
Expand All @@ -61,6 +75,7 @@ public Map<String, Object> getConstants() {
? Math.round(PixelUtil.toDIPFromPixel(resources.getDimensionPixelSize(heightResId)))
: 0;

constants.put("logoSizeRatio", isSamsungOneUI4() ? 0.5 : 1);
constants.put("navigationBarHeight", height);
return constants;
}
Expand Down
18 changes: 18 additions & 0 deletions android/app/src/main/res/drawable/bootsplash_samsung_oneui_4.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>

<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:opacity="opaque">
<item android:gravity="fill">
<color android:color="?attr/windowSplashScreenBackground" />
</item>

<!-- There's an issue with logo size on Samsung OneUI v4
We need to render it 2 times smaller (288 / 2 = 144) -->
<item
tools:ignore="UnusedAttribute"
android:drawable="?windowSplashScreenAnimatedIcon"
android:gravity="center"
android:width="144dp"
android:height="144dp" />
</layer-list>
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

<style name="BootTheme" parent="Theme.SplashScreen">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/bootsplash_logo</item>
<item name="windowSplashScreenBackground">@color/bootsplash_background</item>
</style>

Expand Down
61 changes: 23 additions & 38 deletions assets/images/bankicons/american-express.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 22 additions & 22 deletions assets/images/bankicons/bank-of-america.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 25 additions & 27 deletions assets/images/bankicons/bb-t.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 38ea8a2

Please sign in to comment.