Closed Bug 2060322 Opened 3 months ago Closed 1 month ago

Fix `pocket.click` and `topsite.click` missing context menu triggers

Categories

(Firefox :: New Tab Page, defect)

defect

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: joelkelly, Assigned: joelkelly, NeedInfo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [hnt][hnt-journeys])

Attachments

(1 external file)

Both events fail to fire for:

  • right click -> new tab, new window, new private window
  • open content/topsite menu -> new private window

Also add a background extra and update event_source to capture these cases accurately.

Jira: https://mozilla-hub.atlassian.net/browse/HNT-2025

Assignee: nobody → joelkelly
Depends on: 2061813

Consume the notification added in bug 2061813. The tile is resolved from
store state by its url and the click is routed back through the ordinary
click handlers, so a context menu click cannot drift from a plain one.

Also record the private window item in newtab's own menu, which was left
switched off behind a TODO. Both cases are ordinary clicks on an ordinary
newtab in an ordinary session; nothing about the private window is recorded.
The private window option carried almost none of the tile data the new window
option does, so give it the same payload.

Add a background extra to both events and an event_source to topsites.click,
which had neither, and correct the click descriptions: they claimed context
menu opens were not recorded.

background is stripped from the newtab-content ping. Only context menu opens
set it, so keeping it would say how a link was opened on the ping that strips
event_source precisely to avoid that.

handleTopSitesOrganicImpressionStats stringified smart scores unconditionally.
Content always sends them so it never showed, but tiles resolved here need not
have any, and Glean rejects the undefined that JSON.stringify returns.

The severity field is not set for this bug.
:thecount, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(sdowne)
Attachment #9625010 - Attachment description: Bug 2060322 - Record topsite and pocket clicks made from the native context menu r?#home-newtab-reviewers → Bug 2060322 - Record topsite and pocket clicks for links Firefox opens from newtab r?#home-newtab-reviewers
Attachment #9625010 - Attachment description: Bug 2060322 - Record topsite and pocket clicks for links Firefox opens from newtab r?#home-newtab-reviewers → WIP: Bug 2060322 - Record topsite and pocket clicks for links Firefox opens from newtab r?#home-newtab-reviewers
Attachment #9625010 - Attachment description: WIP: Bug 2060322 - Record topsite and pocket clicks for links Firefox opens from newtab r?#home-newtab-reviewers → Bug 2060322 - Record topsite and pocket clicks for links Firefox opens from newtab r?#home-newtab-reviewers
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b3ecc38ee23a https://hg.mozilla.org/integration/autoland/rev/11fa63d2b499 Revert "Bug 2060322 - Record topsite and pocket clicks for links Firefox opens from newtab r=jbrown" for causing mochitests failures in browser_context_menu_link_open.js.

Reverted this because it was causing mochitests failures in browser_context_menu_link_open.js.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/extensions/newtab/test/browser/browser_context_menu_link_open.js | test_open_link_in_tab_notifies - Recorded 1 topsites.click - Got +0, expected 1
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
QA Whiteboard: [qa-triage-done-c161/b160]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: