Re: [w3c/manifest] Rewrite installation process and install prompting logic (#790)

mgiuca commented on this pull request.



>          </p>
+        <ol>
+          <li>Show some user-agent-specific UI, asking the user whether to
+          proceed with installing the app. See <a href=
+          "#installation-sec">privacy and security considerations</a> for
+          recommendations relating to this UI. The <var>result</var> of this
+          choice is either <a data-link-for=
+          "AppBannerPromptOutcome">accepted</a> or <a data-link-for=
+          "AppBannerPromptOutcome">dismissed</a>.
+          </li>
+          <li>If <var>result</var> is <a data-link-for=
+          "AppBannerPromptOutcome">accepted</a>, then in parallel, run the <a>
+            steps to install the web application</a>.
+          </li>
+          <li>Return <var>result</var>.

It's intended to be before (i.e., your reading is correct). I don't think it's ambiguous: that's precisely the meaning of "in parallel" (otherwise I wouldn't have said "in parallel").

The result of "present an install prompt" should be the user's choice, not the success of the installation. The result of this promise reflects the user's choice, whereas the `appinstalled` event reflects whether it was actually installed.

At least, that was my intention. Now I'm not so sure. Looking at Chrome's [app_banner_manager](https://cs.chromium.org/chromium/src/chrome/browser/banners/app_banner_manager_desktop.cc?l=197), the code that sends BannerAccepted (which results in the promise resolving with `"accepted"`) has a comment:

```C++
  // Catch only kSuccessNewInstall and kUserInstallDeclined. Report nothing on
  // all other errors.
```

implying that maybe we resolve with `"accepted"` if the user accepts AND installation is success, and perhaps we never resole if the user accepts and installation fails??? @dominickng Can you confirm what Chrome is doing here?

We should decide what the (currently unspecified) behaviour should be if the user accepts the banner but the installation fails: if we want to resolve with `"accepted"` then the proposed text is correct. If not, we should delete "in parallel" and figure out what to resolve with (perhaps we should introduce a new `"accepted-but-failed"` result?

-- 
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/pull/790#discussion_r323558555

Received on Thursday, 12 September 2019 05:15:35 UTC