Closed Bug 1878519 Opened 2 years ago Closed 2 years ago

Prefer recent searches over trending

Categories

(Firefox :: Address Bar, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox124 --- fixed
firefox125 --- fixed

People

(Reporter: daleharvey, Assigned: daleharvey)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sng])

Attachments

(1 file)

STR:

browser.urlbar.trending.featureGate = true
browser.urlbar.trending.requireSearchMode = false
browser.urlbar.trending.showPrefs = true
browser.urlbar.recentsearches.featureGate = true

And the engine needs to recognise you are in an area they provide trneding suggestions for, North America is usually a good bet.

When the browser opens with a fresh profile we should see the top sites first followed by the rest of the area filled in with trending suggestions. As you do a search the next time the urlbar opens you should see the top sites, then the recent search, then the trending suggestions. As you do more searches they should knock off the trending suggestions until there is only top sites and recent searches

Hey Marco

I was wondering if you had a good pointer here, we get pretty close behaviour if we give RECENT_SEARCH group a bigger flex than the REMOTE_SUGGESTIONS (@ https://searchfox.org/mozilla-central/source/browser/components/urlbar/UrlbarPrefs.sys.mjs#608), however it doesnt behave exactly as above, there usually ends up being at least one trending shown regardless of how many recent searches there are.

Adding some behaviour on top of the existing flex grouping is quite tricky so wondering with your experience around here if you can think the cleanest way to implement this.

Cheers

Flags: needinfo?(mak)
Whiteboard: [sng]

(In reply to Dale Harvey (:daleharvey) from comment #1)

Adding some behaviour on top of the existing flex grouping is quite tricky so wondering with your experience around here if you can think the cleanest way to implement this.

I must point out Drew implemented most of the flexibility here, and may have better ideas than me.
I wonder if you could create another sub-group for RECENT_SEARCH and REMOTE_SUGGESTION, where RECENT_SEARCH has flex: Infinity, though I don't remember if a group itself can have a flex value, as you'd want FORM_HISTORY{flex:2} and YOUR_NEW_GROUP{flex: 4}

In practice you'd end up with:
FORM_HISTORY { flex 2 }
GROUP {
flex: 4,
RECENT_SEARCH { flex Infinity }
REMOTE_SUGGESTION { flex 1 }
}

it's likely this requires code changes to work...

Flags: needinfo?(mak)
Pushed by dharvey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/19ca51da640d Prefer recent searches over trending. r=mak
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch

Comment on attachment 9380664 [details]
Bug 1878519 - Prefer recent searches over trending. r=mak

Beta/Release Uplift Approval Request

  • User impact if declined: Unable to run experiment for release
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: QA has test plan awaiting landing on beta
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): One line minor change
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9380664 - Flags: approval-mozilla-beta?

Comment on attachment 9380664 [details]
Bug 1878519 - Prefer recent searches over trending. r=mak

Approved for 124.0b3

Attachment #9380664 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: