Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search memory in address bar #14

Closed
Treora opened this issue Feb 10, 2017 · 9 comments
Closed

Search memory in address bar #14

Treora opened this issue Feb 10, 2017 · 9 comments

Comments

@Treora
Copy link
Collaborator

Treora commented Feb 10, 2017

Two possible approaches:

  1. Use the omnibox API, like WorldBrain/Falcon. Currently only possible in Chrome|ium, and only works when the user enters a specified prefix, but it does allow to directly display results as suggestions.
  2. Define a search engine provider. If extension URLs are not supported as search providers, we can provide a fake URL, requests to which we redirect back to the extension. Downside: suggestions would probably not be supported as they seem not redirectable from the webRequest API. Also, switching default search engines is a hassle in Chrome|ium, though easier in Firefox.

Neither solution is really satisfying.

@blackforestboi
Copy link
Collaborator

blackforestboi commented Feb 10, 2017

Another option would be to make it like Pinboard. So if users search via the address bar they automatically land on a search engine (maybe google) and then get (the first 5) results displayed on the side or as the first results.

Also the missing API endpoint for the address bar will be resolved with the new FF53 (release 23. april). The problem then still remains for other browsers like safari or vivaldi.

@Treora
Copy link
Collaborator Author

Treora commented Feb 11, 2017

Indeed an option to peg onto a user's existing web search (though, again, not really satisfying).

None of these options exclude each other, and all of them are compromises just to provide somewhat more convenient, quicker access to something that is already accessible in another way. I guess some user research may be helpful here, and whatever works suffices in the meantime.

@blackforestboi
Copy link
Collaborator

blackforestboi commented Mar 1, 2017

I think its best to just go with the way Falcon/WorldBrain does it right now. Accessing search it in the Omnibar with the command w+tab/space.

The code, giving inspriation for that can be found here: https://github.com/WorldBrain/Research-Engine/blob/master/src/js/background.js#L17
The functions involved:

  • chrome.omnibox.onInputChanged.addListener(omnibarHandler);
  • chrome.omnibox.onInputEntered.addListener(acceptInput);
  • omnibarHandler
  • suggestionsComplete
  • makeSuggestions
  • dispatchSuggestions

Addition to the existing code

The first result should be a link to the full results page of the same query.

@Rohanhacker
Copy link
Contributor

can I work on this I am a newcomer ?

@blackforestboi
Copy link
Collaborator

Yes, good one. As discussed in the call, feel free to take it on!

@Rohanhacker
Copy link
Contributor

How does it look?
screenshot from 2017-03-11 18-13-03

@blackforestboi
Copy link
Collaborator

Nice! that was quick. Looks great.
As a bonus it would be great to show the visit time as well. so like 10/3/2017 3:30pm, if that is easily possible.
Also it would be cool, if the first result would show something like "Show all results (10)" Whereas 10 would be the number of results that have been found and it would link to the search overview with the same query and the 10(?) results.

Does that make sense?

@Treora
Copy link
Collaborator Author

Treora commented Mar 11, 2017 via email

@Rohanhacker
Copy link
Contributor

time can be easily done but I am not sure how one can modify redux store from a background script ??

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

No branches or pull requests

3 participants