Closed Bug 1205172 Opened 5 years ago Closed 5 years ago

Do Not Disturb Button for Push Notifications on Windows


(Toolkit :: Notifications and Alerts, defect)

Not set



Tracking Status
firefox44 --- fixed


(Reporter: wmaggs, Assigned: jaws)



User Story

I want an easily discoverable way to toggle a Do Not Disturb function that turns down the notifications temporarily, for example for as long as Firefox is open or my session is still alive and kicking, or for some set period of time. This should not revoke the permissions I have granted to sites.


(1 file, 2 obsolete files)

Push Notifications on Windows desktop need a Do Not Disturb button or control to be able to quickly turn off messages being received for some period of time without revoking all permissions to receive or show Push Notifications. This functionality is provided by the Notification Center on OSX, and is a feature of Chrome Notifications on all desktop platforms.  

The feature may exist within Preferences but needs to be discoverable from the UI, preferably from the platform UI (system bar), so that users do not have to bring up Firefox to use it.
User Story: (updated)
Depends on: 1201571
Blocks: 1201397
Blocks: 1205399
Blocks: 1201571
No longer depends on: 1201571
Blocks: 1211718
Assignee: nobody → jaws
Attached patch Patch (obsolete) — Splinter Review
Attachment #8672861 - Flags: review?(MattN+bmo)
Attached patch Patch v1.1 (obsolete) — Splinter Review
Attachment #8672861 - Attachment is obsolete: true
Attachment #8672861 - Flags: review?(MattN+bmo)
Attachment #8672865 - Flags: review?(MattN+bmo)
Attached patch Patch v1.2Splinter Review
I added a call to create a second notification in the test and confirm that it doesn't appear.
Attachment #8672865 - Attachment is obsolete: true
Attachment #8672865 - Flags: review?(MattN+bmo)
Attachment #8673143 - Flags: review?(MattN+bmo)
Comment on attachment 8673143 [details] [diff] [review]
Patch v1.2

Review of attachment 8673143 [details] [diff] [review]:

::: browser/base/content/test/alerts/browser_notification_do_not_disturb.js
@@ +1,3 @@
> +/* Any copyright is dedicated to the Public Domain.
> + *
> + */

Nit: not necessary

use add_task in the future (probably with shared helpers returning promises)

::: toolkit/components/alerts/resources/content/alert.js
@@ +244,5 @@
>    }
>  }
> +function doNotDisturb() {
> +  const alertService = Cc[";1"]

You may need to stopPropagation on the event so that alertclickcallback doesn't also get called (focusing the tab and telling the page). Adding this to the test would be good if that's the case.

@@ +255,2 @@
>  function disableForOrigin() {
>    if (gPrincipal) {

Attachment #8673143 - Flags: review?(MattN+bmo) → review+
Blocks: 1216585
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.