The purpose property is weakly defined. The only current value, badge is told to be for "where space constraints and/or color requirements differ from those of the application icon" but the characteristics of the icon are not known by the UA and the restrictions depend on the platform.
Shouldn't we define badge as the default icon for the badge property from the Notifications API unless one is specified? Also say that UA can re-use it in situations where an icon following notifications' badge restrictions would make sense? Hopefully, that could help both UA and developers to make the right decision.
Note that badge in general is a very confusing term because AFAIK, Microsoft and Apple use this term for stuff like unread count. Though, I guess the Notifications API picked this name and we are stuck with it.
Perhaps it's better to rename badge to simple or flat to align the term with the definition and not to tie our semantics with an specific purpose.
Yeah, something like that could work @delapuente ... we should all also check with @daleharvey on the Gecko side, as he is currently implementing the icons stuff and knows the Android APIs well.
Any update on this?
Nothing from our side.
@mounirlamouri, is this still a thing?
As far as I know (and I asked around about a year ago), purpose: badge isn't used anywhere, though it was originally intended to be used for notifications.
That gives me a big sense of relief, because I wouldn't want it to be used with its current semantics: "A user agent can present this icon where space constraints and/or color requirements differ from those of the application icon."
There's a PR out (#833) to rename "badge" to "monochrome" and give it a much better defined semantics. At that point, I think it would be reasonable for the Notifications API to refer to that as the default.
monochrome as the default, as this purpose is at risk (#905) and, to my knowledge, only the Android platform uses monochrome notification icons.If other platforms need different icons, perhaps it would be better to use any icon from the manifest as the default, and select the purpose that best matches the platform.
I'm not sure if there's any reason to specify a default. Notifications should display the most appropriate icon for the platform, based on the available icons. On Android, that might be monochrome. On another platform, it might just be the standard any icon. There's no need to impose this UI choice in the spec.