Replace token alias with indicator when the token alias is confirmed or fully typed
Categories
(Firefox :: Address Bar, enhancement, P2)
Tracking
()
People
(Reporter: bugzilla, Assigned: bugzilla)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
This includes inserting the indicator when the user clicks on a search shortcut Top Site.
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
UX clarified that we're also going to replace bookmark keywords and user-defined aliases with the visual indicator.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
This patch changes the paramters to setSearchMode. The original patch to introduce search mode passed engineName to setSearchMode instead of the entire engine object. It was suggested in review that the nsISearchEngine be passed so we could run instanceof to distinguish it from a RESULT_TYPE. This patch reverses this and passes engineName instead through a destructured parameter.
In pickResult, we need to enter search mode synchronously based on the information in a result payload. Result payloads can't/shouldn't pass around complex objects like an nsISearchEngine, so we just pass engineName and the alias as strings. Since pickResult is synchronous, we can't use UrlbarSearchUtils to look up the engine based on the engineName. Besides, setSearchMode only uses engineName, so looking up the engine only to just use its name seems like a waste of resources.
This patch also disables autofill in search mode queries. Autofill was interfering with alias replacement. We were already half doing this (https://searchfox.org/mozilla-central/rev/26b13464c2beb26e0d864d561c30e817a85c348a/browser/components/urlbar/UrlbarController.jsm#391) but adding the searchMode check to UrlbarInput._maybeAutofillOnInput should resolve bug 1655473.
There's still one more bug I'm working through where the placeholder disappears after alias replacement. I though I'd get this out to start review regardless since we want to get the three patches discussed in Thursday's meeting out ASAP.
Comment 4•4 years ago
|
||
Backed out changeset 527908cfaa56 (bug 1647890) for Browser-chrome failures on browser/browser_searchModeIndicator.js. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=312553589&repo=autoland&lineNumber=12298
Push with failure:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=527908cfaa564c8075855b0d42aa2dad761d5444
Backout:
https://hg.mozilla.org/integration/autoland/rev/75f3e10ae0142458b515aa30f09edf28da984995
Assignee | ||
Updated•4 years ago
|
Comment 6•4 years ago
|
||
bugherder |
Comment 7•4 years ago
|
||
I verified this issue using 82.0a1 (2020-09-14) on macOS 10.13 and Windows 10 x64.
Adrian could you help me with Ubuntu verification? Here are the STR's:
A:
- Type @google. Note the text is highlighted in the Urlbar.
- Type a space. The blue Google search mode indicator should be inserted in the Urlbar and the text should be cleared.
B:
- Type @.
- Select one of the token alias engines from the list and press enter.
- The corresponding search mode indicator should be inserted.
C:
- Add a search shortcut Top Site to the new tab page.
- Select the search shortcut Top Site from the new tab page.
- The corresponding search mode indicator should be inserted.
- Clear search mode (press backspace or click the X button on the indicator)
- Open Top Sites in the Urlbar by focusing it with no query.
- Select the search shortcut Top Site from the Urlbar.
- The corresponding search mode indicator should be inserted. (edited)
Comment 8•4 years ago
|
||
Added verification on Ubuntu 20.04 with 82.0a1 2020-09-15. Summing up comment 7 and comment 8, marking this bug as verified excluding the scenario from bug 1665115.
Updated•3 years ago
|
Description
•