W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2014

Re: [whatwg] Notifications improvements

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 11 Aug 2014 17:39:03 -0700
Message-ID: <CA+c2ei945JPiPQ4OF0KLauKQRft4nKVRwUFwJziZCniu_71-2A@mail.gmail.com>
To: Peter Beverloo <beverloo@google.com>
Cc: WHAT Working Group <whatwg@whatwg.org>, Andrew Wilson <atwilson@google.com>
On Aug 11, 2014 8:38 AM, "Peter Beverloo" <beverloo@google.com> wrote:
> On Mon, Aug 11, 2014 at 9:27 AM, Andrew Wilson <atwilson@google.com> wrote:
> You raise an interesting question. Given the following notification:
>
> var notification = new Notification('Title', {
>     body: 'Hello, world!',
>     icon: '/my-icon.png',
>     items: [
>         { title: 'Message 1', body: 'Contents of message 1' },
>         { title: 'Message 2', body: 'Contents of message 2' },
>         { title: 'Message 3', body: 'Contents of message 3' }
>     ],
>     buttons: [
>         'Reply',
>         'Reply to all',
>         'Forward'
>     ],
>     date: new Date('2014-08-11T16:35:00'),
>     progress: 40
> });
>
> What do we expect to be displayed?

I agree, this is a very interesting question. My thinking had been
that this should be supported. But I hadn't thought of that not all
platforms that can render a progress bar can render one at the same
time as a bullet list, or a set of buttons.

And then there's of course the question how the above would be
rendered, I.e. does the progress bar go above or below the list? Or is
that UA defined.

Suggestions for how to deal with this is definitely welcome.

I think we can expect that the "date" is simply displayed next to the
notification. Just like the icon is. That's how every notification
system I can find do it. Dates really are more about adjusting UI
which is already there, rather than adding new UI. So I would expect
that to mix fine with all other types of data.

Buttons, progressbar and lists are indeed a problem though. Does
anyone know what limitations we have as far as platforms go?

At a first glance, it seems like we might be able to get away with
defining that buttons are always at the bottom, and progress bars are
just above buttons but below everything else. But quite possibly
things aren't that simple.

Lists are trickier. They even seem tricky on their own. Do they go
before or after the text body? It seems like you might even want to
have a list in with text both before and after. Or should we say that
you can't have lists at the same time as a text body?

/ Jonas
Received on Tuesday, 12 August 2014 05:32:02 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:22 UTC