Rename UrlbarMatch to UrlbarResult
Categories
(Firefox :: Address Bar, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: mak, Assigned: dao)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxsearch])
Attachments
(1 file)
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•5 years 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)
openpage VS tab: tab is imo clearer, but there's a couple exceptions
where we can't change openpage, like the suggest.openpage pref.addToUrlbarHistory is a poor choice, because the function just marks the
next visit as typed.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.
Reporter | ||
Comment 2•5 years 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 | ||
Comment 3•5 years ago
|
||
Pushed by dgottwald@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0aa259de1b77 Rename UrlbarMatch to UrlbarResult. r=mak
Comment 5•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Description
•