From e02245ceecadc1ef42b0711f6849596fa62786ac Mon Sep 17 00:00:00 2001 From: Rodrigo Lino da Costa Date: Thu, 12 Oct 2023 17:42:48 -0300 Subject: [PATCH 1/5] added manifest to web to prompt app install in chrome --- android/app/src/main/AndroidManifest.xml | 2 ++ android/app/src/main/res/values/strings.xml | 12 +++++++++ config/webpack/webpack.common.js | 1 + web/index.html | 29 +++++++++++---------- web/manifest.json | 25 ++++++++++++++++++ 5 files changed, 55 insertions(+), 14 deletions(-) create mode 100644 web/manifest.json diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index d823324f50bf..9c7955e77887 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -102,5 +102,7 @@ android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/bootsplash_background" /> + + diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index ea9d58b49ab0..95ea68ef3a00 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -1,3 +1,15 @@ New Expensify + + + + [{ + \"relation\": [\"delegate_permission/common.handle_all_urls\"], + \"target\": { + \"namespace\": \"web\", + \"site\": \"https://new.expensify.com\" + } + }] + + diff --git a/config/webpack/webpack.common.js b/config/webpack/webpack.common.js index 7dc851c95c9e..57797c5c7299 100644 --- a/config/webpack/webpack.common.js +++ b/config/webpack/webpack.common.js @@ -83,6 +83,7 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({ {from: 'web/favicon-unread.png'}, {from: 'web/og-preview-image.png'}, {from: 'web/apple-touch-icon.png'}, + {from: 'web/manifest.json'}, {from: 'assets/css', to: 'css'}, {from: 'assets/fonts/web', to: 'fonts'}, {from: 'node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css', to: 'css/AnnotationLayer.css'}, diff --git a/web/index.html b/web/index.html index c95a27e7219a..e5a1d7ecbeab 100644 --- a/web/index.html +++ b/web/index.html @@ -94,31 +94,31 @@ transition: transform var(--label-transition-duration); } - @media screen and (min-width: 480px) { - .splash-logo > svg { - width: 104px; - height: 104px; + @media screen and (min-width: 480px) { + .splash-logo > svg { + width: 104px; + height: 104px; } } - @media screen and (max-width: 479px) { - .splash-logo > svg { - width: 52px; - height: 52px; + @media screen and (max-width: 479px) { + .splash-logo > svg { + width: 52px; + height: 52px; } } #splash { - position: absolute; + position: absolute; bottom: 0; left: 0; right: 0; top: 0; - background-color: #061B09; - width: 100%; - height: 100%; - display: flex; - justify-content: center; + background-color: #061B09; + width: 100%; + height: 100%; + display: flex; + justify-content: center; align-items: center; transition-duration: 250ms; transition-property: opacity; @@ -131,6 +131,7 @@ <% } %> +
diff --git a/web/manifest.json b/web/manifest.json new file mode 100644 index 000000000000..38b66633995e --- /dev/null +++ b/web/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "New Expensify", + "name": "New Expensify", + "icons": [ + { + "src": "/apple-touch-icon.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "/apple-touch-icon.png", + "type": "image/png", + "sizes": "192x192" + } + ], + "prefer_related_applications": true, + "related_applications": [ + { + "platform": "play", + "id": "com.expensify.chat" + } + ], + "start_url": ".", + "display": "standalone" +} From 7647df6d534a1c1d90f39144afac8e2a38f0ed44 Mon Sep 17 00:00:00 2001 From: Rodrigo Lino da Costa Date: Fri, 13 Oct 2023 11:47:58 -0300 Subject: [PATCH 2/5] Added svg icon to manifest.json instead of the png one --- config/webpack/webpack.common.js | 1 + web/expensify-app-icon.svg | 18 ++++++++++++++++++ web/manifest.json | 11 +++-------- 3 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 web/expensify-app-icon.svg diff --git a/config/webpack/webpack.common.js b/config/webpack/webpack.common.js index 57797c5c7299..c5012feadb09 100644 --- a/config/webpack/webpack.common.js +++ b/config/webpack/webpack.common.js @@ -83,6 +83,7 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({ {from: 'web/favicon-unread.png'}, {from: 'web/og-preview-image.png'}, {from: 'web/apple-touch-icon.png'}, + {from: 'web/expensify-app-icon.svg'}, {from: 'web/manifest.json'}, {from: 'assets/css', to: 'css'}, {from: 'assets/fonts/web', to: 'fonts'}, diff --git a/web/expensify-app-icon.svg b/web/expensify-app-icon.svg new file mode 100644 index 000000000000..a0adfe7dd952 --- /dev/null +++ b/web/expensify-app-icon.svg @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/web/manifest.json b/web/manifest.json index 38b66633995e..396e4bb23d0f 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -3,14 +3,9 @@ "name": "New Expensify", "icons": [ { - "src": "/apple-touch-icon.png", - "type": "image/png", - "sizes": "512x512" - }, - { - "src": "/apple-touch-icon.png", - "type": "image/png", - "sizes": "192x192" + "src": "/expensify-app-icon.svg", + "type": "image/svg+xml", + "sizes": "any" } ], "prefer_related_applications": true, From ef6286d1356056390b463864bc50d146e275b58b Mon Sep 17 00:00:00 2001 From: Rodrigo Lino da Costa Date: Fri, 13 Oct 2023 11:59:30 -0300 Subject: [PATCH 3/5] reverting adding asset_statements since it should be used for another thing --- android/app/src/main/AndroidManifest.xml | 2 -- android/app/src/main/res/values/strings.xml | 12 ------------ 2 files changed, 14 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 9c7955e77887..d823324f50bf 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -102,7 +102,5 @@ android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/bootsplash_background" /> - - diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 95ea68ef3a00..ea9d58b49ab0 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -1,15 +1,3 @@ New Expensify - - - - [{ - \"relation\": [\"delegate_permission/common.handle_all_urls\"], - \"target\": { - \"namespace\": \"web\", - \"site\": \"https://new.expensify.com\" - } - }] - - From 9b82c7f6691ae155932d83a581527875e99413b6 Mon Sep 17 00:00:00 2001 From: Rodrigo Lino da Costa Date: Mon, 16 Oct 2023 23:23:54 -0300 Subject: [PATCH 4/5] running prettier because of failed PR --- web/index.html | 2 +- web/manifest.json | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/web/index.html b/web/index.html index e5a1d7ecbeab..a72469be3b3a 100644 --- a/web/index.html +++ b/web/index.html @@ -131,7 +131,7 @@ <% } %> - +
diff --git a/web/manifest.json b/web/manifest.json index 396e4bb23d0f..7863c1f7e491 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,20 +1,20 @@ { - "short_name": "New Expensify", - "name": "New Expensify", - "icons": [ - { - "src": "/expensify-app-icon.svg", - "type": "image/svg+xml", - "sizes": "any" - } - ], - "prefer_related_applications": true, - "related_applications": [ - { - "platform": "play", - "id": "com.expensify.chat" - } - ], - "start_url": ".", - "display": "standalone" + "short_name": "New Expensify", + "name": "New Expensify", + "icons": [ + { + "src": "expensify-app-icon.svg", + "type": "image/svg+xml", + "sizes": "any" + } + ], + "prefer_related_applications": true, + "related_applications": [ + { + "platform": "play", + "id": "com.expensify.chat" + } + ], + "start_url": ".", + "display": "standalone" } From 2ca88533439c1dd9da941e2959bb92137eaef88f Mon Sep 17 00:00:00 2001 From: Rodrigo Lino da Costa Date: Fri, 20 Oct 2023 13:53:41 -0300 Subject: [PATCH 5/5] using already added expensify icon --- config/webpack/webpack.common.js | 2 +- web/expensify-app-icon.svg | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 web/expensify-app-icon.svg diff --git a/config/webpack/webpack.common.js b/config/webpack/webpack.common.js index c5012feadb09..d8a24adefdc3 100644 --- a/config/webpack/webpack.common.js +++ b/config/webpack/webpack.common.js @@ -83,7 +83,7 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({ {from: 'web/favicon-unread.png'}, {from: 'web/og-preview-image.png'}, {from: 'web/apple-touch-icon.png'}, - {from: 'web/expensify-app-icon.svg'}, + {from: 'assets/images/expensify-app-icon.svg'}, {from: 'web/manifest.json'}, {from: 'assets/css', to: 'css'}, {from: 'assets/fonts/web', to: 'fonts'}, diff --git a/web/expensify-app-icon.svg b/web/expensify-app-icon.svg deleted file mode 100644 index a0adfe7dd952..000000000000 --- a/web/expensify-app-icon.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - -