Re: [w3c/manifest] Clarify off-scope theme color (#879)

@mgiuca requested changes on this pull request.

I don't think this is the right behaviour. (I will have to check later what the Chrome behaviour is, this is just my initial reaction.)

I think it's important to allow the application to theme its own window, even when navigating off scope. It's not a web browser window, it's an application window, so I wouldn't expect pages navigated within to override the theme of the application.

It looks like the current specification already kinda does this by allowing the document to override the theme color explicitly (I already think that's a problem, and I don't think Chrome at least follows it). This takes it further by saying the UA should reset to a default theme colour when off scope. I'd like to make a counter-proposal, which is that we recommend that the application theme colour is preserved when navigating off scope.

> @@ -504,7 +504,12 @@ <h2>
         at least its <a>origin</a>, including whether it is served over a
         secure connection. This UI SHOULD differ from any UI used when the
         [=Document/URL=] is <a>within scope</a>, in order to make it obvious
-        that the user is navigating off scope.
+        that the user is navigating off scope. In addition, the user agent
+        SHOULD reset the <a>application context</a>'s <a>default theme

I don't like the term "reset" or "default theme color", since it implies making a permanent change to the default theme color itself. Rather, could it just say "SHOULD ignore the application's default theme color, instead using the theme color of the current document". (This could be more formal, but that's the idea.)

> @@ -504,7 +504,12 @@ <h2>
         at least its <a>origin</a>, including whether it is served over a
         secure connection. This UI SHOULD differ from any UI used when the
         [=Document/URL=] is <a>within scope</a>, in order to make it obvious
-        that the user is navigating off scope.
+        that the user is navigating off scope. In addition, the user agent
+        SHOULD reset the <a>application context</a>'s <a>default theme
+        color</a> to a user agent-defined default value. The off-scope document
+        may override that color through the inclusion of a valid [[HTML]]

You can't use the word "may" without it being in all-caps, making it a normative requirement. And you can't impose a normative requirement on the document; all requirements are imposed on the user agent.

"The user agent MAY use the HTML meta element whose name attribute is "theme-color" of the off-scope document to theme the application context."

-- 
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/879#pullrequestreview-419698395

Received on Thursday, 28 May 2020 00:32:11 UTC