notifications icon indicating copy to clipboard operation
notifications copied to clipboard

Add support for inline replies

Open anitawoodruff opened this issue 7 years ago • 14 comments

This change adds support for notifications that accept text input within their UI, aka 'inline replies'.

Explainer: https://github.com/anitawoodruff/inline-notification-replies

Requesting TAG review shortly, will link to it below.


Preview | Diff

anitawoodruff avatar May 22 '18 12:05 anitawoodruff

TAG review now requested at: https://github.com/w3ctag/design-reviews/issues/284

anitawoodruff avatar May 23 '18 13:05 anitawoodruff

Go for it, any time is fine - from my perspective the changes are done aside from your comments :)

anitawoodruff avatar May 25 '18 11:05 anitawoodruff

I addressed some of the formatting issues. There's still at least one outstanding issue though. Review from @beverloo would also be good.

What we need beyond this:

  • Implementer interest beyond Chrome.
  • Bugs filed against browsers as per https://github.com/whatwg/meta/blob/master/MAINTAINERS.md#handling-pull-requests

annevk avatar May 28 '18 12:05 annevk

Filed the following implementation bugs against the other browsers:

  • Edge: https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/34442866-implement-inline-replies-for-web-notifications

  • Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1466499

  • Safari: https://bugs.webkit.org/show_bug.cgi?id=186265

anitawoodruff avatar Jun 04 '18 10:06 anitawoodruff

(Chrome bug is at https://crbug.com/599859 )

anitawoodruff avatar Jun 04 '18 10:06 anitawoodruff

@aliams, @hober, @annevk - Please can you comment on whether your respective browsers would be interested in implementing this feature.

Since the native notification centers on Mac, Android, iOS and Windows now all provide this functionality, we think it would make a great addition to the spec.

See the explainer for more details.

anitawoodruff avatar Jul 10 '18 15:07 anitawoodruff

@anitawoodruff the main input I got at https://github.com/mozilla/standards-positions/issues/91#issuecomment-394271102 from @martinthomson was that it was unclear how to deploy this in a backwards compatible fashion. That is, how can a website use this feature in a way that doesn't make things weird in browsers that don't support it?

annevk avatar Aug 02 '18 06:08 annevk

Open a window with a view that allows them to send a response, as that's clearly the user's intention by activating that button? The website would want to do something similar if the user doesn't enter an inline reply, i.e. just clicks on the button.

beverloo avatar Aug 02 '18 11:08 beverloo

It was more about feature detection I think, but it seems that should be doable with "reply" in NotificationEvent.prototype or some such.

annevk avatar Aug 09 '18 09:08 annevk

FWIW, @jakearchibald offered to help with rebasing this. I think the main thing lacking here is explicit interest from one more browser. And perhaps some non-IDL tests.

annevk avatar Aug 09 '18 09:08 annevk

Maybe it would be useful to expand the API to allow the reply to be prefilled with some value?

Use-case:

  • User A sends a message to user B: @b how are you?
  • User B wants to reply to the message.

It is common in some platforms (such as Mastodon and Twitter) for B's reply to start with @a, and when replying to such a message the input field is prepopulated with @a.

This is not possible to achieve with the current API.

sorin-davidoi avatar Sep 05 '18 13:09 sorin-davidoi

Just as a note from us all the way over here in user-land, I was just wondering about this particular feature today (whether it was possible with the Notification API):

https://twitter.com/karlhorky/status/1167778767542128643

Use Case: It came up as part of a discussion about whether a Slack PWA could hold its own against an Electron app:

https://twitter.com/karlhorky/status/1167777816466866177

Thanks for listening!

karlhorky avatar Aug 31 '19 14:08 karlhorky

Ah, I guess this feature is already (partially) implemented in Chrome:

https://twitter.com/beverloo/status/1167824727009832960

However, they are disabled on macOS due to deficiencies in the macOS notification system (extra buttons for "Site Settings" are not allowed):

https://twitter.com/beverloo/status/1167847717361639425

This is a valid user concern, so I have proposed a few ways of dealing with that, including an extra permissions prompt (1) and requiring an installed PWA (2 and 3).

  1. https://twitter.com/karlhorky/status/1167843843238219777
  2. https://twitter.com/karlhorky/status/1167848030718046208
  3. https://bugs.chromium.org/p/chromium/issues/detail?id=999838

cc @beverloo

karlhorky avatar Sep 01 '19 11:09 karlhorky

So this been live in Chrome for Windows/ChromeOS/Android for over 6 years, but the update for the spec has been forgot on this PR?

Can we merge this so it will trigger the necessary updates in affects specs like https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#protocol that still doesn't have support for the type attribute in the NotificationAction class ?

xfalcox avatar Dec 02 '22 14:12 xfalcox