Closed Bug 1524702 Opened 6 years ago Closed 6 years ago

URL results should use their domain names as their titles when they don't otherwise have titles

Categories

(Firefox :: Address Bar, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: adw, Assigned: adw)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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).

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.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9e5d27526a36 Make URL results use their domain names as their titles when they don't otherwise have titles. r=mak
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: