Proof of Concept New Google Suggest Extension

Talk about add-ons and extension development.
loconet
Posts: 12
Joined: November 28th, 2002, 10:06 am
Contact:

Proof of Concept New Google Suggest Extension

Post by loconet »

Yesterday Google released a very nifty upgrade to their search tool, which allows you to choose from a list of popular hits depending on what you are typing on the search box.

http://www.google.com/webhp?complete=1&hl=en

Anyways, this new toy was too cool to leave aside so I spent most of the night hacking together a proof of concept Firefox extension to add Google Suggest like behavior to the browser's search tool. Just to show how great XUL/XBL/XPCOM is.

I've also created a small search plugin for Google Suggest so the extension only runs when this custom search plugin is in use to avoid any conflicts with the main Google search plugin.

Google Suggest:
<img src="http://www.loconet.ca/images/google.gs.screen.png">

GSuggest Firefox Plugin:
<img src="http://www.loconet.ca/images/gs.screen.png">

Obviously Google's is much better hehe.. and there are still some issues with GSuggest's results list (ie: lack of keyboard navigation) but you can test it out by following the steps below.

Go to: http://www.loconet.ca

1. Install GoogleSuggest search plugin-in
2. Install GSuggest extension
3. Restart Firefox
4. Choose GoogleSuggest as the search engine in the search toolbar


Known Issues:

- Mainly tested on win2k ff1.0!
- The result list lacks of keyboard navigation, you need to use your mouse to select result to query
- On Linux FF 1.0 the result list is not updated properly.
- Depending on how fast you type, there might be some lag in getting the result list to refresh properly
- Obviously if google decides to change delivery format, script location, etc. this will break..

Anyways, I'm still learning xul so i decided to make this as proof of concept to learn some more. Hopefully someone will pick up and implement a proper more robust extension with the same idea ..or maybe I will when i get more familiar with xul/ff's insides :)
Hidea
Posts: 231
Joined: June 18th, 2004, 2:35 pm
Location: Toronto, Canada

Post by Hidea »

god, this sucks..... I mean.. this rocks :D

Love it, it's true GG's sugest is much better, but I see a billion potentials in this extension... lovely work loconet, hopefully you'll continue developing it.

bug: The suggestions box does not appear right under the search bar, instead it appear in the middle of my tab bar (but vertically alligned to the search bar).

You might want to check incompatilibity with Search Bar Resizer extension.... I think that's what's causing it.
loconet
Posts: 12
Joined: November 28th, 2002, 10:06 am
Contact:

Post by loconet »

Hidea wrote:god, this sucks..... I mean.. this rocks :D


Haha, yah it does suck but thats ok :P

bug: The suggestions box does not appear right under the search bar, instead it appear in the middle of my tab bar (but vertically alligned to the search bar).


Yah i've noticed that as well, most of the time it aligns properly, sometimes it doesn't. I'm most likely not showing the popup correctly.. hmm.
ant1832
Posts: 98
Joined: February 5th, 2003, 10:08 am
Contact:

Post by ant1832 »

Good job putting this together so quick. Look forward to following the development on this extension and also in the google beta itself.
dkDesignCo.com--Professional designs for all your web needs.
Cesa
Posts: 12
Joined: January 11th, 2004, 9:27 am
Location: Örebro, Sweden
Contact:

Post by Cesa »

As you mentioned you cannot browse the results with the keyboard, another thing is that there is no history of previous searches. A suggestion is to use a list with two columns, one with the google suggestions, and one with previous searches, both browsable with the arrow keys (left/right to move between columns). Don't know how difficult this would be to implement though.

Oh, and if I don't select a google suggestion but hit enter instead, the list doesn't disappear.
/Cesa
stagmeister
Posts: 51
Joined: May 22nd, 2003, 6:31 pm
Location: Boston, MA

Post by stagmeister »

this rocks! i was also hacking away at an extension, but couldn't figure out all the XBL stuff (I have never played with XBL before). this is so cool, a suggestion- the method that tells if it is GoogleSuggest-able, it should be not a regex (that is processor intensive), rather you should have it set an attribute based on something in the search plugin, that way other search plugins could take advantage of this functionality.

good job!

jason
jedbro
Posts: 1899
Joined: November 10th, 2002, 12:35 pm
Location: Mexico / Boulder Co.
Contact:

Post by jedbro »

Awesome, check it out now.
I actually downloaded the googls js file and etc. so I could start hacking on something like this today :D
Glad you beat me to it.

Awesome stuff.
-Jed
loconet
Posts: 12
Joined: November 28th, 2002, 10:06 am
Contact:

Post by loconet »

stagmeister wrote:GoogleSuggest-able, it should be not a regex (that is processor intensive), rather you should have it set an attribute based on something in the search plugin, that way other search plugins could take advantage of this functionality.


Ah! that is a much better solution. I'm still new with this stuff, I didn't think of accessing it as a property of the plugin itself..but it only makes sense . same idea should apply for the data url. good stuff! :)

thanks.
mr magoo
Posts: 69
Joined: January 4th, 2003, 11:13 am

Post by mr magoo »

awesome- thanks for making this!
Neowin.net Journalist
jeanph01
Posts: 7
Joined: March 13th, 2003, 2:40 pm

bug installing

Post by jeanph01 »

Just to tell that I wasn't able to install the extension (the search plugin went ok) because, i think, I am using a french version of Firefox. Firefox tell me after trying to install it that this extension is not compatible and that it requires v1.0 (which i am using!).
thanks
dolphinling
Posts: 6
Joined: November 27th, 2003, 4:47 pm

Post by dolphinling »

loconet wrote:
bug: The suggestions box does not appear right under the search bar, instead it appear in the middle of my tab bar (but vertically alligned to the search bar).


Yah i've noticed that as well, most of the time it aligns properly, sometimes it doesn't. I'm most likely not showing the popup correctly.. hmm.

This might be from bug 62395 (https://bugzilla.mozilla.org/show_bug.cgi?id=62395)
John Liebson
Posts: 6920
Joined: July 29th, 2003, 1:09 pm

Post by John Liebson »

There may be a problem with this extension:

1. Using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041215 Firefox/1.0+, a trunk installer release, with WindowsXP Home.

2. Three times in the past few hours, after installing the search engine and the extension, Firefox has crashed while accessing a Google suggestions list.

3. Talkback does not work for me: I know, as I've tried many times for over a year, and have only managed to get one report submitted. Thus, I cannot, unfortunately, supply any specific data from Talkback to verify or disprove that the problem is with the extension. I can only state that I've been using this Firefox release rather extensively for over twenty-four hours without any crashes, except for those I've experienced when using the Google Suggest extension.
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

I think any extension causing Firefox to crash should be reported in Bugzilla... even if an extension has bugs, there are very few things that extensions should be allowed to do that would result in a crash. Certainly, it sounds as though this extension isn't doing anything particularly out of the ordinary.
chob
Posts: 4283
Joined: May 17th, 2003, 12:05 pm
Location: London, UK

Post by chob »

nice proof-of-concept work there loconet!
John Liebson
Posts: 6920
Joined: July 29th, 2003, 1:09 pm

Post by John Liebson »

Cusser wrote:I think any extension causing Firefox to crash should be reported in Bugzilla... even if an extension has bugs, there are very few things that extensions should be allowed to do that would result in a crash. Certainly, it sounds as though this extension isn't doing anything particularly out of the ordinary.

Well, I did as you suggested, only to receive a comment that this should not have been reported in Bugzilla, and the bug report I filed marked as invalid.

So, herewith your own personal Bah! Humbug!

(Anyone else desiring their own Bah! Humbug!, just let me know, I've got plenty...).
Post Reply