Closed Bug 2094488 Opened 12 days ago Closed 7 hours ago

Add a call to action for building a custom widget to the "Manage widgets" subpanel on New Tab

Categories

(Firefox :: Widgets, enhancement, P1)

enhancement
Points:
2

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: nina-py, Assigned: nina-py, NeedInfo)

References

(Blocks 2 open bugs)

Details

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

Attachments

(2 external files)

Add a call to action to the "Manage widgets" subpanel of the Customize panel that points people to Widget Studio, where they describe a widget and Firefox builds it.

It shows the sparkles icon, the text "Build your first custom widget" and a "Create a widget" button, as in the Figma frame: https://www.figma.com/design/NbCtOQ1cYuEnIYsgWiTyZZ/HNT--Explorations?node-id=2712-6804

Clicking the button opens Widget Studio in the sidebar, the same as the button in the Widget Studio callout message in https://bugzilla.mozilla.org/show_bug.cgi?id=2089914#c2.

Only people who can use Widget Studio see it. If custom widgets are turned off or AI is blocked, the panel looks the same as it does today.

Full Figma frame for context: https://www.figma.com/design/NbCtOQ1cYuEnIYsgWiTyZZ/HNT--Explorations?node-id=2712-6798

An entry for Custom Widgets has been added to the "Manage widgets"
subpanel of the Customize panel. With no custom widget yet, it is a
pill with the message "Build your first custom widget" and a "Create a
widget" button. Once someone has a custom widget, it is a "Custom
widgets" section with a "Manage custom widgets" button. Either button
opens the Custom Widgets sidebar and closes the Customize panel.

The entry follows the same rules as Custom Widgets itself, so it only
shows when Custom Widgets is on in Firefox Labs and enabled in AI
controls.

Bug 2094315 will put generated widgets on New Tab, and until it lands
the pill is always shown. Telemetry will follow in a separate bug.

Attachment #9691958 - Attachment description: Bug 2094488 - Add a call to action for building a custom widget to the "Manage widgets" subpanel on New Tab r=mconley! → Bug 2094488 - Add a call to action for building a custom widget to the "Manage widgets" subpanel on New Tab r=fchasen!
Blocks: 2098992
Pushed by npypchenko@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/506199d221de https://hg.mozilla.org/integration/autoland/rev/7a21cfce3dc5 Add a call to action for building a custom widget to the "Manage widgets" subpanel on New Tab r=fluent-reviewers,places-reviewers,flod,mak,fchasen
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7de980e71adb https://hg.mozilla.org/integration/autoland/rev/1262eb727b7d Revert "Bug 2094488 - Add a call to action for building a custom widget to the "Manage widgets" subpanel on New Tab r=fluent-reviewers,places-reviewers,flod,mak,fchasen" for casuing failures at browser_customize_menu_content.js.

Meant to be squashed into 506199d221de8032717f812f9dbea872defdb77d (D346747) before it relands; it is not a standalone follow-up.

That commit made _CustomizeMenu.onExited refocus the Personalize button only when document.hasFocus() is true. That is false whenever focus is in browser chrome, so ordinary closes (close button, Escape, backdrop click) also stopped refocusing the button. This broke test_open_close_customizeMenu in browser/extensions/newtab/test/browser/browser_customize_menu_content.js ("Personalize button should be focused when menu closes").

This patch drops the hasFocus() check. _CustomizeMenu now passes ContentSection a closeWithoutRestoringFocus handler as onClose; only the Custom Widgets buttons in WidgetsManagementPanel use it. The handler sets a flag that makes the next onExited skip the refocus. The flag is cleared in onExited and when the panel reopens. The Jest test that mocked document.hasFocus is replaced with tests for both paths.

Pushed by npypchenko@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9489e5dfa936 https://hg.mozilla.org/integration/autoland/rev/b37a8cbbcb97 Add a call to action for building a custom widget to the "Manage widgets" subpanel on New Tab r=fluent-reviewers,places-reviewers,flod,mak,fchasen
Status: NEW → RESOLVED
Closed: 7 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: