Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BeforeInstallPrompt feature #2510

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

BeforeInstallPrompt feature #2510

wants to merge 2 commits into from

Conversation

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Jan 9, 2025
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor issues around names and descriptions, but BCD is giving me a little headache here.

@@ -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/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is pretty interesting. In the course of trying to figure out whether there was a more specific link to use here, I got to wondering why MDN doesn't link to this spec. That turned up these PRs:

This puts us in a slightly awkward spot here. BCD shows unqualified support for the API, even where it departs from the spec (because it effectively pretends the spec doesn't exist). We have some options here:

  • If we were to link to the spec, we're sort of implying that the Chrome and Edge support for this feature reflects support for this specification.
  • Not linking to a specification at all is a difficult alternative (not least of which being that the schema requires it)—what even is the feature, at that point, if we can't point to a definition?
  • We could go upstream and unroll some of Will's changes to the compat data, breaking correspondence between MDN content and BCD.
  • Override BCD's status.

Or maybe something I haven't thought of yet.

@@ -0,0 +1,12 @@
name: In-app install experience
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very excited about this name. It's not very specific and it doesn't seem to be widely used (or perhaps used at all) in the existing blog posts and docs about this. I think good alternatives might be (in my order of preference):

  • beforeinstallprompt
  • App install prompt
  • App install prompt event

In any case, the ID would need to change too.

@@ -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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
description: The `beforeinstallprompt` event fires when a Progressive Web App (PWA) is installable, typically on page load in browsers that support installing PWAs. You can use this event to ask users to install within your site, instead of using a generic prompt provided by the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants