Intent to Experiment: Badging API

187 views
Skip to first unread message

Matt Giuca

unread,
Dec 7, 2018, 1:43:01 AM12/7/18
to blink-dev, Dominick Ng, harr...@chromium.org

Contact emails

mgi...@chromium.org, domi...@chromium.org, harr...@chromium.org


Spec

Draft: https://wicg.github.io/badging


Summary

Allows web applications (as defined by the Web App Manifest standard) to set an application-wide badge, shown in an operating-system-specific place associated with the application (such as the shelf or home screen). The badge can optionally show a positive integer over the top of the application icon.


Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/d/msg/blink-dev/Fw764MVF5nI/FNlBi815AwAJ


Goals for experimentation

During the open-for-comments period (since the I2I), we have received a number of bug reports asking for changes to the API surface, which are summarized in this doc:
https://github.com/WICG/badging/blob/master/choices.md


We’d like to receive a wider range of input on the current API design before we make changes, since these suggestions are not obviously improvements.


Experimental timeline

  • M73: Experiment begins.

  • M75: Last milestone of the experiment.

  • M76: Planned general availability of the API.


We plan to make necessary changes to the API during the experiment.


Any risks when the experiment finishes?

No risk of data loss. However, it would represent a disappearing prominent feature in apps using it.


The planned transition from experiment to general availability (assuming the API is not outright rejected) ensures that early adopters do not have to have the feature removed for any time. Thus the only risk here is if we decide not to proceed with this API at all.


Ongoing technical constraints

There is some technical complexity here due to having a separate implementation of the API on each of the supported platforms (at the time of writing, Chrome OS, Windows and macOS).


Debuggability

N/A


Will this feature be supported on all five Blink platforms supported by Origin Trials (Windows, Mac, Linux, Chrome OS, and Android)?

Only Chrome OS, Windows and macOS (with a separate implementation on each, to talk to each platform’s internal API for badging). On Chrome OS, we are working with the Shelf team to plug into the implementation that is being built in parallel for Android apps to show a badge.


  • Linux is not being initially supported. There is no general API (that I know of) for all Linux window managers. Ubuntu has one specifically for its window managers, which we could support in the future.

  • Android has no API for setting a badge. The Badge UI seen on Android is automatic when an app sends a notification, and is not individually controllable by apps.


See this section of the explainer for details on how we plan to interface with each OS (keeping in mind that on Windows, we use the Win32 API, not the UWP one, both for compat with Windows 7, and because we don’t think we have access to the UWP API).


Link to entry on the feature dashboard

https://www.chromestatus.com/features/6068482055602176

Mike West

unread,
Dec 7, 2018, 7:25:42 AM12/7/18
to Matt Giuca, blink-dev, Dominick Ng, harr...@chromium.org
LGTM to experiment.

Getting feedback from developers will be a good way to validate that y'all have landed on a reasonable shape for the API, and should give you the ability to answer some of the questions raised at TPAC and elsewhere about whether it actually addresses the use cases folks in the wild care about.

Good luck!

-mike


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHqYdcb6qKa-PmFtnAT8CgxMEjXi6btvQZjG6dx0uJOmK5E3Kg%40mail.gmail.com.

Ben Wells

unread,
Jan 20, 2019, 11:26:25 PM1/20/19
to Mike West, Matt Giuca, blink-dev, Dominick Ng, harr...@chromium.org
Just wanted to give a quick update on this intent to experiment. The name of the API has been updated from 'Badge' to 'ExperimentalBadge' (e.g. usage would be window.ExperimentalBadge.set(...) or window.ExperimentalBadge.clear()).

This change is to allow us to provide the same functionality to developers without breakage when the experiment ends (assuming no problems are discovered) while making it clear to developers that the experiment is just an experiment.

Reply all
Reply to author
Forward
0 new messages