Test Pilot/Universal Search

From MozillaWiki
Jump to: navigation, search

Introduction

Universal Search is a project to unify the search access points in Firefox and offer a deeper, more engaging search experience by making local results richer and by including results from the best of the web.

Contributing

People to know

The people below are good contact points for this test. It's easiest to get in touch with us on IRC or our mailing list. See details on the Test Pilot wiki page.

Product Engineering
Nick Chapman (irc: nchapman) Chuck Harmston (irc: chuck)
Jared Hirsch (irc: _6a68)

Product Roadmap

Developer Overview

The Universal Search project modifies the contents of the dropdown panel that is shown when you type in the urlbar.

We've implemented this in two different ways:

  1. The current focus is an add-on that inserts a server-generated recommendation above the existing results, using XUL for the UI.
  2. There is also an older add-on that replaces the entire results list with an iframe, using HTML5 for the UI.

Both add-ons generate recommended results using the same naive algorithm: given a search string, get search suggestions; send the top suggestion to a search engine; return the top search result to the user.

We switched from HTML to XUL mid-Q1 in response to changes in product's short-term (Q1 2016) roadmap. Rather than experiment with the layout and appearance of the UI, we are now simply inserting a single recommendation above the results list, in order to see if users like recommendations at all. When we get a longer-term roadmap, the iframe-based prototype might turn out to be the better choice for some or all future experiments.

GitHub repositories

Current add-on:

Older, inactive, iframe-based add-on:

XBL

XBL is the language used to modify the popup contents. XBL is a relic from the era of profound XML optimism, so code is written as XML data; and the documentation describes versions of the language that were never implemented, but no docs exist that describe how it actually works in Firefox. XBL shares the global window with JS, but has its own set of DOM bindings; you'll have to override XBL event handlers to hook into existing event-driven behavior, like key or mouse events, but you'll have fewer surprises if you actually handle the event in JS.

Existing Gecko Code

To understand how our prototype works, take a look at the code it modifies:

Reading this code will lead to older service and IDL definitions, most of which are in the toolkit/components/autocomplete (autocomplete code and places search) and toolkit/components/search (search suggestions) modules.