Re: [w3c/manifest] Add a 'masking' purpose, for allowing the UA to supercompose such icons (#657)

marcoscaceres requested changes on this pull request.

Initial feedback. 

> @@ -1135,6 +1160,169 @@ <h3>
         </section>
       </section>
     </section>
+    <section>
+      <h2>
+        Application icons and images
+      </h2>
+      <p>
+        Application icons can be used by the user agent in multiple places,

Nit: Maybe just talk about "icons" or do we want to define "application icons" specifically. 

> @@ -1135,6 +1160,169 @@ <h3>
         </section>
       </section>
     </section>
+    <section>
+      <h2>
+        Application icons and images
+      </h2>
+      <p>
+        Application icons can be used by the user agent in multiple places,
+        such as on a home-screen, in an app store, or even on top of
+        notifications.
+      </p>
+      <p>
+        For this reason, image can be declared with different sizes and for

s/image/icons

> @@ -1135,6 +1160,169 @@ <h3>
         </section>
       </section>
     </section>
+    <section>
+      <h2>
+        Application icons and images
+      </h2>
+      <p>
+        Application icons can be used by the user agent in multiple places,
+        such as on a home-screen, in an app store, or even on top of
+        notifications.
+      </p>
+      <p>
+        For this reason, image can be declared with different sizes and for
+        different purposes. A user agent can then use these data to decide

s/these data/these icons ... or "these images"

> @@ -1135,6 +1160,169 @@ <h3>
         </section>
       </section>
     </section>
+    <section>
+      <h2>
+        Application icons and images
+      </h2>
+      <p>
+        Application icons can be used by the user agent in multiple places,
+        such as on a home-screen, in an app store, or even on top of
+        notifications.
+      </p>
+      <p>
+        For this reason, image can be declared with different sizes and for
+        different purposes. A user agent can then use these data to decide
+        which icons to use in different situations. For instance, a user agent
+        may prefer showing icons with the <a data-lt="badge purpose">badge</a>

Avoid "may" here. Use "might"

> @@ -1135,6 +1160,169 @@ <h3>
         </section>
       </section>
     </section>
+    <section>
+      <h2>
+        Application icons and images
+      </h2>
+      <p>
+        Application icons can be used by the user agent in multiple places,
+        such as on a home-screen, in an app store, or even on top of
+        notifications.
+      </p>
+      <p>
+        For this reason, image can be declared with different sizes and for
+        different purposes. A user agent can then use these data to decide
+        which icons to use in different situations. For instance, a user agent
+        may prefer showing icons with the <a data-lt="badge purpose">badge</a>

Nit, just do

```
<a>badge</a>
```

And add `data-lt="badge purpose"` to the `dfn` of badge. 

> +    <section>
+      <h2>
+        Application icons and images
+      </h2>
+      <p>
+        Application icons can be used by the user agent in multiple places,
+        such as on a home-screen, in an app store, or even on top of
+        notifications.
+      </p>
+      <p>
+        For this reason, image can be declared with different sizes and for
+        different purposes. A user agent can then use these data to decide
+        which icons to use in different situations. For instance, a user agent
+        may prefer showing icons with the <a data-lt="badge purpose">badge</a>
+        purpose on top of notifications, as <a data-lt=
+        "badge purpose">badge</a> indicates an icon that is can be placed on

Grammar:  that is can be placed

> +        different purposes. A user agent can then use these data to decide
+        which icons to use in different situations. For instance, a user agent
+        may prefer showing icons with the <a data-lt="badge purpose">badge</a>
+        purpose on top of notifications, as <a data-lt=
+        "badge purpose">badge</a> indicates an icon that is can be placed on
+        top of other content, in size constrained situations.
+      </p>
+      <section>
+        <h2>
+          Icon masks and safe zone
+        </h2>
+        <p>
+          Some platforms have their own preferred icon shape, but as web
+          applications should work across multiple platforms, it is possible to
+          indicate that an icon may be supercomposed with a mask, by adding the
+          <a data-lt="masking purpose">masking</a> purpose. This allows the

as above with regards to `data-lt`

> +      </p>
+      <section>
+        <h2>
+          Icon masks and safe zone
+        </h2>
+        <p>
+          Some platforms have their own preferred icon shape, but as web
+          applications should work across multiple platforms, it is possible to
+          indicate that an icon may be supercomposed with a mask, by adding the
+          <a data-lt="masking purpose">masking</a> purpose. This allows the
+          platform to ensure that the icon looks well integrated with the
+          platform, and even apply different masks and background colors in
+          different places throughout the platform.
+        </p>
+        <p>
+          Any icon indicating that it can be supercomposed with a mask, much

It doesn't feel right to me to define this in the spec. All we should do here is tell developers to seek out guidance from browser vendors. 

Does notification API provide any guidance like this? 

> +        </p>
+        <p>
+          The user agent MUST NOT make any pixel within the safe zone
+          transparent.
+        </p>
+        <p>
+          The user agent MAY superimpose the icon on top of a colored
+          background of any kind and MAY further enlarge the icon by adding
+          additional padding.
+        </p>
+        <section>
+          <h3>
+            Examples of masks
+          </h3>
+          <p class="note">
+            By staying inside the <a>safe zone</a>, most icons will have around

This should all be moved to MDN instead, IMO. 

-- 
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/657#pullrequestreview-102528327

Received on Friday, 9 March 2018 02:34:21 UTC