Saturday, January 26, 2008

Mozilla Project Update: Determining Direction - Part II

Mozilla Project: Localized Search in Firefox's Search Box
After giving a few ideas some lengthy consideration, I've decided to take the approach to extend Firefox's search box so that it automatically adds search engine plugins to the search bar's drop-down list and then propagates search plugins to the top of the list when the browser encounters a web site that offers a search engine plugin and an OpenSearch description file. I've decided on this approach because the scope of the project appears to fit with the time constraints with which I'm working, it challenges my knowledge and abilities, and much of the code exists for what I'm attempting to achieve with this project.

Wednesday, January 23, 2008

Mozilla Project Update: Determining Direction - Part I

Mozilla Project: Localized Search in Firefox's Search Box
After doing some initial research, I was uncertain about what direction to take with my project for enhancing, or extending Firefox's existing search box. To help me determine a direction for my project, I searched Bugzilla@Mozilla where I found a number of bugs that were related to my project. I've added some of the more relevant bugs to my project's wiki page. I also spoke with Chris Tyler, Dave Humphrey and consulted with Gavin Sharp through e-mail and on IRC to get some ideas for my project's direction and to determine the scope of my project. From these discussions and communication exchanges, a few ideas emerged.
One idea that emerged was to extend Firefox's search box so that it automatically adds a search engine plugin to the search bar's drop-down list and then propagates the search plugin to the top of the list when the browser encounters a web site that offers a search engine plugin and an OpenSearch description file. From reading some of the bugs at Bugzilla@Mozilla and from personal experience, it appears that most users have a preferred search engine to use as their default search engine so it would be necessary to a) reset the original default search engine on the drop-down list and b) give the user the option to retain the newly added search if it was not originally on the drop-down list. Some further investigation is required to determine if it would be possible to toggle between different search engines on the list if the user has two or more tabs open for different web sites that offer different search engine plugins.
A second idea that came from Gavin was to prototype the feature described in Bug 335448 - Autodetect repeated use of a search field, and ask the user if they want that engine added to the browser search box. This enhancement bug proposes that when Firefox detects that a user has used a particular web site's search box n number of times, the user should be presented with the option to add the web site's search feature to the browser's search bar drop-down list and auto-generate a search engine plugin based on the web page's form elements. Gavin suggested that this would mostly involve implementing an Automatic Detection algorithm and combining it with the search engine addition code from the non-landed patch in Bug 261124 - Textbox context menu should have "Add to Search Bar..." The patch adds search engines to Firefox's search bar given an input field and its associated form element. Potential drawbacks to this enhancement are being able to accurately and consistently auto-generate a search plugin based on a web page's form elements if the names or id's of the elements change, and being able to maintain an accurate account of search box usage if the user clears the browser's private data or the user does not accept cookies from sites.
The third idea was to have the browser detect web site search elements based on names, id's and class names that are commonly used for search input elements, and then use this metadata to generate and add search engine plugins to Firefox's search bar. This approach is very dynamic and fluid but it presents the major problem of being able to accurately and consistently detect search fields based on this type of widely diverse and random metadata.

Mozilla Project Update: Initial Research

Mozilla Project: Localized Search in Firefox's Search Box
During the initial research for my project, I discovered that Firefox 2.0 detects search engine plugins that may be manually added by the user to Firefox's search engine drop-down list. The user may then decide to select a particular search engine as the default for the browser's built-in search box. When Firefox detects a search plugin that has not yet been "Added" to the browser's list of search engines, the search engine icon and the drop-down list arrow of the browser's search box turn blue in colour.
Firefox allows JavaScript code to install search engine plugins, and supports two search engine plugin formats: OpenSearch and Sherlock. Firefox supports autodiscovery of search plugins , which enables a web site that offers a search plugin to advertise it, so that Firefox users can easily download and install the plugin. Any web site offering a search plugin must provide an OpenSearch description file, which is an XML file describing the search engine to the browser. To support autodiscovery of a search plugin, HTML code similar to the following line needs to be added to the <head> section of the web page:

<link rel="search" type="application/opensearchdescription+xml" title="searchTitle" href="pluginURL">

Monday, January 7, 2008

Week 5: Watching a User in Bugzilla

Starting from December 11, 2007 to December 18, 2007, I set my Bugzilla@Mozilla account to watch Myk Melez, a mozilla.org staff member. It appears that Myk is mainly involved with the following Mozilla Products: Toolkit, Firefox, Bugzilla, addons.mozilla.org, and Core. Although Myk was only assigned to six out of the 45 bugs that I observed, he was heavily involved with several bugs for many different Mozilla product components as summarized below.

Toolkit: XUL Widgets, Storage

Firefox: Bookmarks, Preferences, General, File Handling, Places, Location Bar and Autocomplete, Phishing Protection, Password Manager, OS Integration, Session Restore, RSS Discovery and Preview, Page Info, Microsummaries

Bugzilla: User Interface, Administration, Query/Bug List

Core: Embedding: Docshell, SVG, Editor, GFX, Layout, Build Config, Plug-ins, Widget: Gtk, Networking: Cookies

addons.mozilla.org: Developer Pages


Based on my observations during the time period mentioned above, I noted that Myk was assigned to the following bugs:

Bug 406697 – Can't load the correct bookmark in sidebar after opened another page in it.
Bug 407910 – clear site-specific preferences when clearing browser history
Bug 395638 – don't provide sorting options in Applications prefpane
Bug 395637 – sort alphabetically, but with common types on top, in Applications prefpane
Bug 408389 – Live Titles don't have selection
Bug 403565 – Old page gets resized when browsing to a new one