Closed Bug 1626946 Opened 5 years ago Closed 5 years ago

Remove search history entries that dupe a search suggestion

Categories

(Firefox :: Address Bar, task, P2)

task
Points:
5

Tracking

()

VERIFIED FIXED
Firefox 77
Iteration:
77.2 - Apr 20 - May 3
Tracking Status
firefox77 --- verified

People

(Reporter: mak, Assigned: bugzilla)

References

(Blocks 3 open bugs)

Details

(Keywords: blocked-ux)

Attachments

(1 file)

In some cases we may show history entries from the current search engine, that duplicate a search suggestion (same search done in the past), we should retain the search suggestion and remove the duplicate history entries.

Assignee: nobody → htwyford
Status: NEW → ASSIGNED
Iteration: --- → 77.1 - Apr 6 - Apr 19

Verdi, how do we want to display these search history results? We have the hidden pref browser.urlbar.restyleSearches which displays them as a suggestion result but with the search engine icon instead of the magnifying glass. This is presumably because if the user has a search history result from an engine other than their default, that search history result would still take them to the different engine instead of their default.

Is that an acceptable UX?

Flags: needinfo?(mverdi)
Keywords: blocked-ux

Another consideration: if the results comprise only suggestions and search history results, should we still show the "Search in Private Window" result? Right now, we only show it if all the results are suggestions.

EDIT: The patch that landed shows the Private Search result even if there is search history.

Also, this is more of an engineering consideration rather than UX, but this bug would be considerably easier to implement if we remove the suggestion rather than the search history result. History results are PROVIDER_TYPE.IMMEDIATE whereas suggestions are PROVIDER_TYPE.NETWORK. The search history result arrives at the muxer first. Since the search suggestion arrives later and has a different position in the results, we get flickering if we remove the search history result in favour of the suggestion. There's no flickering if we simply don't show the suggestion if there's already an "identical" search history result.

My current patch just shows whichever result arrives first and doesn't show the second one. In virtually all (all?) cases, this means we show the search history result and not the suggestion.

Marco, do you have any thoughts on this?

Flags: needinfo?(mak)

(In reply to Harry Twyford [:harry] from comment #3)

Also, this is more of an engineering consideration rather than UX, but this bug would be considerably easier to implement if we remove the suggestion rather than the search history result. History results are PROVIDER_TYPE.IMMEDIATE whereas suggestions are PROVIDER_TYPE.NETWORK. The search history result arrives at the muxer first.

Unfortunately this is not a given. History provider is immediate just because it provides the heuristic result, but after fetching the heuristic result, UnifiedComplete.jsm runs a delay. If we'd have a separate provider for the heuristic result you could see that much more easily.

Additionally, if a user has an old and full mechanical disk and a fiber optic connection, I wouldn't bet on what arrives first.

My current patch just shows whichever result arrives first and doesn't show the second one. In virtually all (all?) cases, this means we show the search history result and not the suggestion.

I think just removing whatever arrives later is fine as a first step, provided the url still has all the necessary Mozilla params. Though, if UX decides reverse parsed entries should look exactly the same as remote suggestions, we'd slightly break grouping... It still sounds like a good approach for an MVP.

Flags: needinfo?(mak)

Again, for UX: if the user disables search suggestions in the Urlbar but has search history results, what do we do? If we style search history results exactly like search suggestions, it'll look like we're fetching search suggestions even though we're just showing history.

Another question for follow-up: do we want to restyle all* search history results, or just ones matching the user's query/that appear in the list of network suggestions?

For example, if the user searches "oog", there might be a bunch of Google search history results for irrelevant queries. Do we want to restyle those?

* all = history results for the first page of results, on the default kind of search (usually, websearch rather than that engine's image/other search), with the correct partner codes. Bascially what the user would be navigated to if they clicked on the equivalent network suggestion result.

I'm also going to ni? mconnor on this since he might have thoughts on some of the questions above.

Flags: needinfo?(mconnor)
Blocks: 1398416
Iteration: 77.1 - Apr 6 - Apr 19 → 77.2 - Apr 20 - May 3
Points: 3 → 5
Pushed by htwyford@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/faa6c52a8595 Remove search suggestions that dupe a search history result. r=adw
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 77
Blocks: 1632620

I can confirm this issue is fixed, I verified using the latest nightly on Windows 10 x64 and macOS 10.13.

Status: RESOLVED → VERIFIED
Flags: needinfo?(mverdi)
Flags: needinfo?(mconnor)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: