[whatwg] Notifications improvements

Hi All,

We've on and off discussed various features added to notifications.
It'd be great to move forward with some of these improvements.

I think the most low hanging fruit would be to add the following as
data that can be displayed in a notification:

* Progress bar
* Lists of title/body pairs
* Date (for things like "event will happen in 10 minutes")


Second, we really need to figure out the story around handling user
clicking notifications after the user has closed the original page.

At the very least we need the ability to send a message to a
ServiceWorker when the user clicks a notification. This way the SW can
decide if UI should be shown, and if so if an existing window can be
reused or not.

SW integration will require some other changes too.

We need to change the GC behavior. Right now it seems like if a
Notification object is created, but no event listeners are attached,
because the page is expecting to use the SW event to listen for
clicks, the notification won't be kept alive and so the SW can't get
to any of its data.

We also need to keep state on the Notification object if the user has
clicked the notification or not.

We should also consider enabling passing a URL to the Notification
constructor which is opened when the user clicks the notification.
Probably this should attempt to reuse an existing tab with said URL if
one is open.


Third, we should look at enabling minimal user input through the
Notification. It's very common for notifications to support having one
or more buttons that the user can click. It would also be good to
enable putting a simple text-input in the notification. This area is
definitely more complex though so happy to put this last.

/ Jonas

Received on Thursday, 10 July 2014 03:45:39 UTC