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

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P1
normal
RESOLVED FIXED
7 months ago
6 months ago

People

(Reporter: adw, Assigned: adw)

Tracking

(Blocks 1 bug)

unspecified
Firefox 67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

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 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.