webOS Nation Forums >  Homebrew >  TouchPad Patches > [Patch] Web Browser Search Suggestion (TouchPad)
[Patch] Web Browser Search Suggestion (TouchPad)
  Reply
Like Tree5Likes
  • 4 Post By GMMan
  • 1 Post By eblade

 
Thread Tools Display Modes
Old 08/24/2012, 10:03 PM   #1 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Now available from Preware! Look under the Browser category for Add Search Suggestions to Web URL Bar.

Here's a patch that I was working on for the past week. Simply put, it adds search suggestion results to the popup list that appears when you start typing something into the URL bar. Search results are appended to the bottom of the list, to a maximum of 32 total entries (browser default, not set by me). So if you've got a lot of hits for history and bookmark results, you won't see any search suggestions.

browser_2012-24-08_204302.png

The suggestions are from your default search engine, set from Just Type and Web preferences (they're actually control the same option). Your Just Type search provider must provide a search suggestion URL for this to work. To check, go to Card View and hit Just Type, and start typing anything. When the results list appear, look beside the entry for your default search engine and see if there's a Suggest button. I don't think TouchPads have the search suggestion URLs anymore, so I rounded up Google and Wikipedia from Firefox. Please find a package that adds those suggestion URLs to Just Type here. It's a modified version of bi0tech's Google URL fix.

The suggestion poll time is set to 3 seconds, so it doesn't delay your history list showing up. In the future I may have the history list return immediately and load search results when they come.

Bug that you should never encounter: Search suggestions that don't match what you have typed. I fixed that by not adding results if the query doesn't match what's currently in the URL bar.

Bug that you may encounter: Scrolling down in the list and then typing in some new words may cause the popup to become unscrollable because there are less entries. I'm not sure how I can fix that. It might be the way VirtualRepeater works.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor

Last edited by GMMan; 10/29/2012 at 02:32 PM.
GMMan is offline   Reply With Quote
Liked by cujoq37, Garrett92C, Vistaus and 1 others like this.
Old 08/24/2012, 10:27 PM   #2 (permalink)
Homebrew Developer
 
Garrett92C's Avatar
 
Posts: 401
Nice patch, man. I'll have to try it out tomorrow.

-- Sent via mobile
__________________
Want to keep up with my exciting new projects? You know where to find me.
Garrett92C is offline   Reply With Quote
Old 09/08/2012, 04:25 PM   #3 (permalink)
Member
 
grasshoper's Avatar
 
Posts: 536
Nice

Feedback time:

Needs a luna restart and it shows 5 suggestions each time

Doesn't work with duckduckgo (maybe they don't have suggestions url)

It works great with google and it brought me back history in just type (is it possible? I messed with just type some time ago and I think history suggestions were lost...)

Hope you'll make it into preware
__________________
Proud Veer and Touchpad owner
grasshoper is offline   Reply With Quote
Old 09/08/2012, 04:55 PM   #4 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Originally Posted by grasshoper View Post
Nice

Feedback time:

Needs a luna restart and it shows 5 suggestions each time

Doesn't work with duckduckgo (maybe they don't have suggestions url)

It works great with google and it brought me back history in just type (is it possible? I messed with just type some time ago and I think history suggestions were lost...)

Hope you'll make it into preware
Here's a page with providers for DuckDuckGo: Duck Duck Go + Google Suggest OpenSearch Plugin and Proxy It will work with Just Type, but unfortunately it seems it needs to be promoted before it will work in the browser.

As with the history, all I did was rearrange some code to add in suggestions. Maybe the patch somehow repaired your code? Sort of unlikely, considering the patching software usually balks if the source file isn't exactly the same.

By 5 suggestions do you mean always 5, or at least 5, or Google just spit back 5 every time. It seems Google varies the number of suggestions for the same query based on some unknown criteria.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 09/08/2012, 05:11 PM   #5 (permalink)
Member
 
grasshoper's Avatar
 
Posts: 536
Wow thank you ! Very nice the duckduckgo page you gave me. It works with just type now, even though there is no icon anymore. But what do you mean by 'needs to be promoted'?

I get 5 suggestions only, each very time, with any search engine I set to default. It is not a normal behaviour?
__________________
Proud Veer and Touchpad owner
grasshoper is offline   Reply With Quote
Old 09/08/2012, 05:27 PM   #6 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
"Needs to be promoted" means for some reason it's not showing up in the browser's search options yet. There needs to be some SQL magic applied before it appears.

You're supposed to get 32 total entries in the list, including history and bookmarks. While Google may not provide 32 search suggestions, there should be enough suggestions for you to scroll the list with. That is unless what you're searching is quite specific, in which case you'll get those entries that begin with what you typed or corrects spelling.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 09/08/2012, 06:10 PM   #7 (permalink)
Member
 
grasshoper's Avatar
 
Posts: 536
Well I get 18 entries total, suggestions included, and that's even with a word like 'apple' or 'webos'. I still get 5 suggestions only, no matter what I do. Maybe options that are shown only when tapping on the '+ plus' button are counted with the total? Although it doesn't seem to be case...
__________________
Proud Veer and Touchpad owner
grasshoper is offline   Reply With Quote
Old 09/08/2012, 06:14 PM   #8 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Wait, are you talking about Just Type? Just Type limits suggestions to 5 entries, while my patch displays up to 32 in the browser. I suppose you're referring more to the search suggestion adder IPK than the browser patch.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 09/09/2012, 07:44 AM   #9 (permalink)
Member
 
grasshoper's Avatar
 
Posts: 536
Oups, my bad. The patch didn't show in Communities. Yes, I was talking about the just type ipk!

When I try to install the patch I get from Internalz the following error:

'patch unexpectedly ends in the middle of line

Only garbage was found in the patch input'

It is not the only patch that does this. The app catalog 'all apps' fixer patch does this as well.

Any idea what is wrong here? I think it's on my side' but what is it?
__________________
Proud Veer and Touchpad owner
grasshoper is offline   Reply With Quote
Old 09/09/2012, 08:18 AM   #10 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Try having the patch emailed and use the attachment from the email. Downloading from the forums is known to produce corrupted files.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 09/09/2012, 04:27 PM   #11 (permalink)
Member
 
grasshoper's Avatar
 
Posts: 536
Well, thanks it worked. But it seems that something got broken on my part because now, and even before installing the patch, when I typed something in the browser url bar, I got a blank suggestion list whatever I typed.

I thought this patch would correct things up, but certainly did something terribly wrong that broke my suggestion list in the browser.

On the Just Type side, everything's fine otherwise...

EDIT: Ok, so I understood what went wrong, and I think you already told me but didn't understand the whereabouts: I used your search engine for DuckDuckGo in just type. I thought that since it was not available as a default search engine in the browser prefs, it would use Google instead, which was selected. But no, it was using DuckDuckGo which returned no entry, even for history. So I'll have to stick with Google if I want all the features enabled ... :/
__________________
Proud Veer and Touchpad owner

Last edited by grasshoper; 09/09/2012 at 04:32 PM.
grasshoper is offline   Reply With Quote
Old 09/09/2012, 04:48 PM   #12 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
I think my history still comes up properly even if the search provider doesn't support suggestions. Mine defaults to Twitter, so it's only the suggestions that are not there. I've designed it to skip suggestions and directly render previous results if there's not a search suggestion URL. And even if it fails, it'll still jump to the render code.

A bug I've discovered a couple of weeks ago: you will still get duplicate suggestions if your network connection is faster than you and you enter some letters and quickly delete it before the suggestions are fetched. I'm not really planning on fixing this, unless there's an easy way that doesn't entail using sequence numbers.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 09/09/2012, 05:16 PM   #13 (permalink)
Member
 
grasshoper's Avatar
 
Posts: 536
Ok, I checked by going back into duckduckgo for just type while sticking to google for the browser and now it works just as you describe.

We'll see if it sticks upon reboot.

Concerning your bug I can't seem to reproduce it. Did you check it does that on other tp's than yours?
__________________
Proud Veer and Touchpad owner
grasshoper is offline   Reply With Quote
Old 09/09/2012, 05:23 PM   #14 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Originally Posted by grasshoper View Post
Concerning your bug I can't seem to reproduce it. Did you check it does that on other tp's than yours?
I don't have any other TPs to test it on, hence requesting testing here. I wouldn't worry about it, since it's a rare occurrence and doesn't really break anything.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 09/09/2012, 05:28 PM   #15 (permalink)
Member
 
grasshoper's Avatar
 
Posts: 536
As you say, even if it happened to me too, I wouldn't bother much either. It doesn't happen often.
__________________
Proud Veer and Touchpad owner
grasshoper is offline   Reply With Quote
Old 09/10/2012, 10:53 AM   #16 (permalink)
Moderator
 
OldSkoolVWLover's Avatar
 
Posts: 7,732
<thread moved per OP request>
__________________
I love physical keyboards... but there is two devices that would make me consider a slab, one is something running a full version of Open webOS. The other is an iPhone!!!! HA HA just kidding (about the iPhone that is)...
OldSkoolVWLover is offline   Reply With Quote
Old 10/14/2012, 12:53 PM   #17 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Submitted for approval for Preware. Same version, nothing has changed.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 10/29/2012, 02:32 PM   #18 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
The patch has now been approved. Find it in Preware.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 10/29/2012, 05:44 PM   #19 (permalink)
Homebrew Developer

 
Posts: 3,291
You should add this to the official Enyo app in Isis
__________________
Author:
Remove Messaging Beeps patch for webOS 3.0.5, Left/Right bezel gestures in LunaCE,
Whazaa! Messenger and node-wa, SynerGV 1 and 2 - Google Voice integration, XO - Subsonic Commander media streamer, AB:S Launcher
Quote:
(1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
GO OPEN WEBOS!
People asked me for a donate link for my non-catalog work, so here you are:
eblade is offline   Reply With Quote
Liked by OldSkoolVWLover likes this.
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0