Closed
Bug 1471391
Opened 7 years ago
Closed 7 years ago
Create CFR doorhanger UI template
Categories
(Firefox :: Messaging System, enhancement, P1)
Firefox
Messaging System
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox63 | --- | verified |
People
(Reporter: k88hudson, Assigned: ahillier)
References
(Blocks 1 open bug)
Details
User Story
Attachments
(2 files)
We need to create a UI template that can communicate with AS Router via actions like the existing ASR templates. It should also implement telemetry and impression collection in a similar way.
Note that this may need to be broken down into more bugs to handle separate aspects of the UI.
| Reporter | ||
Updated•7 years ago
|
Iteration: --- → 63.2 - July 23
Priority: -- → P2
| Reporter | ||
Updated•7 years ago
|
Iteration: 63.2 - July 23 → 63.3 - Aug 6
Comment 1•7 years ago
|
||
Here's what I had quickly hacked into the end of PlacesFeed.openLink during the all hands where clicking on a top site to make the chicklet appear. IIRC, it was a bit finicky with multiple link clicks or something with flushing render to trigger animation or something something…
```js
const r = win.document.getElementById("firefox-recommends");
if (r) r.parentNode.removeChild(r);
const p = win.document.getElementById("rec-panel");
if (p) p.parentNode.removeChild(p);
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const mps = win.document.getElementById("notification-popup");
const pan = win.document.createElementNS(XUL_NS, "popupnotification");
pan.id = "rec-panel";
pan.hidden = true;
const pab = win.document.getElementById("page-action-buttons");
const rec = win.document.createElementNS(XUL_NS, "hbox");
rec.id = "firefox-recommends";
rec.style.backgroundColor = "#0060df";
rec.style.borderRadius = "5px";
rec.style.color = "white";
rec.style.fill = "white";
rec.style.overflow = "hidden";
rec.style.padding = "2px 5px";
rec.style.transition = "ease-in-out 2s";
const img = win.document.createElementNS(XUL_NS, "image")
img.setAttribute("src", "resource://activity-stream/data/content/assets/glyph-highlights-16.svg");
img.style.height = "16px";
img.style.setProperty("-moz-context-properties", "fill");
img.style.width = "16px";
rec.appendChild(img);
const lab = win.document.createElementNS(XUL_NS, "label")
lab.setAttribute("value", "Firefox Recommends");
rec.appendChild(lab);
win.setTimeout(() => {
rec.style.width = rec.scrollWidth + "px";
rec.scrollWidth;
rec.style.backgroundColor = "";
rec.style.color = "black";
rec.style.fill = "rgba(0, 0, 0, 0.6)";
rec.style.width = "25px";
}, 5000);
rec.addEventListener("click", () => {
win.PopupNotifications.show(win.gBrowser.selectedBrowser, "rec-panel", "Firefox Recommends a Wikipedia thing!", "firefox-recommends");
});
mps.appendChild(pan);
pab.insertAdjacentElement("afterbegin", rec);
```
| Reporter | ||
Updated•7 years ago
|
User Story: (updated)
Updated•7 years ago
|
Iteration: 63.3 - Aug 6 → 63.4 - Aug 20
| Assignee | ||
Comment 2•7 years ago
|
||
The page action buttons/url bar are per window so we'll need to hide the recommendation UI when the user switches tabs within a window.
uiwanted: If a user has the CFR recommendation showing for a tab then switches tabs, should then still see the recommendation when they switch back to the first tab?
Keywords: uiwanted
Comment 3•7 years ago
|
||
uiwanted: Similar question but for navigating within the tab. How long should it stay visible?
| Assignee | ||
Updated•7 years ago
|
Assignee: nobody → ahillier
| Assignee | ||
Comment 4•7 years ago
|
||
uiwanted:
The mockups show the "Firefox recommends" urlbar UI element positioned to the left of all the page action buttons, separated from them by a divider. This is currently also where the Reader Mode button appears for articles, and where the "User context label" appears in non-default browser contexts (e.g. the "Facebook" label when you navigate to facebook.com with the Facebook Container extension enabled - see screenshot here https://addons.mozilla.org/en-US/firefox/addon/facebook-container/).
How do we want to position the CFR UI relative to these two UI elements?
Updated•7 years ago
|
Iteration: 63.4 - Aug 20 → 63.5 - Sep 3
| Reporter | ||
Comment 5•7 years ago
|
||
I filed a second bug in case we want to split up this work: https://bugzilla.mozilla.org/show_bug.cgi?id=1484030
| Reporter | ||
Updated•7 years ago
|
Summary: Create CFR doorhanger/chiclit UI template → Create CFR doorhanger UI template
Updated•7 years ago
|
status-firefox63:
--- → affected
Priority: P2 → P1
Comment 6•7 years ago
|
||
| Assignee | ||
Comment 7•7 years ago
|
||
| Reporter | ||
Comment 8•7 years ago
|
||
Comment on attachment 9003919 [details]
Bug 1471391 - Create initial CFR doorhanger
Kate Hudson :k88hudson has approved the revision.
Attachment #9003919 -
Flags: review+
| Reporter | ||
Comment 9•7 years ago
|
||
Comment on attachment 9003919 [details]
Bug 1471391 - Create initial CFR doorhanger
Kate Hudson :k88hudson has requested changes to the revision.
Attachment #9003919 -
Flags: review+
| Reporter | ||
Comment 10•7 years ago
|
||
Comment on attachment 9003919 [details]
Bug 1471391 - Create initial CFR doorhanger
Kate Hudson :k88hudson has approved the revision.
Attachment #9003919 -
Flags: review+
Comment 11•7 years ago
|
||
Pushed by khudson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9837816f6c79
Create initial CFR doorhanger r=k88hudson
Comment 12•7 years ago
|
||
Commit pushed to master at https://github.com/mozilla/activity-stream
https://github.com/mozilla/activity-stream/commit/7427a6451585ed2d3ab65325daf8a0ee429567bb
Bug 1471391 - Create initial CFR doorhanger
Backported from https://phabricator.services.mozilla.com/D4266
| Reporter | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment 13•7 years ago
|
||
| bugherder | ||
Comment 14•7 years ago
|
||
Target Milestone: --- → Firefox 63
Updated•7 years ago
|
Flags: qe-verify+
Comment 15•7 years ago
|
||
Managed to verify the implementation on Win 10x64, Ubuntu 18, macOS 10.14.
Current nightly is displaying the door-hangers and install is working as intended.
With beta builds(63.0b14, 63.0b13) I've noticed an issue where in some cases the about:newtab#asrouter lists are empty, even with the
browser.newtabpage.activity-stream.asrouter.devtoolsEnabled pref set to true.
This happens on Mac/Ubuntu OS, Windows displays them properly.
Are you aware of this issue or should I open a new bug for it?
Flags: needinfo?(a.hillier)
| Assignee | ||
Comment 16•7 years ago
|
||
I think Kate is in a better position to respond to this
Flags: needinfo?(a.hillier) → needinfo?(khudson)
Comment 17•7 years ago
|
||
The final part of the string for browser.newtabpage.activity-stream.asrouter.messageProviders remained set to false.
[...]{"id":"cfr","type":"local","localProvider":"CFRMessageProvider", "enabled":false,[...]
Manually setting it to true, allowed the list to be displayed.
Can you also confirm that is the case and/if it's tracked/fixed already?
*Since in nightly this is not an issue and is set to true as default.
| Reporter | ||
Comment 18•7 years ago
|
||
This is expected since providers that are not enabled do not show up in the asrouter admin page.
This will be changing as of https://bugzilla.mozilla.org/show_bug.cgi?id=1500073, which will allow you to enable/disable via checkboxes in the list
Flags: needinfo?(khudson)
Comment 19•7 years ago
|
||
Thanks again, marking this bug as verified, based on my previous comments.
Updated•6 years ago
|
Component: Activity Streams: Newtab → Messaging System
You need to log in
before you can comment on or make changes to this bug.
Description
•