Skip to content

Commit

Permalink
Merge branch 'main' into search-v2/search-results
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekBoman committed Jul 26, 2024
2 parents ec25f9c + 750c34e commit 90227ac
Show file tree
Hide file tree
Showing 447 changed files with 8,192 additions and 3,952 deletions.
11 changes: 10 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ const restrictedImportPaths = [
"For 'ExpensiMark', please use '@libs/Parser' instead.",
].join('\n'),
},
{
name: 'lodash/memoize',
message: "Please use '@src/libs/memoize' instead.",
},
{
name: 'lodash',
importNames: ['memoize'],
message: "Please use '@src/libs/memoize' instead.",
},
];

const restrictedImportPatterns = [
Expand Down Expand Up @@ -97,7 +106,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:you-dont-need-lodash-underscore/all',
'prettier',
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library', 'eslint-plugin-react-compiler'],
ignorePatterns: ['lib/**'],
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/composite/buildAndroidE2EAPK/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ runs:
- name: Build APK
run: npm run ${{ inputs.PACKAGE_SCRIPT_NAME }}
shell: bash
env:
RUBYOPT: '-rostruct'

- name: Upload APK
uses: actions/upload-artifact@v4
Expand Down
37 changes: 35 additions & 2 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,46 @@ jobs:
aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE ${{ env.S3_URL }}/.well-known/apple-app-site-association ${{ env.S3_URL }}/.well-known/apple-app-site-association
aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE ${{ env.S3_URL }}/.well-known/apple-app-site-association ${{env.S3_URL }}/apple-app-site-association
env:
S3_URL: s3://${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging-' }}expensify-cash
S3_URL: s3://${{ env.SHOULD_DEPLOY_PRODUCTION != 'true' && 'staging-' || '' }}expensify-cash

- name: Purge Cloudflare cache
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging.' }}new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["${{ env.SHOULD_DEPLOY_PRODUCTION != 'true' && 'staging.' || '' }}new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
env:
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}

- name: Verify staging deploy
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: |
DOWNLOADED_VERSION="$(wget -q -O /dev/stdout https://staging.new.expensify.com/version.json | jq -r '.version')"
if [[ '${{ github.ref_name }}' != "$DOWNLOADED_VERSION" ]]; then
echo "Error: deployed version does not match local version. Something went wrong..."
exit 1
fi
- name: Verify production deploy
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: |
DOWNLOADED_VERSION="$(wget -q -O /dev/stdout https://new.expensify.com/version.json | jq -r '.version')"
if [[ '${{ github.event.release.tag_name }}' != "$DOWNLOADED_VERSION" ]]; then
echo "Error: deployed version does not match local version. Something went wrong..."
exit 1
fi
- name: Upload web build to GitHub artifacts
uses: actions/upload-artifact@v4
with:
name: web-build
path: dist

- name: Upload web build to GitHub Release
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run:
tar -czvf webBuild.tar.gz dist
zip -r webBuild.zip dist
gh release upload ${{ github.event.release.tag_name }} webBuild.tar.gz webBuild.zip
env:
GITHUB_TOKEN: ${{ github.token }}

postSlackMessageOnFailure:
name: Post a Slack message when any platform fails to build or deploy
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 5
command: cd ios && bundle exec pod install
command: cd ios && bundle exec pod install --verbose

- name: Decrypt AdHoc profile
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output NewApp_AdHoc.mobileprovision NewApp_AdHoc.mobileprovision.gpg
Expand Down
23 changes: 15 additions & 8 deletions .storybook/fonts.css
Original file line number Diff line number Diff line change
@@ -1,52 +1,59 @@
@font-face {
font-family: ExpensifyNeue-Regular;
font-family: Expensify Neue;
font-weight: 400;
font-style: normal;
src: url('../assets/fonts/web/ExpensifyNeue-Regular.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNeue-Regular.woff') format('woff');
}

@font-face {
font-family: ExpensifyNeue-Regular;
font-family: Expensify Neue;
font-weight: 700;
font-style: normal;
src: url('../assets/fonts/web/ExpensifyNeue-Bold.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNeue-Bold.woff') format('woff');
}

@font-face {
font-family: ExpensifyNeue-Regular;
font-family: Expensify Neue;
font-weight: 400;
font-style: italic;
src: url('../assets/fonts/web/ExpensifyNeue-Italic.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNeue-Italic.woff') format('woff');
}

@font-face {
font-family: ExpensifyNeue-Regular;
font-family: Expensify Neue;
font-weight: 700;
font-style: italic;
src: url('../assets/fonts/web/ExpensifyNeue-BoldItalic.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNeue-BoldItalic.woff') format('woff');
}

@font-face {
font-family: ExpensifyMono-Regular;
font-family: Expensify Mono;
font-weight: 400;
font-style: normal;
src: url('../assets/fonts/web/ExpensifyMono-Regular.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyMono-Regular.woff') format('woff');
}

@font-face {
font-family: ExpensifyMono-Bold;
font-family: Expensify Mono;
font-weight: 700;
font-style: normal;
src: url('../assets/fonts/web/ExpensifyMono-Bold.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyMono-Bold.woff') format('woff');
}

@font-face {
font-family: ExpensifyNewKansas-Medium;
font-weight: 400;
font-family: Expensify New Kansas;
font-weight: 500;
font-style: normal;
src: url('../assets/fonts/web/ExpensifyNewKansas-Medium.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNewKansas-Medium.woff') format('woff');
}

@font-face {
font-family: Expensify New Kansas;
font-weight: 500;
font-style: italic;
src: url('../assets/fonts/web/ExpensifyNewKansas-MediumItalic.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNewKansas-MediumItalic.woff') format('woff');
}

* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Expand Down
2 changes: 1 addition & 1 deletion .storybook/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import colors from '../src/styles/theme/colors';
const theme: ThemeVars = create({
brandTitle: 'New Expensify UI Docs',
brandImage: 'logomark.svg',
fontBase: 'ExpensifyNeue-Regular',
fontBase: 'Expensify Neue',
fontCode: 'monospace',
base: 'dark',
appBg: colors.productDark200,
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009001002
versionName "9.0.10-2"
versionCode 1009001300
versionName "9.0.13-0"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.expensify.chat

import com.facebook.react.common.assets.ReactFontManager

import android.app.ActivityManager
import android.content.res.Configuration
import android.database.CursorWindow
Expand Down Expand Up @@ -42,6 +44,9 @@ class MainApplication : MultiDexApplication(), ReactApplication {

override fun onCreate() {
super.onCreate()
ReactFontManager.getInstance().addCustomFont(this, "Expensify New Kansas", R.font.expensify_new_kansas)
ReactFontManager.getInstance().addCustomFont(this, "Expensify Neue", R.font.expensify_neue)
ReactFontManager.getInstance().addCustomFont(this, "Expensify Mono", R.font.expensify_mono)

RNPerformance.getInstance().mark("appCreationStart", false);

Expand Down
5 changes: 5 additions & 0 deletions android/app/src/main/res/font/expensify_mono.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
<font app:fontStyle="normal" app:fontWeight="400" app:font="@font/expensifymono_regular"/>
<font app:fontStyle="normal" app:fontWeight="700" app:font="@font/expensifymono_bold"/>
</font-family>
7 changes: 7 additions & 0 deletions android/app/src/main/res/font/expensify_neue.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
<font app:fontStyle="italic" app:fontWeight="400" app:font="@font/expensifyneue_italic"/>
<font app:fontStyle="normal" app:fontWeight="400" app:font="@font/expensifyneue_regular"/>
<font app:fontStyle="italic" app:fontWeight="700" app:font="@font/expensifyneue_bolditalic"/>
<font app:fontStyle="normal" app:fontWeight="700" app:font="@font/expensifyneue_bold"/>
</font-family>
5 changes: 5 additions & 0 deletions android/app/src/main/res/font/expensify_new_kansas.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
<font app:fontStyle="italic" app:fontWeight="500" app:font="@font/expensifynewkansas_mediumitalic"/>
<font app:fontStyle="normal" app:fontWeight="500" app:font="@font/expensifynewkansas_medium"/>
</font-family>
Binary file removed android/app/src/main/res/font/expneuebold.otf
Binary file not shown.
Binary file removed android/app/src/main/res/font/expneueregular.otf
Binary file not shown.
8 changes: 4 additions & 4 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<style name="TextViewSpinnerDropDownItem" parent="Widget.AppCompat.DropDownItem.Spinner">
<item name="android:textColor">@color/white</item>
<item name="android:textSize">@dimen/spinner_font_size</item>
<item name="android:fontFamily">@font/expneuebold</item>
<item name="android:fontFamily">@font/expensifyneue_bold</item>
</style>

<!-- Theme used by the Alert dialog -->
Expand All @@ -37,15 +37,15 @@
</style>

<style name="AlertTextAppearanceSmall" parent="TextAppearance.AppCompat.Small">
<item name="android:fontFamily">@font/expneueregular</item>
<item name="android:fontFamily">@font/expensifyneue_regular</item>
</style>

<style name="AlertTextAppearanceMedium" parent="TextAppearance.AppCompat.Medium">
<item name="android:fontFamily">@font/expneueregular</item>
<item name="android:fontFamily">@font/expensifyneue_regular</item>
</style>

<style name="AlertTextAppearanceLarge" parent="TextAppearance.AppCompat.Large">
<item name="android:fontFamily">@font/expneuebold</item>
<item name="android:fontFamily">@font/expensifyneue_bold</item>
</style>

<style name="Theme.SplashScreen.Common" parent="Theme.AppCompat.NoActionBar">
Expand Down
2 changes: 1 addition & 1 deletion android/link-assets-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"migIndex": 1,
"migIndex": 2,
"data": [
{
"path": "assets/fonts/native/ExpensifyMono-Bold.otf",
Expand Down
Loading

0 comments on commit 90227ac

Please sign in to comment.