Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

[WIP]: start adding support for other search engines. ( issue #1033 ) #1052

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Happy0
Copy link
Contributor

@Happy0 Happy0 commented Jun 19, 2018

No description provided.

@Happy0
Copy link
Contributor Author

Happy0 commented Jun 19, 2018

Hullo @pfrazee . I seen you say you'd maybe accept a pull request for this on #1033 so I thought I'd give it a shot to get familiar with the code base =].

Not sure if I'm going in the right direction here or not...

My main question for the moment is - is it possible to get at the settings somehow from the app/shell-window/ui/navbar.js file? I see that the 'beaker' global (where you can get the settings from) isn't available here - I assume this is deliberate?

@pfrazee
Copy link
Member

pfrazee commented Jun 23, 2018

Hi @Happy0 !

Let's aim to have a few builtin options (DuckDuckGo, Google, Yahoo, Bing) and then an open input for the user to choose. For the open input, I think we'll need to store at least 2 data-points:

  • Name / Label
  • Query URL

Where "Query URL" is a template similar to https://duckduckgo.com/?q=%s. Since the user will be picking from a few presets and then from their own custom choice, I think we'll actually need 3 data-points in the settings:

  • search_engine: One of the predefined engines, or "custom" if the user inputs their own.
  • search_engine_name: The name/label of the engine
  • search_engine_url: The URL template of the engine

These values will be set in all cases, so the predefined versions will simply give fixed values for _name and _url.

When used, we'll read search_engine_url and replace %s with the search query.

My main question for the moment is - is it possible to get at the settings somehow from the app/shell-window/ui/navbar.js file? I see that the 'beaker' global (where you can get the settings from) isn't available here - I assume this is deliberate?

It should be available, but perhaps not declared in the globals at the top of the file.

@aral
Copy link

aral commented Jun 24, 2018

Unlike mainstream browsers, and given the social mission of Beaker, it is irresponsible to expose the people using Beaker to surveillance capitalists like Google, Yahoo, and Bing. The business models of these corporations are grounded in tracking and profiling people. The browser should at least issue a warning about this. Otherwise, Beaker would be complicit in exposing the people using it to surveillance. Also, we should be visibly separating them from DuckDuckGo whose business model is not based on violating your privacy.

@pfrazee
Copy link
Member

pfrazee commented Jun 24, 2018

I'd be +1 to having DuckDuckGo as the only builtin option, and have users manually enter their alternatives

@Happy0
Copy link
Contributor Author

Happy0 commented Jun 24, 2018 via email

@aral
Copy link

aral commented Jun 24, 2018

Sounds great – thanks both! :)

Also, for future reference – in case we want some other convenient alternatives – here are some other search engines that do not track:

@pfrazee
Copy link
Member

pfrazee commented Jun 25, 2018

@taravancil do you have an opinion on adding duckduckgo autocomplete? Y/N?

@taravancil
Copy link
Contributor

I just checked out that example - it could be a nice enhancement, but I think it should live in a separate PR :)

I'm also not quite sure about how I feel about that flavor of autocomplete in the URL bar. @Happy0 do you know if there are any browsers that support it? I want to get a sense for how it would feel in Beaker before moving forward.

@aral
Copy link

aral commented Jun 26, 2018

@taravancil It does seem more useful than the Safari autocomplete (see screenshot) – but I guess it comes down to how accurate the entires are. PS. The example seems to have some edge cases (see “undefined” entries in second screenshot). CC @pfrazee

screen shot 2018-06-26 at 10 10 10

screen shot 2018-06-26 at 10 10 56

@pfrazee
Copy link
Member

pfrazee commented Jun 26, 2018

I think the autocomplete could be cool- let's try it in a separate PR

@Happy0
Copy link
Contributor Author

Happy0 commented Jun 26, 2018

Thanks all :).

I should be able to work on this again (and possibly autocomplete) on Thursday.

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.

4 participants