Open Bug 2094315 Opened 8 days ago Updated 1 day ago

Add generate widgets to the ExtensionWidgetsFeed

Categories

(Firefox :: Widgets, task)

task

Tracking

()

People

(Reporter: fchasen, Assigned: fchasen)

References

(Blocks 2 open bugs)

Details

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

Attachments

(1 external file)

Generate widgets need to be shown on New Tab when they are enabled. This mean moving from the WidgetsRegistry pulling widgets from the ExtensionWidgetsFeed to all widgets on the extension feed showing, with the registry being able to control the visibility of specific (built-in) ones instead.

  • WidgetManager needs to add a pref branch for each widget that records its enabled state and size.
  • ExtensionWidgetsFeed needs to update to publishing every widget whose prefs are under the New Tab branch, along with its enabled state, size, telemetry name and system pref.
  • WidgetsRegistry will need to merge the published extension widgets with WIDGET_REGISTRY so it can control the display and other params of built-in widgets.
  • Newly installed widget extension should be added to the start of the order.
Duplicate of this bug: 2089910

Acceptance criteria from Bug 2089910:

  • Uninstalling a generated widget removes it from New Tab, with no empty slot or stale entry after a reload.
  • The other widgets keep their order and size.
  • Opting out of Labs and blocking AI leave generated widgets in place and running.
  • A test checks uninstalling a widget and then reloading New Tab.
Blocks: 2089909

From https://phabricator.services.mozilla.com/D335844: it would be nice to turn this (test_a_package_installs_and_its_page_loads) into a test that ensures that the generated widget started and loaded as expected in the about:newtab once all the other missing bits to be able to do that are available.

That should be possible after with these changes.

Publishes every WidgetManager widget in the ExtensionWidgets state, so generated widgets appear in the New Tab widget row.

  • Adds setWidgetEnabled and setWidgetSize helpers that send WIDGETS_EXTENSIONS_SET for an extension widget and SET_PREF for a built-in widget.
  • Uses the helpers for hiding, resizing, hide all and maximize.
  • Places new widgets at the start of widgets.order and drops them from it on uninstall.
  • Adds a widgets.generated.enabled pref, off by default, that makes generated widgets available.
  • Leaves generated widgets out of the Customize panel.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: