Make the "Show less frequently" option of addon suggestions consistent with other suggestions
Categories
(Firefox :: Address Bar, defect)
Tracking
()
People
(Reporter: cmuntean, Assigned: adw)
References
Details
(Whiteboard: [sng])
Attachments
(2 files)
[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]:
- Open the Firefox with the profile from prerequisites.
- Type in the addressbar a keyword that would trigger an addon suggestion (eg: video down).
- Click the "Feedback" button of the addon suggestion.
- Click the "Show less frequently" option.
- Dismiss the addressbar.
- Type again the keyword from Step 3 (video down).
- 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.
Comment 1•2 months ago
|
||
Drew, any thoughts on this? Could you please link this bug if we have any meta or tracking issue?
| Assignee | ||
Comment 2•1 month ago
|
||
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.
| Assignee | ||
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 3•1 month ago
|
||
This essentially reverts bug 1836582.
Comment 5•1 month ago
|
||
| bugherder | ||
Updated•1 month ago
|
Comment 6•1 month ago
|
||
The patch landed in nightly and beta is affected.
:adw, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox148towontfix.
For more information, please visit BugBot documentation.
| Reporter | ||
Comment 7•1 month ago
|
||
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.
| Assignee | ||
Comment 8•1 month ago
|
||
Thanks Cosmin!
This can ride the trains along with the UI standardization fixes (bug 2010165), so I'll set the flags accordingly.
Description
•