Closed Bug 1821824 Opened 2 years ago Closed 11 months ago

Add support to open about:welcome using about:messagepreview

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: aminomancer, Assigned: emcminn)

References

(Blocks 2 open bugs)

Details

Attachments

(2 obsolete files)

Investigate what needs to change to support tweaking about:welcome through about:messagepreview

No longer depends on: 1821820

I'll probably look into this and the CFR one next week

Priority: -- → P5
Assignee: nobody → shughes
Status: NEW → ASSIGNED
Attachment #9324790 - Attachment is obsolete: true
Assignee: shughes → nobody
Status: ASSIGNED → NEW

I'll look at this again in a week, but if someone else wants to work on this before then, feel free. Keep in mind it's a P5 so, uber backlog.

The gist of our discussion on this was that allowing about:messagepreview to communicate with about:welcome requires pretty complex changes, so it would be better to take a simpler approach:

  1. Add "about:welcome?*" to the AboutWelcome JSActor's matches array, and add some new logic to AboutWelcomeChild.jsm so that it checks the URL search params for a base64-encoded message, and uses it to override the content if a message param is found. Then, about:messagepreview can just redirect to about:welcome?message=* when it receives a message with aboutwelcome template. This has the advantage that everything works basically as expected since the message is displaying in the same environment in which it will be displayed when we actually deploy it. I actually can't think of a major drawback to this, so if you're looking into it, I think this one is worth trying.
  2. Have about:messagepreview basically convert about:welcome messages into spotlight messages. This works and barret made a working python script for this - it would be pretty simple to do the same in JS. The main drawback here is that aboutwelcome messages' backdrops don't seem to work correctly in spotlights, though we could investigate and resolve that issue.
See Also: → 1885430
Blocks: 1885430

I've implemented this from the Skylight end by creating a modified Spotlight for about:welcome messages to be rendered inside. The attached about:messagepreview patch just adds a binary decoding function, to allow for localized messages with non-latin1 text (like our ru or zh-CN localized surveys).

Assignee: nobody → emcminn
Priority: P5 → P1
Depends on: 1886856

Moving the binary patch into a new bug for clarity :)

Comment on attachment 9392553 [details]
Bug 1821824 - Allow about:messagepreview to decode non-latin text

Revision D205344 was moved to bug 1886856. Setting attachment 9392553 [details] to obsolete.

Attachment #9392553 - Attachment is obsolete: true

Work was done in a Skylight PR here:
https://github.com/mozilla/skylight/pull/115

The required support for about:messagepreview was done in the blocking bug, 1886856.

Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: