Closed Bug 856436 Opened 11 years ago Closed 8 years ago

Add remoteMessageShown pref to remote API

Categories

(Firefox Health Report Graveyard :: Web: Health Report, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mconnor, Unassigned)

Details

Ideally this pref will be synced, so we don't force users to see the same notifications on every PC.  It should be an integer pref, so we can do future messages without having to add another pref.  That means we'll need a remote command that passes a value.

Sample API:

  var event = new CustomEvent("RemoteHealthReportCommand", {detail: {command: RecordMessageVersion,  value: <integer>}});
document.dispatchEvent(event);

New Prefs payload

{type: "prefs", content: {"enabled": true, "messageVersionShown": 0, ...}}

Should be low risk and backwards compatible.  Patch upcoming later today.
Assignee: nobody → mconnor
Priority: -- → P2
Can we just give the iframe access to local storage and/or cookies?
We could, but...

a) There are a lot of cases where cookies are discarded, not least of which is always-on private browsing (or "never remember history" in prefs).  From a Sync bug a while ago, we were at ~4-5% of users with that enabled.  See also "clear on shutdown" and other things like that.  I don't think that's right for what generally looks like an app feature.
b) It's a more invasive change, because we're embedding content in an iframe instead of loading it as a top-level this runs into fun third-party restrictions as a bonus.
c) I think it should be syncable, and cookies are not something I expect us to ever sync.
Also consider that the about:healthreport iframe content is technically not tied to Mozilla or Firefox. Introducing "remote message shown" to the API that about:healthreport speaks would leak the hosted site's implementation details and thus would not be a good API since it is vendor specific.

Given your response, I guess cookies are out. What about local storage?

Instead of a feature-specific event, how about exposing a simple "storage API" to the iframe. about:healthreport can then proxy this to local storage, a JSON file, series of prefs, etc. How robust do you want to go?

I guess what I'm trying to say is that I foresee this request being repeated for different states and I don't want to end up with N one offs.
Component: Metrics and Firefox Health Report → Client: Desktop
Product: Mozilla Services → Firefox Health Report
Component: Client: Desktop → about:healthreport
OS: Mac OS X → All
Hardware: x86 → All
Assignee: mconnor → nobody
This didn't see action in a while, its unclear on whether this is currently needed.
I'll close and we can re-open if it comes up for future selfsupport/shield plans.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.