Include address bar searches in local search history

NEW
Unassigned

Status

()

Firefox
Search
P4
enhancement
Rank:
45
3 years ago
2 years ago

People

(Reporter: MattN, Unassigned, Mentored)

Tracking

unspecified
Points:
---
Bug Flags:
firefox-backlog +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ui][fxsearch])

Searches from the address bar should be included in form history for the field "searchbar-history" for parity with the other search boxes (e.g. searchbox, about:home, about:newtab).

Examples:
* engine alias searches
* bookmark keyword searches
* plain search terms in the address bar that we ended up searching for

Perhaps all search entry points should get this? e.g. context menu, command line, etc.?
Flags: firefox-backlog?
Flags: firefox-backlog? → firefox-backlog+

Comment 1

3 years ago
We'll probably need some processing, for example in the address bar you could search for "?mozilla" and this results in a search for the "mozilla" terms (which is what we should have in history).
The code that does this for the search bar is here:

https://hg.mozilla.org/mozilla-central/annotate/d92db71d4e67/browser/components/search/content/search.xml#l497

I think we just need to copy that code to somewhere where we currently detect that we're doing keyword searches. I think there are two options:

https://hg.mozilla.org/mozilla-central/annotate/d92db71d4e67/browser/components/nsBrowserGlue.js#l355
https://hg.mozilla.org/mozilla-central/annotate/d92db71d4e67/browser/base/content/browser.js#l728

This should help avoid the issue from comment 1.

I'll need to think about which spot is best. If anyone is interested in picking this up, please needinfo me and I can look into it with you.
Mentor: gavin.sharp@gmail.com
Priority: -- → P4
Whiteboard: [fxsearch][searchui]

Updated

3 years ago
Rank: 45
Whiteboard: [fxsearch][searchui] → [ui][fxsearch]
You need to log in before you can comment on or make changes to this bug.