Closed Bug 2011853 Opened 2 months ago Closed 1 month ago

Make the "Show less frequently" option of addon suggestions consistent with other suggestions

Categories

(Firefox :: Address Bar, defect)

Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
149 Branch
Tracking Status
firefox147 --- wontfix
firefox148 --- wontfix
firefox149 --- verified

People

(Reporter: cmuntean, Assigned: adw)

References

Details

(Whiteboard: [sng])

Attachments

(2 files)

Attached video addon suggestions.mp4

[Affected versions]:

  • Firefox Release 147.0.1 (Build ID: 20260116091309)
  • Firefox Beta 148.0b4 (Build ID: 20260119090523)
  • Firefox Nightly 149.0a1 (Build ID: 20260121163431)

[Affected Platforms]:

  • Windows 10 x64
  • MacOS 14.7.1
  • Ubuntu 24.04

[Prerequisites]:

  • Have a Firefox Release 147.0.1 en-US build installed/extracted.
  • Have the following prefs set:
  • browser.search.region = US

[Steps to reproduce]:

  1. Open the Firefox with the profile from prerequisites.
  2. Type in the addressbar a keyword that would trigger an addon suggestion (eg: video down).
  3. Click the "Feedback" button of the addon suggestion.
  4. Click the "Show less frequently" option.
  5. Dismiss the addressbar.
  6. Type again the keyword from Step 3 (video down).
  7. Observe the behavior.

[Expected result]:

  • The addon suggestion is no longer triggered.

[Actual result]:

  • The addon suggestion is still triggered.

[Notes]:

  • Attached a screen recording of the issue.

Drew, any thoughts on this? Could you please link this bug if we have any meta or tracking issue?

Flags: needinfo?(adw)

Thanks Cosmin, this is currently working as intended, but it's bad and confusing so I think we should change it. It's also inconsistent since addon suggestions are the only suggestions that work like this. IIRC they were one of the first non-AMP/Wikipedia suggestions we implemented.

This logic was updated in bug 1836582, and the relevant code is here: https://searchfox.org/firefox-main/rev/a1a18390a28e813dbd98189ee23e7ee4447541b0/browser/components/urlbar/private/AddonSuggestions.sys.mjs#56-68

I'll copy-paste the the code comment since it explains how it works:

    // If the user hasn't clicked the "Show less frequently" command, the
    // suggestion can be shown. Otherwise, the suggestion can be shown if the
    // user typed more than one word with at least `showLessFrequentlyCount`
    // characters after the first word, including spaces.

showLessFrequentlyCount starts at zero and is incremented each time you click "Show less frequently", and it can only be incremented three times before the menu item goes away.

The "including spaces" and "at least" parts of the logic make it even worse.

I'll morph this bug to be about making addon suggestions consistent with other suggestion types: keep an addons.minKeywordLength pref that's set every time the user clicks "Show less frequently", and don't show suggestions when the query length is less than that. addons.minKeywordLength actually exists already but we don't seem to use it. Maybe it was left over from fixing bug 1836582 and I forgot to remove it.

We'll need to be careful about initializing addons.minKeywordLength for users who have non-zero addons.showLessFrequentlyCount. We don't want people to end up stuck at a max showLessFrequentlyCount and zero minKeywordLength since that will make it impossible for them to set the minKeywordLength. Maybe do a UI/pref migration and set minKeywordLength to like 10 or something if showLessFrequentlyCount is > 0? Or at the least clear the user value of showLessFrequentlyCount so they start over. IMO it's not a huge deal though because users can always dismiss addon suggestions entirely if they want.

Depends on: 1836582
Flags: needinfo?(adw)
Summary: The "Show less frequently" option of the addon suggestions is not working → Make the "Show less frequently" option of addon suggestions consistent with other suggestions
Assignee: nobody → adw
Status: NEW → ASSIGNED
Whiteboard: [sng]
Pushed by dwillcoxon@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/387cbab152f5 https://hg.mozilla.org/integration/autoland/rev/4112b6486dc2 Make the "Show less frequently" option of addon suggestions consistent with other suggestions. r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
QA Whiteboard: [search] [qa-triage-done-c149/b148]

The patch landed in nightly and beta is affected.
:adw, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(adw)

Thank you, Drew, for all the details and for looking at the issue.

I have verified this fix on the latest Nightly 149.0a1 (Build ID: 20260204094524) on Windows 10, macOS 26.2 and Ubuntu 24.0

  • The "Show less frequently" option works like the other suggestions.
Status: RESOLVED → VERIFIED

Thanks Cosmin!

This can ride the trains along with the UI standardization fixes (bug 2010165), so I'll set the flags accordingly.

See Also: → 2010168
See Also: → 2003197
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: