Re: [w3c/manifest] What theme color should be used when a PWA window is out of scope? (#755)

As I wrote on #879, I don't think C is reasonable (I agree with @dominickng and @alancutter here), which is what was proposed on the PR. I don't think B is good either, it means your window is stateful, based on your navigation history. Strong preference for A.

I don't feel strongly that this requires a spec change. If anything, it just requires a clarification of what a manifest being "[applied](https://www.w3.org/TR/appmanifest/#dfn-apply)" actually means.

The spec seems to have conflicting ideas about whether the manifest is still [applied](https://www.w3.org/TR/appmanifest/#dfn-apply) to off-scope navigations. The definition of "[applied](https://www.w3.org/TR/appmanifest/#dfn-apply)" itself says what it means to be applied, but not when:

> A [manifest](https://www.w3.org/TR/appmanifest/#dfn-manifest) is **_applied_** to a [top-level browsing context](https://html.spec.whatwg.org/multipage/browsers.html#top-level-browsing-context), meaning that the members of the [manifest](https://www.w3.org/TR/appmanifest/#dfn-manifest) are affecting the presentation or behavior of a browsing context.

In fact, there is nowhere that outright states under what conditions a manifest is applied to a top-level browsing context, but there is this problematic definition of [navigation scope](https://www.w3.org/TR/appmanifest/#dfn-navigation-scope):

> A _**navigation scope**_ is a [URL](https://url.spec.whatwg.org/#concept-url) that represents the set of URLs to which an [application context](https://www.w3.org/TR/appmanifest/#dfn-application-context) can be navigated while the manifest is [applied](https://www.w3.org/TR/appmanifest/#dfn-apply).

That implies that it's impossible to navigate to an off-scope URL whilst the manifest is still being applied. However, the opposite is implied by this non-normative note:

> Nothing prevents an [application context](https://www.w3.org/TR/appmanifest/#dfn-application-context) from navigating to a [URL](https://url.spec.whatwg.org/#concept-url) that is outside of the application's [navigation scope](https://www.w3.org/TR/appmanifest/#dfn-navigation-scope), while still having the [manifest](https://www.w3.org/TR/appmanifest/#dfn-manifest) [applied](https://www.w3.org/TR/appmanifest/#dfn-apply) to it.

By that description, the manifest is still "[applied](https://www.w3.org/TR/appmanifest/#dfn-apply)" even when displaying an off-scope URL. It then follows that:

> the [default theme color](https://www.w3.org/TR/appmanifest/#dfn-default-theme-color) ... serves as the [theme color](https://www.w3.org/TR/appmanifest/#dfn-theme-color) for all browsing contexts to which the manifest is [applied](https://www.w3.org/TR/appmanifest/#dfn-apply).

If we interpret it as that the manifest is still [applied](https://www.w3.org/TR/appmanifest/#dfn-apply) on an off-scope URL, then A is already the case. If any work is to be done here, I think it is clarifying normatively that a manifest is still [applied](https://www.w3.org/TR/appmanifest/#dfn-apply) even to an off-scope URL, which would involve changing the definition of [navigation scope]((https://www.w3.org/TR/appmanifest/#dfn-navigation-scope)).

-- 
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/755#issuecomment-635051083

Received on Thursday, 28 May 2020 02:12:22 UTC