[w3c/manifest] Refactor the manifest install flow (#788)

The [**steps to install the web application**](https://www.w3.org/TR/appmanifest/#dfn-steps-to-install-the-web-application) is a bit of a mess. (In addition to #787.)

Firstly, it's confusing having both [**installation process**](https://www.w3.org/TR/appmanifest/#dfn-installation-process) (the unspecified user-agent-specific part of installation) as well as **steps to install the web application** (with specific steps). The latter calls the former as its first step, but the order of operations is quite confusing here: first the install process is initiated (does that mean wait until it's finished, or just start it off in a separate thread of execution, in which case this step should have its own "in parallel"?), then we do things like fetching the manifest which would seem necessary to the install process. But we can't move the install process later on in the steps, because prompting the user is part of the install process.

Secondly, prompting the user can't be part of the steps to install the web application, since some flows (those that use [**request to present an install prompt**](https://www.w3.org/TR/appmanifest/#dfn-request-to-present-an-install-prompt)) have already prompted the user by that point (although, those [don't actually trigger these steps](https://github.com/w3c/manifest/issues/786)).

Determining whether the manifest is valid and the site is installable really can't be part of "steps to install the web application" since we need that information before we decide to even show a prompt to the user (e.g., so the user agent can determine whether to show an install button in its UI).

I propose that we:
1. Split apart the determination of whether a site is installable out of the steps to install, making it a separate process, "steps to determine installability of the document".
2. Split apart prompting the user out of the "installation process", making it a precursor step (i.e., "steps to install the web application" is only triggered *after* the user accepts the prompt).
3. Remove the concept of "installation process" that runs in parallel to "steps to install the web application"; instead adding an explicit step to perform unspecified actions to register the app with the host OS.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/788

Received on Thursday, 12 September 2019 02:00:28 UTC