From 73663e3443e23339c1e27544a769705cd086e204 Mon Sep 17 00:00:00 2001 From: Adam Spofford Date: Fri, 20 Dec 2024 11:08:52 -0800 Subject: [PATCH 1/4] Add message for safari users --- .../project_templates/react/src/__frontend_name__/index.html | 4 ++++ .../react/src/__frontend_name__/src/index.scss | 4 ++++ .../svelte/src/__frontend_name__/src/app.html | 4 ++++ .../svelte/src/__frontend_name__/src/index.scss | 4 ++++ .../vanilla_js/src/__frontend_name__/index.html | 4 ++++ .../vanilla_js/src/__frontend_name__/src/index.scss | 4 ++++ .../project_templates/vue/src/__frontend_name__/index.html | 4 ++++ .../vue/src/__frontend_name__/src/index.scss | 4 ++++ 8 files changed, 32 insertions(+) diff --git a/src/dfx/assets/project_templates/react/src/__frontend_name__/index.html b/src/dfx/assets/project_templates/react/src/__frontend_name__/index.html index a8f14f76b8..25fca3f10f 100644 --- a/src/dfx/assets/project_templates/react/src/__frontend_name__/index.html +++ b/src/dfx/assets/project_templates/react/src/__frontend_name__/index.html @@ -10,6 +10,10 @@ +
+ ⚠️ If this page appears broken, try reloading. If the problem persists, your browser may be unsupported; try using + Chrome or Firefox. +
diff --git a/src/dfx/assets/project_templates/react/src/__frontend_name__/src/index.scss b/src/dfx/assets/project_templates/react/src/__frontend_name__/src/index.scss index c1c320834c..4e4575ea29 100644 --- a/src/dfx/assets/project_templates/react/src/__frontend_name__/src/index.scss +++ b/src/dfx/assets/project_templates/react/src/__frontend_name__/src/index.scss @@ -35,3 +35,7 @@ button[type="submit"] { #greeting:empty { display: none; } + +.browser-warning { + display: none; +} \ No newline at end of file diff --git a/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/app.html b/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/app.html index dfae06cc73..fed4ef3042 100644 --- a/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/app.html +++ b/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/app.html @@ -10,6 +10,10 @@ +
+ ⚠️ If this page appears broken, try reloading. If the problem persists, your browser may be unsupported; try + using Chrome or Firefox. +
%sveltekit.body%
diff --git a/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/index.scss b/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/index.scss index c1c320834c..4e4575ea29 100644 --- a/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/index.scss +++ b/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/index.scss @@ -35,3 +35,7 @@ button[type="submit"] { #greeting:empty { display: none; } + +.browser-warning { + display: none; +} \ No newline at end of file diff --git a/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/index.html b/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/index.html index 6c1db68a54..d15054a563 100644 --- a/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/index.html +++ b/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/index.html @@ -9,6 +9,10 @@ +
+ ⚠️ If this page appears broken, try reloading. If the problem persists, your browser may be unsupported; try using + Chrome or Firefox. +
diff --git a/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/src/index.scss b/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/src/index.scss index c1c320834c..4e4575ea29 100644 --- a/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/src/index.scss +++ b/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/src/index.scss @@ -35,3 +35,7 @@ button[type="submit"] { #greeting:empty { display: none; } + +.browser-warning { + display: none; +} \ No newline at end of file diff --git a/src/dfx/assets/project_templates/vue/src/__frontend_name__/index.html b/src/dfx/assets/project_templates/vue/src/__frontend_name__/index.html index 6e80f94528..35a86d708a 100644 --- a/src/dfx/assets/project_templates/vue/src/__frontend_name__/index.html +++ b/src/dfx/assets/project_templates/vue/src/__frontend_name__/index.html @@ -14,6 +14,10 @@ We're sorry but this application doesn't work properly without JavaScript enabled. Please enable it to continue. +
+ ⚠️ If this page appears broken, try reloading. If the problem persists, your browser may be unsupported; try using + Chrome or Firefox. +
diff --git a/src/dfx/assets/project_templates/vue/src/__frontend_name__/src/index.scss b/src/dfx/assets/project_templates/vue/src/__frontend_name__/src/index.scss index c1c320834c..4e4575ea29 100644 --- a/src/dfx/assets/project_templates/vue/src/__frontend_name__/src/index.scss +++ b/src/dfx/assets/project_templates/vue/src/__frontend_name__/src/index.scss @@ -35,3 +35,7 @@ button[type="submit"] { #greeting:empty { display: none; } + +.browser-warning { + display: none; +} \ No newline at end of file From 1753c373fee9d65d1cedba1dbfeab0c13ce56869 Mon Sep 17 00:00:00 2001 From: Adam Spofford Date: Fri, 20 Dec 2024 11:24:39 -0800 Subject: [PATCH 2/4] changeloig --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74ad5db1bd..5f2f26901f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ # UNRELEASED +### fix: template frontends now have unsupported browser warnings + +DFX's default security headers cause Safari to break when viewing local canisters. Warning messages +have been added to the frontend project templates when the page is broken that indicate to try switching +browsers. + ### fix: `dfx deploy --by-proposal` no longer sends chunk data in ProposeCommitBatch Recently we made `dfx deploy` include some chunk data in CommitBatch, in order to streamline From 9b1378101724befc2ef387768fa8dc5bc39dd01d Mon Sep 17 00:00:00 2001 From: Adam Spofford Date: Fri, 20 Dec 2024 13:00:39 -0800 Subject: [PATCH 3/4] Update message --- .../project_templates/react/src/__frontend_name__/index.html | 4 ++-- .../svelte/src/__frontend_name__/src/app.html | 4 ++-- .../vanilla_js/src/__frontend_name__/index.html | 4 ++-- .../project_templates/vue/src/__frontend_name__/index.html | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/dfx/assets/project_templates/react/src/__frontend_name__/index.html b/src/dfx/assets/project_templates/react/src/__frontend_name__/index.html index 25fca3f10f..0ad7b99b93 100644 --- a/src/dfx/assets/project_templates/react/src/__frontend_name__/index.html +++ b/src/dfx/assets/project_templates/react/src/__frontend_name__/index.html @@ -11,8 +11,8 @@
- ⚠️ If this page appears broken, try reloading. If the problem persists, your browser may be unsupported; try using - Chrome or Firefox. + ⚠️ If this page appears broken, try reloading. If the problem persists, try switching browsers; Chrome or + Firefox are recommended.
diff --git a/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/app.html b/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/app.html index fed4ef3042..d4a7d45f50 100644 --- a/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/app.html +++ b/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/app.html @@ -11,8 +11,8 @@
- ⚠️ If this page appears broken, try reloading. If the problem persists, your browser may be unsupported; try - using Chrome or Firefox. + ⚠️ If this page appears broken, try reloading. If the problem persists, try switching browsers; Chrome or + Firefox are recommended.
%sveltekit.body%
diff --git a/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/index.html b/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/index.html index d15054a563..482508af30 100644 --- a/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/index.html +++ b/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/index.html @@ -10,8 +10,8 @@
- ⚠️ If this page appears broken, try reloading. If the problem persists, your browser may be unsupported; try using - Chrome or Firefox. + ⚠️ If this page appears broken, try reloading. If the problem persists, try switching browsers; Chrome or + Firefox are recommended.
diff --git a/src/dfx/assets/project_templates/vue/src/__frontend_name__/index.html b/src/dfx/assets/project_templates/vue/src/__frontend_name__/index.html index 35a86d708a..8ba7f24a12 100644 --- a/src/dfx/assets/project_templates/vue/src/__frontend_name__/index.html +++ b/src/dfx/assets/project_templates/vue/src/__frontend_name__/index.html @@ -15,8 +15,8 @@ JavaScript enabled. Please enable it to continue.
- ⚠️ If this page appears broken, try reloading. If the problem persists, your browser may be unsupported; try using - Chrome or Firefox. + ⚠️ If this page appears broken, try reloading. If the problem persists, try switching browsers; Chrome or + Firefox are recommended.
From 9ef8d6a7692974b2c6dd1d8d7f31f7e9728f3d43 Mon Sep 17 00:00:00 2001 From: Adam Spofford Date: Mon, 30 Dec 2024 07:06:08 -0800 Subject: [PATCH 4/4] =?UTF-8?q?=E2=90=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/__frontend_name__/src/index.scss | 2 +- .../svelte/src/__frontend_name__/src/index.scss | 2 +- .../vanilla_js/src/__frontend_name__/src/index.scss | 2 +- .../project_templates/vue/src/__frontend_name__/src/index.scss | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dfx/assets/project_templates/react/src/__frontend_name__/src/index.scss b/src/dfx/assets/project_templates/react/src/__frontend_name__/src/index.scss index 4e4575ea29..283585fb27 100644 --- a/src/dfx/assets/project_templates/react/src/__frontend_name__/src/index.scss +++ b/src/dfx/assets/project_templates/react/src/__frontend_name__/src/index.scss @@ -38,4 +38,4 @@ button[type="submit"] { .browser-warning { display: none; -} \ No newline at end of file +} diff --git a/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/index.scss b/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/index.scss index 4e4575ea29..283585fb27 100644 --- a/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/index.scss +++ b/src/dfx/assets/project_templates/svelte/src/__frontend_name__/src/index.scss @@ -38,4 +38,4 @@ button[type="submit"] { .browser-warning { display: none; -} \ No newline at end of file +} diff --git a/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/src/index.scss b/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/src/index.scss index 4e4575ea29..283585fb27 100644 --- a/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/src/index.scss +++ b/src/dfx/assets/project_templates/vanilla_js/src/__frontend_name__/src/index.scss @@ -38,4 +38,4 @@ button[type="submit"] { .browser-warning { display: none; -} \ No newline at end of file +} diff --git a/src/dfx/assets/project_templates/vue/src/__frontend_name__/src/index.scss b/src/dfx/assets/project_templates/vue/src/__frontend_name__/src/index.scss index 4e4575ea29..283585fb27 100644 --- a/src/dfx/assets/project_templates/vue/src/__frontend_name__/src/index.scss +++ b/src/dfx/assets/project_templates/vue/src/__frontend_name__/src/index.scss @@ -38,4 +38,4 @@ button[type="submit"] { .browser-warning { display: none; -} \ No newline at end of file +}