Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#4033 closed change (fixed)

Add search term autocompletion in URL bar

Reported by: mario Assignee:
Priority: P2 Milestone: Adblock-Browser-for-iOS-1.5.0
Module: Adblock-Browser-for-iOS Keywords:
Cc: pavelz Blocked By: #4117
Blocking: Platform: Adblock Browser for iOS
Ready: yes Confidential: no
Tester: Scheer Verified working: yes
Review URL(s):

Description (last modified by mario)

Background

In order to make working with ABB faster, we'd like to introduce autocompletion of typed search terms in the URL bar.

This is a follow-up issue of #4032, which introduced URL autocompletion.

What to change

As soon as a user starts to type into the URL bar, test if the typed string matches the beginning of a search term which has been searched before and perform the following actions:

  1. If the typed string matches a search term that has been visited before and if the last pressed key was not backspace (and if it doesn't match a URL that has been visited before; see #4032):
    1. Display the remaining characters of the most relevant search term* as autocompleted text as shown in this screenshot
    2. Upon pressing enter, the autocompleted search term is opened in ABB's configured search engine
    3. Upon pressing any other key, go back to 1.
  2. If the typed string does not match a search term that has been searched before or if the last pressed key was backspace:
    1. Do not display any search term autocompletion as shown in this screenshot

*most relevant search term: in case the typed string matches more than one search term, display the search term that has been searched the most.

Style/Components

Please display and treat the autocompleted text as ordinary selected text:

  1. Use the standard font/size/color as well as standard selection highlight color
  2. Upon pressing backspace once the selected text is removed as shown in this screenshot
  3. Upon pressing backspace more than once the selected text is removed and the previously typed characters are removed one by one

Remark for testers

Please note, that condition 1. ("Show search term autocompletion") and condition 2. ("don't display any search term autocompletion") can be overruled by #4032 which introduces autocompletion for URLs.

Attachments (2)

url_bar_autocomplete_keyword.PNG (50.3 KB) - added by mario 4 years ago.
url_bar_autocomplete_keyword_NA.PNG (105.8 KB) - added by mario 4 years ago.

Download all attachments as: .zip

Change History (21)

Changed 4 years ago by mario

Changed 4 years ago by mario

comment:1 Changed 4 years ago by mario

  • Description modified (diff)

comment:2 Changed 4 years ago by mario

  • Type changed from defect to change

comment:3 Changed 4 years ago by mario

  • Priority changed from P3 to P2

comment:4 Changed 4 years ago by mario

  • Summary changed from Search term autocompletion in URL bar to Add search term autocompletion in URL bar

comment:5 Changed 4 years ago by pavelz

Technically the same thing as #4032 and the *composite* behaviour should be designed. It's not distinguishable whether the user wants to autocomplete URL or a generic term, unless/until a non-URL character is entered. Consider an user entering characters adblock. Should we suggest adblockplus.org or adblock app ? We can't know. Until the user continues with space, we can only assume by recorded phrase popularity. Even when the user continues with space, it's still the same fulltext search where URLs will be left out simply by not matching textually, without any particular knowledge about URL forms.

Last edited 4 years ago by pavelz (previous) (diff)

comment:6 Changed 4 years ago by pavelz

If the typed string does not match a search term that has been searched before: Do not display any autocompletion

Except when a backspace was pressed, shouldn't it suggest the top result from search engine at least? Regardless of whether it was searched before or not? *Some* autocomplete should be displayed in any case IMO.

Last edited 4 years ago by pavelz (previous) (diff)

comment:7 follow-up: Changed 4 years ago by mario

It's not distinguishable whether the user wants to autocomplete URL or a generic term, unless/until a non-URL character is entered. Consider an user entering characters adblock.

This is one of the reasons we've split it into two issues. See the premise of clause 1. to be true:

  1. If the typed string matches a search term that has been visited before and if the last pressed key was not backspace (and if it doesn't match a URL that has been visited before; see #4032)

Which translates into "URL completion first".
Does this answer your concerns about how to decide whether to show search terms or URLs?

-

If the typed string does not match a search term that has been searched before: Do not display any autocompletion

Except when a backspace was pressed, shouldn't it suggest the top result from search engine at least? Regardless of whether it was searched before or not? *Some* autocomplete should be displayed in any case IMO.

Search term suggestions are still shown in the list of suggestions below the URL bar. Input history should not be mixed with search term suggestions. Autocompletion is closely associated with previously entered terms, which search term suggestions are not.
I'll invite Aaron to give feedback to this.

Last edited 4 years ago by mario (previous) (diff)

comment:8 Changed 4 years ago by mario

  • Cc pavelz added

comment:9 in reply to: ↑ 7 Changed 4 years ago by pavelz

Replying to mario:

It's not distinguishable whether the user wants to autocomplete URL or a generic term, unless/until a non-URL character is entered. Consider an user entering characters adblock.

This is one of the reasons we've split it into two issues. See the premise of clause 1. to be true:

  1. If the typed string matches a search term that has been visited before and if the last pressed key was not backspace (and if it doesn't match a URL that has been visited before; see #4032)

Which translates into "URL completion first".
Does this answer your concerns about how to decide whether to show search terms or URLs?

Yes it does now. I had mixed up search history (URL entered before) and browser history (URL visited before). Anyway it confirms my opinion that the stories should be folded together. Because point 2. of #4032 is invalid as separated - the desired result is not "no autocomplete" but point 1 of #4033.

It will be implemented together for sure.

So to sum up: the primary data source is the browser history, which means URLs. When there is no matching URL in browser history, search history is used instead. External engine results are not used, which means that after browser installation, most entries will not be autocompleted at all, as there is potentially no browser history and very short search history.

comment:10 Changed 4 years ago by mario

So to sum up: the primary data source is the browser history, which means URLs. When there is no matching URL in browser history, search history is used instead. External engine results are not used, which means that after browser installation, most entries will not be autocompleted at all, as there is potentially no browser history and very short search history.

Absolutely correct.

Regarding whether to separate the issues or not: We've opted for separating the issues for multiple reasons. We wanted to keep the scope of each issue simple (especially since they're closely related but not dependant on each other) and we wanted to keep testability as simple as possible. Nothing speaks against implementing them both at the same time though.

comment:11 Changed 4 years ago by mario

  • Ready set

comment:13 Changed 4 years ago by mario

  • Description modified (diff)

comment:14 Changed 3 years ago by pavelz

  • Blocked By 4117 added

comment:15 Changed 3 years ago by pavelz

  • Resolution set to fixed
  • Status changed from new to closed

comment:16 Changed 3 years ago by mario

  • Milestone set to Adblock-Browser-for-iOS-next

comment:17 Changed 3 years ago by scheer

As stated below, this feature functions as intended, the only issues I have currently are that in the Style/Components section as listed above, it states that 'Please display and treat the autocompleted text as ordinarily selected text:'. The issue here is that the text, as per the screenshot and the section mentioned above, is actually a greyed/duller version of the complete search suggestion and the suggested text is not highlighted at all.

@mario - if you can confirm that this behaviour is the new, intended behaviour, then I can mark this as verified.

When the typed string matches a search term that had been visited before and when the last pressed key was not backspace:

  • The remaining characters of the most relevant search term are displayed as autocompleted text.
  • Upon pressing enter, the autocompleted search term is opened in ABB's configured search engine.
  • Upon pressing any other key, the process starts over.

If the typed string does not match a search term that has been searched before or if the last pressed key was backspace:

  • The page does not display any search term autocompletion.

comment:18 Changed 3 years ago by mario

if you can confirm that this behaviour is the new, intended behaviour, then I can mark this as verified.

Yes, I can confirm, this is intended. The screenshot was a mockup and thus the way it is displayed differs according to the Apps actual style.

comment:19 Changed 3 years ago by scheer

  • Tester changed from Unknown to Scheer
  • Verified working set
Note: See TracTickets for help on using tickets.