Closed Bug 2044483 Opened 2 months ago Closed 5 days ago

World Clocks widget is missing the widgets.clocks.interaction pref and interaction tracking entirely

Categories

(Firefox :: New Tab Page, defect, P2)

defect

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox155 --- fixed

People

(Reporter: maxx, Assigned: chimaifeanyi29)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Issue:

Every other New Tab widget tracks user engagement via a widgets.<widget>.interaction pref, set through handleUserInteraction(widgetName) in Widgets.jsx. Prefs exist for lists, focusTimer, weatherForecast, and sportsWidget (defined in lib/ActivityStream.sys.mjs).

The World Clocks widget has none of this:

  • There is no widgets.clocks.interaction pref.
  • Clocks.jsx / ClocksRow.jsx / AddClockForm.jsx never call handleUserInteraction, even though Widgets.jsx already passes it to the widget as a prop.

As a result, we have no engagement signal for Clocks, and it's inconsistent with the
other widgets.

What to do:

  1. Add a widgets.clocks.interaction pref alongside the others in lib/ActivityStream.sys.mjs.
  2. Wire handleUserInteraction("clocks") into the genuine interactions in Clocks.jsx, following the rule established in bug 2044456: every interaction flips it except "Hide widget."
  3. Add unit tests asserting each of those flips the pref and that hide does not.

Candidate handlers:

  • handleToggleHourFormat,
  • handleChangeSize,
  • handleLearnMore,
  • handleShowAddClock,
  • handleShowEditClocks,
  • handleSaveClock (add/edit),
  • handleRemoveClock.

Acceptance criteria:
Interacting with the Clocks widget (e.g. adding a clock, toggling 12/24h, resizing) sets browser.newtabpage.activity-stream.widgets.clocks.interaction to true; hiding it does not.

No longer depends on: 2044456
See Also: → 2044456
Blocks: 2034278
Severity: -- → S3
Priority: -- → P2
Assignee: nobody → chimaifeanyi29
Status: NEW → ASSIGNED
Pushed by mcrawford@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/997f3ff86514 https://hg.mozilla.org/integration/autoland/rev/9d2dc76b9e2b Add widgets.clocks.interaction pref and wire up handleUserInteraction in Clocks widget. r=maxx https://github.com/mozilla-firefox/firefox/commit/972d30e09e46 https://hg.mozilla.org/integration/autoland/rev/6d0a38daea8d Remove ClocksRowWidget registry wrapper so handleUserInteraction is wired up r=thecount
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e715aa69e0d6 https://hg.mozilla.org/integration/autoland/rev/85848fb2b334 Revert "Bug 2044483 - Remove ClocksRowWidget registry wrapper so handleUserInteraction is wired up r=thecount" for causing failures at Clocks.test.jsx

Hi, how can I bring this to your attention that the patch got reverted for failing tests.

Flags: needinfo?(chimaifeanyi29) → needinfo?(mcrawford)

japandi - If you can rebase the stack again (be sure to use --reapply-cherry-picks) and I can rebase and can push again. Thanks!

Flags: needinfo?(mcrawford)

Done !!

Flags: needinfo?(mcrawford)
Pushed by mcrawford@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/730ccf4a28cc https://hg.mozilla.org/integration/autoland/rev/e0eac6f3e57b Add widgets.clocks.interaction pref and wire up handleUserInteraction in Clocks widget. r=maxx https://github.com/mozilla-firefox/firefox/commit/f113afb6cb48 https://hg.mozilla.org/integration/autoland/rev/d675cc2d709f Remove ClocksRowWidget registry wrapper so handleUserInteraction is wired up r=thecount
Status: ASSIGNED → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
Flags: needinfo?(mcrawford)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: