Skip to content
This repository has been archived by the owner on Jan 10, 2019. It is now read-only.

Instant search suggestions #48

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Instant search suggestions #48

wants to merge 4 commits into from

Conversation

gaborluk
Copy link

This changeset implements instant search suggestions per #32.

To receive suggestions, the user has to explicitly type the extension's keyword first (currently d), and hit space. If the d keyword is already defined in the browser as another search provider's keyword, the omnibox will not enter "extension mode". The implementation emulates Chrome's inverse suggestion highlighting style (the suggested part is bold), and handles !bangs.

It would be desirable for the omnibox to display instant suggestions as soon as the user types something into the naked omnibox, but currently this is not doable. While the manifest.json documentation specifies an optional instant_url key for the search_provider, it is not documented how this should work or what format Chrome expects the suggestions to arrive in, and is probably not even implemented, much like the related search_url_post_params.

Copy link
Author

@gaborluk gaborluk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Oops, disregard this.)

@@ -36,7 +36,7 @@
"favicon_url": "https://duckduckgo.com/favicon.ico",
"is_default": true,
"keyword": "duckduckgo.com",
"name": "DuckDuckGo Search",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was redundant as Chrome will automatically append the word "Search" to the search provider's name, resulting in labels like "DuckDuckGo Search Search" in the omnibox.

@@ -1,5 +1,5 @@
{
"name": "DuckDuckGo for Chrome",
Copy link
Author

@gaborluk gaborluk Feb 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is optional, but I recommend it because once entering "extension mode" (d + Space in the omnibox), this setting specifies the label that is shown in the omnibox before every search query, and it should be both as succinct and as semantic as possible.

@jdorweiler
Copy link
Contributor

@gaborluk
Thanks for the PR! This looks really interesting.
We're thinking of making some changes to our browser extensions so we will need to review this and see if it will fit with our plans.
I'll leave this open for now and get back to you when we figure that out.

@gaborluk
Copy link
Author

gaborluk commented Mar 8, 2017

@jdorweiler, thanks for the heads-up. As for the changes, if you need a helping hand, let me know.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants