As part of a renewed effort to improve the user experience of location bar searches in Firefox, we have been working on the shared code handling search-as-you-type in textboxes [1], which is located in Toolkit.
*Current issues* It soon became apparent that most of the autocomplete code was designed for synchronous operation, and did not have the flexibility to handle the use cases we needed out of the box. Until now, we have been dealing with that by stacking non-breaking changes over the existing code. This makes the code more complex while adding features that will ultimately only be used in Firefox. This is also creating additional work in cases where we try to preserve backwards compatibility and fail, which has required follow-up work from both our team and the Thunderbird team. We're now evaluating a different approach for which we'll trim down the shared code to remove anything that is not needed. We'll rework and simplify the XPCOM interfaces, gradually moving to JavaScript where possible, and we'll separate the front-end styling from the search implementation. The simple autocomplete cases used by most add-ons, like textboxes with autocompletesearch="history" attributes, will continue to work as usual, but we'll be removing less used features like multiple search sources. We'll document the changes so that add-ons and other products have the information required to adapt their code. In fact, a search on the mozilla-central [2] and comm-central [3] repositories shows that this shared autocomplete code is only used on Desktop by Firefox and Thunderbird, while SeaMonkey uses the older XPFE autocomplete. Other Toolkit components like Form History use the autocomplete code, but they are used only by Firefox and will be updated to use the new interfaces as they are developed. The major change would be the removal of the multiple search sources from the autocomplete code, since this feature is used heavily by Thunderbird. For Firefox, we already developed the UnifiedComplete component that replaces the multiple searches in the location bar, but a similar work would be required for Thunderbird. *Proposal* Since I believe the amount of work and testing required in Thunderbird to keep up with the changes could be non-trivial, my suggestion would be to fork the current version of the autocomplete code from Toolkit to the comm-central repository. The autocomplete code itself does not depend on other components, and "pinning" the current version in Thunderbird would make it easier to keep up with the planned rapid development. Any wanted changes could then be imported as needed. We don't plan on starting this effort until mid-September at the earliest, maybe later, so there should be time to decide a course of action and implement the fork. This plan is based on some research on the current state of the source tree, but feel free to share any additional information or concern we may have overlooked. Keep in mind that one of our requirements is to decommission the current XPCOM interfaces for autocomplete in mozilla-central, and avoid keeping obsolete code there. We're doing this to reduce the effort required by our planned innovations, at the cost of breaking backwards compatibility in some cases. If you have any other questions or suggestions, just let me know! Cheers, Paolo [1] http://mxr.mozilla.org/mozilla-central/source/toolkit/components/autocomplete/ [2] http://mxr.mozilla.org/mozilla-central/search?string=autocompletesearch%3D [3] http://mxr.mozilla.org/comm-central/search?string=autocompletesearch%3D _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform