Highlight suggestions only if the typed token prefixes a word in the suggestion
Categories
(Firefox :: Address Bar, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox78 | --- | fixed |
People
(Reporter: bugzilla, Assigned: bugzilla)
References
(Blocks 1 open bug)
Details
(Keywords: parity-chrome)
Attachments
(4 files, 1 obsolete file)
+++ This bug was initially created as a clone of Bug #1626891 +++
In its initial implementation, tail suggestions follow the same highlighting rules as normal suggestions. This means that any part of the tail that matches the typed string is not highlighted. Instead, we should highlight the entire tail after the end of the typed string, plus any words that changed in the string. See the attached screenshots for a comparison of Chrome and Firefox behaviour.
| Assignee | ||
Comment 1•5 years ago
|
||
Attached is Firefox behaviour. Note that this behaviour is not yet live in Nightly, but it is how bug 1626897 will land.
| Assignee | ||
Comment 2•5 years ago
|
||
| Assignee | ||
Comment 3•5 years ago
|
||
Depends on D74964
| Assignee | ||
Comment 4•5 years ago
|
||
I'm leaning towards a more general approach to this bug that encompasses both tail and normal suggestions. It appears that one consequence of having Google's tail suggestions enabled is that Google also starts to return more normal suggestions as the user approaches a tail suggestion but that are still returned as a normal result. One great example I found that highlights (pun intended) some odd behaviour in our highlighting code is the query "indian holy sites in i". Google returns two suggestions, neither of which are returned to our current Google client ID:
- "hindu holy sites in india" (normal suggestion)
- "... ireland" (tail suggestion)
Our highlighting doesn't deal well with the first suggestion. We get:
h in du holy sites in in d i a
We match match the word "in" to the in in "hindu" and the trailing i to the second i in "india". This is consistent with our other highlighting code but doesn't really uphold the spirit of what we're trying to do with highlighting. After all, it's more important that Google suggested the word "hindu" to replace "indian" and it's irrelevant (imo) that part of the typed string matches the second i in "india".
My patch only highlights if the part of the typed search query we're matching against is after a space or at the beginning of the string. It's a small change but I think it gives better highlighting in most situations! I'm looking for thoughts before I flesh out this patch. With the patch we get:
hindu holy sites in in dia
Attached is a screenshot of the query in comment 1.
BTW, the Phabricator stack includes a small patch that enables experimental tail suggestions, which should be applied if you're testing this one.
Comment 5•5 years ago
|
||
This makes a lot of sense, thank you for doing it. Suggestions are very different from local results and deserve a different treatment.
(In reply to Harry Twyford [:harry] from comment #4)
My patch only highlights if the part of the typed search query we're matching against is after a space
What does "after a space" mean here?
or at the beginning of the string
I suppose you mean we highlight the remaining part of the string, so "o" => "o<ntario>"
From the screenshot and examples we seem to highlight a word if it is not found in the original search string, or we highlight the tail of a word if it starts with a word in the original string.
| Assignee | ||
Comment 6•5 years ago
|
||
(In reply to Marco Bonardo [:mak] from comment #5)
This makes a lot of sense, thank you for doing it. Suggestions are very different from local results and deserve a different treatment.
(In reply to Harry Twyford [:harry] from comment #4)
My patch only highlights if the part of the typed search query we're matching against is after a space
What does "after a space" mean here?
I mean that when we're comparing a typed token to the suggestion, we ensure that the part of the suggestion being matched to the token is either the first word in the string, or comes right after a space and is thus matching the beginning of a word.
I suppose you mean we highlight the remaining part of the string, so "o" => "o<ntario>"
From the screenshot and examples we seem to highlight a word if it is not found in the original search string, or we highlight the tail of a word if it starts with a word in the original string.
Yep!
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 8•5 years ago
|
||
| bugherder | ||
Description
•