Support `requireInteraction` and `actions` in alert service and Windows native notifications
Categories
(Toolkit Graveyard :: Notifications and Alerts, enhancement)
Tracking
(firefox104 fixed)
Tracking | Status | |
---|---|---|
firefox104 | --- | fixed |
People
(Reporter: nalexander, Assigned: nalexander)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fidedi-notifications])
Attachments
(2 files)
Right now, Firefox does not support requireInteraction
from the Web Notifications API: see Bug 1417846 for DOM exposure, Bug 1417848 for Web Extension exposure, etc. This ticket is more narrow: I would like to be able to specify requireInteraction
to the Alert service in some form for use in Bug 1775128; it might just be a chrome-only option.
This is conceptually similar to Bug 1771164.
Assignee | ||
Comment 1•2 years ago
|
||
-
requireInteraction
already existed, but it doesn't do anything.
This patch makes it meanscenario="reminder"
in the Windows Toast
notification schema: see
https://docs.microsoft.com/en-us/uwp/schemas/tiles/toastschema/element-toast. -
actions
is intended to eventually support the Chrome-only
extension to the Web Notifications API: see
https://developer.mozilla.org/en-US/docs/Web/API/Notification/actions. -
We run into an
xpconnect
limit on the number of supported
parameters. Rather than bump the limit, which has global consequence,
I added a secondinit*
method. The existing abstraction is
horrible, but I can't rework it within my timelines. Should we choose
to invest, we might migrate to WebIDL so that we can sensibly use
options objects. -
I intend to follow with a commit that adds
nsIWindowsAlertService
, exposing both the produced XML for testing
but also some Windows-specific options like changing the toast
template and making any provided image be a hero image.
Assignee | ||
Comment 2•2 years ago
|
||
This also provides an entry point for Windows-specific styling of
alerts, should specific consumers want one: e.g.,
nsIWindowsAlertsService.showWindowsAlert(...)
allowing to configure
the toast template, for example.
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
smaug: are you the right person to review this (alert service/notifications stuff)? Please suggest somebody else if not.
Pushed by nalexander@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e75e93d9ba3 Part 1: Add `nsIWindowsAlertService` to enable testing. r=mhowell https://hg.mozilla.org/integration/autoland/rev/bfa523daaf13 Part 2: Support `requireInteraction` and `actions` in alert service and native Windows notifications. r=mhowell,smaug
Comment 5•2 years ago
|
||
Backed out for causing failures at test_windows_alert_service.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/9b2daeb21efd0b94f47e3746fe87a2d5f4c84647
Failure log: https://treeherder.mozilla.org/logviewer?job_id=384041611&repo=autoland&lineNumber=3647
Pushed by nalexander@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c0e9183224fb Part 1: Add `nsIWindowsAlertService` to enable testing. r=mhowell https://hg.mozilla.org/integration/autoland/rev/e3c0f3ee6bd1 Part 2: Support `requireInteraction` and `actions` in alert service and native Windows notifications. r=mhowell,smaug
https://hg.mozilla.org/mozilla-central/rev/c0e9183224fb
https://hg.mozilla.org/mozilla-central/rev/e3c0f3ee6bd1
Comment 8•2 years ago
|
||
(I was on vacation last week, so the review too a bit time ;) )
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•10 months ago
|
Description
•