Stocks widget: add an in-widget search entry point
Categories
(Firefox :: New Tab Page, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: gharp, Assigned: nina-py)
References
Details
(Whiteboard: [hnt][hnt-wattle])
Attachments
(2 files)
Today, ticker search is reachable only from the widget's ... context menu -- the newtab-stocks-menu-search panel item ("Search ticker symbols") in Stocks.jsx, which reports widget_source: "context_menu" and user_action: "search_tickers". HNT-3129 promotes search to a main action on the widget surface.
Design produced two treatments. We are going to compare them in a two-branch experiment rather than pick one up front, so both need to ship behind a Nimbus-controlled variable. Spec: https://www.figma.com/design/i8wWurQ8yn9y5hCjnf8BYu/HNT---Nova?node-id=17968-46125
Treatment A: search exposed as an icon affordance in the Markets view, plus the shortened "Search" CTA in the Watchlist empty state. Follows the checklist pattern already used for the World Cup widget.
Treatment B: search as a labelled CTA at the bottom of the large widget.
Settled behavior, common to both:
- Activating the entry point opens the existing search UI. This is a new entry point, not a new search surface, and not an inline type-into field. The reason is to keep a single search pattern, so the widget sizes and the Markets-view affordance do not each need their own treatment.
- Markets remains the default view on load. Defaulting to Watchlist was considered and deferred as a possible separate experiment.
- Empty-state CTA content is the shortened "Search" copy from content review.
Acceptance criteria
- Both treatments are implemented and selected at runtime by a single Nimbus variable, defaulting to today's behavior when unset. Suggested
widgets.stocks.searchEntrypointwith valuesnone/icon/cta; confirm against the trainhop naming already used inWidgetsRegistry.mjs. - Treatment A matches the Figma: search icon affordance in the Markets view, "Search" CTA in the Watchlist empty state.
- Treatment B matches the Figma: labelled search CTA at the bottom of the large widget, Markets capped at 3 rows, no scroll bar.
- Each entry point reports a distinct
widget_sourcealongsideuser_action: "search_tickers", so search opens can be attributed per branch.context_menukeeps its current value. - Activating any entry point opens the same search UI the context-menu item opens today, with no behavior change inside search itself.
- Markets is still the default view in both treatments.
- Test coverage for each treatment and for the unset/default state, across the widget sizes each treatment applies to.
Open scope questions
- Whether the
..."Search ticker symbols" item is removed from the context menu once search is a main action, or retained as a secondary path. Affects AC 4 and whethernewtab-stocks-menu-searchis retired.
This supersedes bug 2066215 (Stocks widget: adjustments to search), paused on 2026-08-31 while these options were explored.
| Reporter | ||
Updated•22 days ago
|
| Reporter | ||
Comment 1•16 days ago
|
||
Blocked while we review the UX changes and make potential adjustments
| Assignee | ||
Comment 2•5 days ago
|
||
Three Fluent messages have been added for the Stocks widget's new search
button and Watchlist empty state. A migration recipe copies the existing
translations into the two button messages: "Search by name or symbol"
from the widget's own search field, and "Search" from the New Tab search
box button, which has the identical intent of a verb on a button that
starts a search. The source strings have been in the tree for five weeks
and the Stocks one is translated in 46 locales.
Updated•5 days ago
|
| Assignee | ||
Comment 3•5 days ago
|
||
Search has become a main action on the Stocks widget at medium and large,
following the Variant A design. A "Search" button now sits in the toolbar
next to the list dropdown, collapsed to an icon until it is hovered or
focused, and an empty Watchlist shows an empty state with Kit, a short
message and a "Search" button of its own. Both open the same search panel
as the context menu item, and focus returns to whichever control opened
search when it closes.
The dropdown has moved from the ghost to the default button type to match
the design, and stock rows at medium and large have gained a tooltip with
the full stock name.
Removing the last Watchlist row now keeps the user on the Watchlist,
showing the empty state, instead of switching back to Markets.
Each entry point records search_tickers with its own widget_source
(widget, empty_state and the existing context_menu).
Comment 5•5 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/6261e2f56170
https://hg.mozilla.org/mozilla-central/rev/59d1b15c26ea
Description
•