Opened 6 years ago
Closed 3 years ago
#14809 closed enhancement (fixed)
Implement 1-letter search shortcuts (easy)
Reported by: | pulkomandy | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta3 |
Component: | Applications/WebPositive | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
WebPositive should allow easy searching on some common websites. The search preferences should be reworked to allow listing multiple search engines (of which one would be the default for the current use of typing something that's not an URL). For example, typing "w foo" in the address bar should search "foo" on wikipedia. "g foo" on Google. "q foo" on Qwant, etc.
Attachments (1)
Change History (13)
follow-up: 2 comment:1 by , 6 years ago
comment:2 by , 6 years ago
Replying to yatendra1999:
If i wanted to search "q bit" on the default engine, redirecting to Qwant may cause problems.
Or is it compulsory to define the search engine to be used like "g q bit"?
comment:3 by , 6 years ago
It depends what you type. The existing code already tries to do smart things
For example:
- stdio.h -> contains a . so it is searched as a domain (annoying)
- q bit -> search on qwant
- g q bit -> search on google
- g stdio.h -> search on google
We could make this even better by having suggestions in the completion popup. For example if you type q bit, the first and selected by default entry would be "search 'bit' on qwant", but using up/down arrow keys you can easily select "search q bit with default search engine". At least it would not be too annoying this way.
I think the Vivaldi browser does something like that, it is great because it gives you an idea of what will happen.
Note that if by default no shortcuts are configured, nothing will happen. It's just a possibility for the user to add more search engines.
If single-letter is found too easy to trigger, we can also use a different shortcut, for example !g or &g or whatever we decide one (slight preference for these because they are the syntax used by duckduckgo and qwant to search on other engines - but using a character not allowed in URLs may be a good idea too).
comment:4 by , 6 years ago
Hi there. I am working on this ticket and would like to contribute to it. (This is to improve my GSOC application)
comment:5 by , 6 years ago
Here is my implementation https://review.haiku-os.org/c/haiku/+/1359. @PulkoMandy please review my code.
comment:6 by , 5 years ago
charaters that are not allowed in URL's are already allowed in searches, like space :) Personally i really really dislike implementation of this based on letters, i thas caused me nothing but grief in the past (thus make it opt-out pretty please, if this is the way to go). On the other hand the way chromium does this feals quite natural to me, maybe that would be a possibility too?
comment:7 by , 5 years ago
About 10 years ago I made this mockup:
When you enter a string this tabbed menu pops up, cursor down lets you choose from the presented options, just like it does now. Once down there, a cursor left/right lets you change tabs.
I can't remember where I posted about this back then, but not everybody was a fan, I think... :)
comment:8 by , 5 years ago
I'm not sure I like it with tabs, because you have to move to the other tabs to see what's there. A single list may work, with, in order (for example, but that's open for discussion):
- Bookmarks
- Search engines
- History (sorted by "today", "yesterday", "last week", "old")
This way you can see at a glance what you are looking for.
Note that these shortcuts will not replace the default behavior (if it looks like an URL, open it directly, otherwise, if it starts with 1 letter + space, and there is a matching shortcut, use that, and if nothing works, throw the string to the default search engine).
And yes, we may not provide a huge list of preset search engines, so that it is not too easy to trigger this by accident.
comment:9 by , 5 years ago
I'm not sure I like it with tabs, because you have to move to the other tabs to see what's there. A single list may work, with, in order (for example, but that's open for discussion):
Generally, it's always a good to see everything in one glance. This is a slightly different situation:
- we only show 8 lines in the popup menu (we don't want to obscure too much of the current website, and I suppose a short list is quicker to scan).
- having bookmarks, search engines, history, (and maybe keywords) vertically in a single list means lots of scrolling to get from one to the next.
- when we start typing, we almost always know what we want to do: search, open a (keyworded) bookmark, open from history. Normally, we don't need to see the tabs we're not interested in. Pressing down and left/right accordingly should quickly enter muscle memory
comment:11 by , 3 years ago
It's not possible to customize the list of search engines, they are hardcoded currently. So, I guess this is fixed, right, but we need a follow-up ticket, I'll create it.
comment:12 by , 3 years ago
Milestone: | Unscheduled → R1/beta3 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Created follow-up ticket #16991. This one can be closed now, thnaks for the reminder.
If i wanted to search "q bit" on the default engine, redirecting to Qwant may cause problems.