Allow widget registry entries to add items to their card menu
Categories
(Firefox :: Widgets, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: mconley, Assigned: mconley, NeedInfo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [hnt][hnt-wattle])
Attachments
(1 external file)
Widget registry entries have no way to add their own items to the menu of the card that MozWidgetCard draws for them. That menu only holds the shared widget items (hide, move, change size, learn more).
This adds an optional menu field to WidgetRegistryEntry, holding WidgetMenuItems that MozWidgetCard draws above the shared items:
- A
"choice"item is a submenu of checkable options. The chosen value is stored in a pref (the first option counts as chosen until one is picked), recorded as achange_<id>widget user event, and passed to the widget's document as anid=valueparameter in its URL fragment, so the document can switch views without reloading. - An
"action"item runs one of a fixed set of host actions New Tab supports. The only one so far is"show-customize", which opens the Customize panel.
useSizeSubmenu gains an optional dataset key so choice submenus can reuse it.
The Wrexham AFC widget (bug 2087516) needs this for its "View" (Matches, Table, Fixtures) and "Wallpapers" menu items.
Bug 2083852 plans to let extension widgets define menu items through the extension context menu. This is complementary: it covers widgets defined in the registry, including ones that have no extension.
Updated•17 days ago
|
| Assignee | ||
Comment 1•17 days ago
|
||
MozWidgetCard draws an entry's menu items above the shared items. A "choice"
item is a submenu of checkable options whose value is stored in a pref and
passed to the widget's document in its URL fragment; an "action" item runs a
host action, of which "show-customize" is the only one. No registry entry has
a menu yet.
Updated•17 days ago
|
Comment 3•14 days ago
|
||
Backed out for causing failure @ browser_wrexhamafc_widget.js
Comment 5•13 days ago
|
||
| bugherder | ||
Updated•7 days ago
|
Description
•