URL results should use their domain names as their titles when they don't otherwise have titles
Categories
(Firefox :: Address Bar, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: adw, Assigned: adw)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
You can see this in the awesomebar by opening the bookmark library and adding a new bookmark that only has a URL, no title, and then typing the start of the URL in the input. We show only the domain as the title, not the full URL. Quantumbar should behave the same way.
If I'm not mistaken, this is a bug against the model since the view simply shows result.title as each result's title, and the title is generated in the model (UrlbarProviderUnifiedComplete).
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
There are a few potential places to do this:
(1) UrlbarProviderUnifiedComplete, when it creates results
(2) UrlbarResult.payloadAndSimpleHighlights(), which UrlbarProviderUnifiedComplete calls when it creates results (and presumably other providers would call it, too)
(3) UrlbarResult._titleAndHighlights(), when it figures out what to return as the title
It's hard to do it in (3) because in that location, we don't know the user's search string, so we don't know what to highlight. (1) is possible, but it would probably be nice for other providers and all result types to benefit from this? So I chose (2), and also because UrlbarResult.payloadAndSimpleHighlights() is just an easy place to do it since UrlbarProviderUnifiedComplete calls it for each result it creates.
The actual code to get the domain is copied from autocomplete.xml more or less.
Comment 3•6 years ago
|
||
bugherder |
Description
•