From acbb79f5015507a78a0f6bee58698e5b611d1832 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 9 Jan 2025 14:25:45 +0100 Subject: [PATCH 1/2] BeforeInstallPrompt feature --- features/draft/spec/manifest-incubations.yml | 7 ---- .../draft/spec/manifest-incubations.yml.dist | 23 ----------- features/in-app-install.yml | 12 ++++++ features/in-app-install.yml.dist | 41 +++++++++++++++++++ 4 files changed, 53 insertions(+), 30 deletions(-) delete mode 100644 features/draft/spec/manifest-incubations.yml delete mode 100644 features/draft/spec/manifest-incubations.yml.dist create mode 100644 features/in-app-install.yml create mode 100644 features/in-app-install.yml.dist diff --git a/features/draft/spec/manifest-incubations.yml b/features/draft/spec/manifest-incubations.yml deleted file mode 100644 index 1aece46fd77..00000000000 --- a/features/draft/spec/manifest-incubations.yml +++ /dev/null @@ -1,7 +0,0 @@ -draft_date: 2024-09-09 -name: Manifest Incubations -description: TODO -spec: https://wicg.github.io/manifest-incubations/ -compat_features: - - api.Window.appinstalled_event - - api.Window.beforeinstallprompt_event diff --git a/features/draft/spec/manifest-incubations.yml.dist b/features/draft/spec/manifest-incubations.yml.dist deleted file mode 100644 index 3ec7f4f2bb1..00000000000 --- a/features/draft/spec/manifest-incubations.yml.dist +++ /dev/null @@ -1,23 +0,0 @@ -# Generated from: manifest-incubations.yml -# Do not edit this file by hand. Edit the source file instead! - -status: - baseline: false - support: - chrome: "64" - chrome_android: "61" - edge: "79" -compat_features: - # baseline: false - # support: - # chrome: "61" - # chrome_android: "61" - # edge: "79" - - api.Window.beforeinstallprompt_event - - # baseline: false - # support: - # chrome: "64" - # chrome_android: "57" - # edge: "79" - - api.Window.appinstalled_event diff --git a/features/in-app-install.yml b/features/in-app-install.yml new file mode 100644 index 00000000000..038be9348f3 --- /dev/null +++ b/features/in-app-install.yml @@ -0,0 +1,12 @@ +name: In-app install experience +description: On browsers that support installing Progressive Web Apps (PWAs), the `beforeinstallprompt` event can be used to defer the browser installation flow until when the user interacts with an in-app install button. +spec: https://wicg.github.io/manifest-incubations/ +group: progressive-web-app +compat_features: + - api.Window.beforeinstallprompt_event + - api.BeforeInstallPromptEvent + - api.BeforeInstallPromptEvent.BeforeInstallPromptEvent + - api.BeforeInstallPromptEvent.platforms + - api.BeforeInstallPromptEvent.prompt + - api.BeforeInstallPromptEvent.userChoice + - api.Window.appinstalled_event diff --git a/features/in-app-install.yml.dist b/features/in-app-install.yml.dist new file mode 100644 index 00000000000..0adef33f697 --- /dev/null +++ b/features/in-app-install.yml.dist @@ -0,0 +1,41 @@ +# Generated from: in-app-install.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "76" + chrome_android: "76" + edge: "79" +compat_features: + # baseline: false + # support: + # chrome: "44" + # chrome_android: "44" + # edge: "79" + - api.BeforeInstallPromptEvent + - api.BeforeInstallPromptEvent.BeforeInstallPromptEvent + - api.BeforeInstallPromptEvent.platforms + - api.BeforeInstallPromptEvent.userChoice + + # baseline: false + # support: + # chrome: "61" + # chrome_android: "61" + # edge: "79" + - api.Window.beforeinstallprompt_event + + # baseline: false + # support: + # chrome: "64" + # chrome_android: "57" + # edge: "79" + - api.Window.appinstalled_event + + # ⬇️ Same status as overall feature ⬇️ + # baseline: false + # support: + # chrome: "76" + # chrome_android: "76" + # edge: "79" + - api.BeforeInstallPromptEvent.prompt From 7b2a16263c33a0b9f60d6343966b78140a6982f1 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Tue, 28 Jan 2025 16:49:08 +0100 Subject: [PATCH 2/2] Address review comments --- features/beforeinstallprompt.yml | 14 ++++++++++++++ ...stall.yml.dist => beforeinstallprompt.yml.dist} | 2 +- features/in-app-install.yml | 12 ------------ 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 features/beforeinstallprompt.yml rename features/{in-app-install.yml.dist => beforeinstallprompt.yml.dist} (95%) delete mode 100644 features/in-app-install.yml diff --git a/features/beforeinstallprompt.yml b/features/beforeinstallprompt.yml new file mode 100644 index 00000000000..c3b3c9e1d8b --- /dev/null +++ b/features/beforeinstallprompt.yml @@ -0,0 +1,14 @@ +name: beforeinstallprompt +description: The `beforeinstallprompt` event fires when a Progressive Web App (PWA) is installable, usually on page load in browsers that support installing PWAs. You can use this event to prevent the install prompt from appearing until after the user interacts with an element on the page. +# The only engine where beforeinstallprompt is not supported is Chromium, and its implementation differs from the spec. +# BCD/MDN don't link to the spec because of this, and instead document what's in Chromium. +spec: https://wicg.github.io/manifest-incubations/ +group: progressive-web-app +compat_features: + - api.Window.beforeinstallprompt_event + - api.BeforeInstallPromptEvent + - api.BeforeInstallPromptEvent.BeforeInstallPromptEvent + - api.BeforeInstallPromptEvent.platforms + - api.BeforeInstallPromptEvent.prompt + - api.BeforeInstallPromptEvent.userChoice + - api.Window.appinstalled_event diff --git a/features/in-app-install.yml.dist b/features/beforeinstallprompt.yml.dist similarity index 95% rename from features/in-app-install.yml.dist rename to features/beforeinstallprompt.yml.dist index 0adef33f697..59c2095926e 100644 --- a/features/in-app-install.yml.dist +++ b/features/beforeinstallprompt.yml.dist @@ -1,4 +1,4 @@ -# Generated from: in-app-install.yml +# Generated from: beforeinstallprompt.yml # Do not edit this file by hand. Edit the source file instead! status: diff --git a/features/in-app-install.yml b/features/in-app-install.yml deleted file mode 100644 index 038be9348f3..00000000000 --- a/features/in-app-install.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: In-app install experience -description: On browsers that support installing Progressive Web Apps (PWAs), the `beforeinstallprompt` event can be used to defer the browser installation flow until when the user interacts with an in-app install button. -spec: https://wicg.github.io/manifest-incubations/ -group: progressive-web-app -compat_features: - - api.Window.beforeinstallprompt_event - - api.BeforeInstallPromptEvent - - api.BeforeInstallPromptEvent.BeforeInstallPromptEvent - - api.BeforeInstallPromptEvent.platforms - - api.BeforeInstallPromptEvent.prompt - - api.BeforeInstallPromptEvent.userChoice - - api.Window.appinstalled_event