Skip to content

Commit

Permalink
Merge branch 'main' into workspace-admin-checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
esh-g committed Oct 16, 2023
2 parents 5fb957c + 279ce1b commit 6891b3c
Show file tree
Hide file tree
Showing 268 changed files with 10,036 additions and 5,462 deletions.
3 changes: 3 additions & 0 deletions .github/actions/javascript/bumpVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ 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,6 +998,9 @@ 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: 3 additions & 0 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,9 @@ 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: 3 additions & 0 deletions .github/actions/javascript/getPreviousVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ 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: 3 additions & 0 deletions .github/libs/versionUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ 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
11 changes: 8 additions & 3 deletions .github/scripts/findUnusedKeys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LIB_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd ../../ && pwd)"

readonly SRC_DIR="${LIB_PATH}/src"
readonly STYLES_DIR="${LIB_PATH}/src/styles"
readonly STYLES_FILE="${LIB_PATH}/src/styles/styles.js"
readonly STYLES_FILE="${LIB_PATH}/src/styles/styles.ts"
readonly UTILITIES_STYLES_FILE="${LIB_PATH}/src/styles/utilities"
readonly STYLES_KEYS_FILE="${LIB_PATH}/scripts/style_keys_list_temp.txt"
readonly UTILITY_STYLES_KEYS_FILE="${LIB_PATH}/scripts/utility_keys_list_temp.txt"
Expand Down Expand Up @@ -210,7 +210,12 @@ find_theme_style_and_store_keys() {
fi

# Check if we are inside an arrow function
if [[ "$line" =~ ^[[:space:]]*([a-zA-Z0-9_-])+:[[:space:]]*\(.*\)[[:space:]]*'=>'[[:space:]]*\(\{ || "$line" =~ ^[[:space:]]*(const|let|var)[[:space:]]+([a-zA-Z0-9_-]+)[[:space:]]*=[[:space:]]*\(.*\)[[:space:]]*'=>' ]]; then
if [[ "$line" =~ ^[[:space:]]*([a-zA-Zgv 0-9_-])+:[[:space:]]*\(.*\)[[:space:]]*'=>'[[:space:]]*\(\{ || "$line" =~ ^[[:space:]]*([a-zA-Zgv 0-9_-])+:[[:space:]]*\(.*\)[[:space:]]*'=>' ]]; then
inside_arrow_function=true
continue
fi

if [[ "$line" =~ ^[[:space:]]*(const|let|var)[[:space:]]+([a-zA-Z0-9_-]+)[[:space:]]*=[[:space:]]*\(.*\)[[:space:]]*'=>' ]]; then
inside_arrow_function=true
continue
fi
Expand Down Expand Up @@ -348,7 +353,7 @@ echo "🔍 Looking for styles."
find_utility_styles_store_prefix
find_utility_usage_as_styles

# Find and store keys from styles.js
# Find and store keys from styles.ts
find_styles_object_and_store_keys "$STYLES_FILE"
find_styles_functions_and_store_keys "$STYLES_FILE"
collect_theme_keys_from_styles "$STYLES_FILE"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cherryPick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
validateActor:
runs-on: ubuntu-latest
outputs:
IS_DEPLOYER: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) || github.actor == 'OSBotify' }}
IS_DEPLOYER: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) || github.actor == 'OSBotify' || github.actor == 'os-botify[bot]' }}
steps:
- name: Check if user is deployer
id: isDeployer
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,15 @@ jobs:
if: ${{ always() && runner.debug != null && fromJSON(runner.debug) }}
run: cat "./Host_Machine_Files/\$WORKING_DIRECTORY/debug.log"

- name: Check if test failed, if so post the results and add the DeployBlocker label
run: |
if grep -q '🔴' ./Host_Machine_Files/\$WORKING_DIRECTORY/output.md; then
gh pr edit ${{ inputs.PR_NUMBER }} --add-label DeployBlockerCash
gh pr comment ${{ inputs.PR_NUMBER }} -F ./Host_Machine_Files/\$WORKING_DIRECTORY/output.md
gh pr comment ${{ inputs.PR_NUMBER }} -b "@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker."
else
echo '✅ no performance regression detected'
fi
env:
GITHUB_TOKEN: ${{ github.token }}
# TODO: Once tests are more reliable we should uncomment this
# - name: Check if test failed, if so post the results and add the DeployBlocker label
# run: |
# if grep -q '🔴' ./Host_Machine_Files/\$WORKING_DIRECTORY/output.md; then
# gh pr edit ${{ inputs.PR_NUMBER }} --add-label DeployBlockerCash
# gh pr comment ${{ inputs.PR_NUMBER }} -F ./Host_Machine_Files/\$WORKING_DIRECTORY/output.md
# gh pr comment ${{ inputs.PR_NUMBER }} -b "@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker."
# else
# echo '✅ no performance regression detected'
# fi
# env:
# GITHUB_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
validateActor:
runs-on: ubuntu-latest
outputs:
IS_DEPLOYER: ${{ fromJSON(steps.isUserDeployer.outputs.IS_DEPLOYER) || github.actor == 'OSBotify' }}
IS_DEPLOYER: ${{ fromJSON(steps.isUserDeployer.outputs.IS_DEPLOYER) || github.actor == 'OSBotify' || github.actor == 'os-botify[bot]' }}
steps:
- name: Check if user is deployer
id: isUserDeployer
Expand Down
4 changes: 4 additions & 0 deletions .well-known/apple-app-site-association
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
{
"/": "/search/*",
"comment": "Search"
},
{
"/": "/money2020/*",
"comment": "Money 2020"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="https://raw.githubusercontent.com/Expensify/App/main/web/favicon.png" width="64" height="64" alt="New Expensify Icon">
</a>
<h1>
<a href="https://new.expensify.com/">
<a href="https://new.expensify.com">
New Expensify
</a>
</h1>
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 1001038301
versionName "1.3.83-1"
versionCode 1001038402
versionName "1.3.84-2"
}

flavorDimensions "default"
Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<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="/money2020"/>

<!-- Staging URLs -->
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/r"/>
Expand All @@ -87,6 +88,7 @@
<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="/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
1 change: 1 addition & 0 deletions assets/animations/FastMoney.json

Large diffs are not rendered by default.

Loading

0 comments on commit 6891b3c

Please sign in to comment.