Rename UrlbarMatch to UrlbarResult

RESOLVED FIXED in Firefox 66

Status

()

enhancement
P3
normal
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: mak, Assigned: dao)

Tracking

(Blocks 1 bug)

unspecified
Firefox 66
Points:
---

Firefox Tracking Flags

(firefox66 fixed)

Details

(Whiteboard: [fxsearch])

Attachments

(1 attachment)

(Reporter)

Description

5 months ago
There are a few entities names in the code that are not particularly good atm, mostly because the yare not consistent.

1. match VS result: the model uses match/matches, the view/controller use result/results. We should pick one. No particular preference here, I picked matches in the model mostly because one may think to "result" as the collection of all the matches, but in the end it doesn't really matter, consistency wins.

2. openpage VS tab: tab is imo clearer, but there's a couple exceptions where we can't change openpage, like the suggest.openpage pref.

3. addToUrlbarHistory is a poor choice, because the function just marks the next visit as typed.

4. UrlbarUtils may probably be renamed to UrlbarCommon considered it's not just a collection of utils, it also has common classes and constants. This is not particularly important anyway.
(Assignee)

Comment 1

4 months ago

I'm going to post a patch to rename UrlbarMatch to UrlbarResult. I think we should probably rename MATCH_SOURCE to RESULT_SOURCE too, although I'd do that in a followup. Not sure about MATCH_TYPE, I think we could keep that.

(In reply to Marco Bonardo [::mak] from comment #0)

  1. openpage VS tab: tab is imo clearer, but there's a couple exceptions
    where we can't change openpage, like the suggest.openpage pref.

  2. addToUrlbarHistory is a poor choice, because the function just marks the
    next visit as typed.

  3. UrlbarUtils may probably be renamed to UrlbarCommon considered it's not
    just a collection of utils, it also has common classes and constants. This
    is not particularly important anyway.

We should get separate bugs filed on these.

Assignee: nobody → dao+bmo
Summary: Name entities more consistently → Rename UrlbarMatch to UrlbarResult
(Reporter)

Comment 2

4 months ago

(In reply to Dão Gottwald [::dao] from comment #1)

I'm going to post a patch to rename UrlbarMatch to UrlbarResult. I think we should probably rename MATCH_SOURCE to RESULT_SOURCE too, although I'd do that in a followup. Not sure about MATCH_TYPE, I think we could keep that.

I think doing a whole s/match/result would be better, in general. Retaining some pieces referring to match may be confusing. But can also be done in steps. Also, remember to update the AddressBar.rst documentation.

(Assignee)

Updated

4 months ago
Blocks: 1522425
(Assignee)

Updated

4 months ago
Blocks: 1522426

Comment 4

4 months ago
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0aa259de1b77
Rename UrlbarMatch to UrlbarResult. r=mak

Comment 5

4 months ago
bugherder
Status: NEW → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
(Assignee)

Updated

4 months ago
Blocks: 1522807
(Assignee)

Updated

4 months ago
No longer blocks: 1522425, 1522807, 1522426
See Also: → 1522425, 1522807, 1522426
You need to log in before you can comment on or make changes to this bug.