Closed Bug 1794475 Opened 2 years ago Closed 9 months ago

Investigate supporting `Notification.requireInteraction` for Windows native notifications

Categories

(Toolkit :: Alerts Service, task)

Desktop
Windows
task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: nrishel, Assigned: saschanaz)

References

Details

(Keywords: dev-doc-complete)

Attachments

(3 files)

The machinery necessary to support Notification.requireInteraction seems to exist but was explicitly disabled due to poor interaction with XUL notifications. In particular the issues seemed to be with persistently visible notifications blocking further notifications.

Windows native notifications have different semantics and may not experience the same issues, so we should investigate whether hooking up requireInteraction is viable.

Component: Notifications and Alerts → Alerts Service

AFAICT we already have code in widget/windows to support requireInteraction via scenario=reminder, but that doesn't seem to work even on Nightly. 🤔

Chrome has this comment: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/notifications/win/notification_template_builder.cc;l=122-123;drc=01a77f1d907d16b49466798721936542a0cd26fe

Note: If the notification doesn't include a button, then Windows will ignore the Reminder flag. See EnsureReminderHasButton below.

Hah, that wasn't in Microsoft docs.

Attachment #9343753 - Attachment description: Bug 1794475 - Part 2: Enable requireInteraction by default on Windows r=nrishel → Bug 1794475 - Part 2: Enable requireInteraction by default on Windows r=smaug
Attachment #9343751 - Attachment description: Bug 1794475 - Part 1: Add a default dismiss button when there's no action r=nrishel → Bug 1794475 - Part 1: Add a default dismiss button when there's no action r=smaug
Depends on: 1775136
Pushed by krosylight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39012036cf49
Part 1: Add a default dismiss button when there's no action r=nrishel,fluent-reviewers,bolsson
https://hg.mozilla.org/integration/autoland/rev/e0afefa32c0e
Part 2: Enable requireInteraction by default on Windows r=smaug
https://hg.mozilla.org/integration/autoland/rev/0c549a545b3f
Part 3: Add a manual test r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41105 for changes under testing/web-platform/tests
Upstream PR was closed without merging
Assignee: nrishel → krosylight
Flags: needinfo?(nrishel) → needinfo?(krosylight)
Attachment #9343751 - Attachment description: Bug 1794475 - Part 1: Add a default dismiss button when there's no action r=smaug → Bug 1794475 - Part 1: Add a default dismiss button when there's no action r=nrishel
Flags: needinfo?(krosylight)
Pushed by krosylight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0d49a2b0890a
Part 1: Add a default dismiss button when there's no action r=nrishel,fluent-reviewers,bolsson
https://hg.mozilla.org/integration/autoland/rev/74f21a0ae212
Part 2: Enable requireInteraction by default on Windows r=smaug
https://hg.mozilla.org/integration/autoland/rev/38f32e096d8b
Part 3: Add a manual test r=smaug
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Upstream PR merged by moz-wptsync-bot

MDN doc changes for this (BCD & relnote) can be tracked in the following GitHub issue: https://github.com/mdn/content/issues/28756

Hardware: Unspecified → Desktop
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: