[w3c/manifest] Clarify the purpose of `purpose: badge` (#808)

The badge purpose is defined as an image to show where "space constraints and/or color requirements differ from those of the application icon". This description is really unclear for both browsers and developers.

The original badge issue (#480) suggested showing the badge in notifications. The web notifications API does already have badge support, but there are other instances where a notification is shown on behalf of the web app. For example, Chrome and Firefox display a site controls notification when a PWA is open.

<img src="https://user-images.githubusercontent.com/1782266/66186374-f08e7080-e636-11e9-978b-ca5dfa01c5f1.png" alt="Site controls notification" height="500">

`badge` icons could potentially be displayed instead of a generic icon.

<img src="https://user-images.githubusercontent.com/1782266/66186434-19af0100-e637-11e9-8569-aa8d25465fcb.png" alt="Badged site controls notification" height="500">

[Shortcut icons](https://github.com/w3c/manifest/issues/795#issuecomment-532950542) may also need a way to define a specialized icon and badge could potentially be used there if better defined.

I think a good definition to move towards would be that badge corresponds to a monochrome icon, where only the alpha channel is used by the user agent. Colors would be ignored. This behaviour is similar to how Android treats a notification icon asset.

-- 
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/808

Received on Friday, 4 October 2019 06:44:54 UTC