Re: [w3c/manifest] Support different shortcut icon requirements/guidelines on different platforms (#795)

> (a) the appropriate (modifyable) icon hasn't been provided by the developer

That's OK, in that case we do whatever needs to be done as a fallback. If the developer doesn't supply a purpose: badge icon, there's not much we can do. But if the developer does supply purpose: badge, we need to make sure the expectations of the developer and user agent are aligned.

> (b) the user's device expects something different from what the browser has selected on the developer's behalf, unbeknown to the browser.

This sounds like the same argument about the browser not knowing about OEM-specific requirements on the device. Is that what you mean? As I said above, if that's a problem, it's a problem for ALL native apps. Can you give a concrete example of an Android launcher that has a different expectation for icons than the Android icon guidelines? And if so, can you explain what other native apps are expected to do about it? (i.e. how is my native app supposed to know to supply a special icon for this launcher?)

> On Android, for most default launchers, it depends on what the icon describes: photos and logos should be full colour, whereas icons should be masked in the app's theme colour.

Let's say we specified purpose: badge the way I outlined above.

If you have a simple "action" icon, you might supply a purpose: any, a purpose: maskable and a purpose: badge version of it. The user agent would be free to pick the most specific, e.g., on Android we choose the monochrome purpose: badge icon and convert it to use the app's theme colour. Other platforms might simply take the purpose: maskable version which can be in full colour.

If you have a photo as a shortcut icon (e.g., a contact picture), you would NOT supply a purpose: badge icon, perhaps only supplying a purpose: any and a purpose: maskable. On Android, because purpose: badge is not available, we'd choose the purpose: maskable icon which would show it in full colour.

Thus, the web app isn't aware of platform-specific requirements. It just supplies various permutations (at this time, up to 3) of the icon, and the user agent selects the most appropriate.

> Considering further variables such as colour scheme (e.g. dark mode), differences between OS versions, and so on, the number of permutations of icons we'd ask developers to provide is unreasonable.

A purpose: maskable icon doesn't need to vary based on colour scheme, it's just a full colour logo. A purpose: badge icon (per my proposed definition) is monochrome and can be adapted by the user agent to suit the colour scheme. With my scheme, you don't need to supply many permutations (at most 3). With your scheme (the current status quo), it is up to the web site to supply icons specific to each platform, which means you end up needing to do user agent detection if you want to handle all of those different cases.

> Having a purpose that comes down to "do whatever needs doing" can be the starting point for a simple implementation.

"do whatever needs doing" doesn't mean anything unless the source image parameters are well defined. Otherwise the user agent doesn't know what needs doing.

-- 
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/795#issuecomment-535320192

Received on Thursday, 26 September 2019 03:46:13 UTC