Closed Bug 1787962 Opened 2 years ago Closed 2 years ago

Add `launch_url` to `ToastNotification` message surface

Categories

(Firefox :: Messaging System, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

(Whiteboard: [fidedi-notifications])

Attachments

(1 file)

For re-engagement notifications, we want to pop toast notifications that launch Firefox into a specific profile and to a specific page (mechanism to be handled by Bug 1781929). This ticket follows, allowing to specify the URL of the page to launch to in the toast notification content.

Everything here is Windows-only for now, since that's the immediate
use case and these implementation details are specific to Windows
native notifications relaunching Firefox when it is not running --
functionality not supported by the other system alert backends at this
time.

This commit adds a launch_url parameter to ToastNotification.
This should be viewed as the simplest possible "action" that a toast
notification can take when it is clicked, namely navigating to the
given URL. In the future, we might generalize this to describe more
of the existing actions (like opening settings, snoozing or dismissing
the toast, etc), but for now, this handles my use case.

In addition, this uses content.tag as the alert name, allowing to
replace existing toast notifications.

Depends on D154468

Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/45758ca57a23
Add `launch_url` to `ToastNotification` message surface. r=barret
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: