arkenfox / user.js

Firefox privacy, security and anti-tracking: a comprehensive user.js template for configuration and hardening
MIT License
10.24k stars 519 forks source link

firefox suggest #1257

Closed Thorin-Oakenpants closed 2 years ago

Thorin-Oakenpants commented 3 years ago

moving to a separate topic for v92

fxbrit said

FIY: quicksuggest aka "Firefox Suggests"

finally the screenshot (Settings > Privacy & Security > Address Bar) :

screen

when the experiment is enabled "Address Bar" name changes to "Address Bar - Firefox Suggests".

Jee-Hex commented 3 years ago
  • browser.urlbar.groupLabels.enabled didn't do anything for me, although I've read online a few times that it is used to control firefox suggests. no idea.

Flipping this to false hides the "Firefox Suggest" label in the address bar in FF92.

https://www.ghacks.net/2021/09/09/how-to-disable-firefox-suggest/

silverwings15 commented 3 years ago
  • browser.urlbar.groupLabels.enabled didn't do anything for me, although I've read online a few times that it is used to control firefox suggests. no idea.

Flipping this to false hides the "Firefox Suggest" label in the address bar in FF92.

ghacks.net/2021/09/09/how-to-disable-firefox-suggest

right, and it requires a reset to take effect. as a FYI, you can also hide it via CSS

.urlbarView-row[label="Firefox Suggest"]::before{ display: none !important; }
.urlbarView-row[label="Firefox Suggest"]{ margin-top: 0 !important; }
Thorin-Oakenpants commented 3 years ago

browser.urlbar.quicksuggest.enabled controls wether the UI is shown or not (screenshot to follow). I think it works as a master switch for the whole feature but I haven't done any in depth testing.

So is this the master switch or not? Anyone? Feel free to look at the source, otherwise I'll see if I can get around to it in the next four weeks and then put out a v92 - TIA

edit: what I had as a working draft, last edited 10 days ago

user_pref("browser.urlbar.quicksuggest.enabled", true);

Thorin-Oakenpants commented 3 years ago

On the two checkboxes

user_pref("browser.urlbar.suggest.quicksuggest", false);  // <- top checkbox

This is enough AFAICT. This is the top checkbox, the sponsored child checkbox is shown as unchecked at runtime. The value in about config is simply it's state should you flip the parent on.

user_pref("browser.urlbar.suggest.quicksuggest.sponsored", false);
  // ^^ sub-checkbox (IF the parent checkbox is checked)

We could add the sponsored one as a pair

The sponsored checkbox one remembers it's state, but if the top one is unchecked (either manually or via user.js on startup), when you look at settings in runtime, both are unchecked

Thorin-Oakenpants commented 3 years ago

AFAICT ....

I don't really care about the last point, because we're turning off the two types at a lower level, which seems simplest and reliable, and AFAIK nothing can ever be sent until you are enrolled and opt-in - sorry, can't be fked trying to find the comment which quoted some doc/code

Thorin-Oakenpants commented 3 years ago

https://bugzilla.mozilla.org/show_bug.cgi?id=1729776#c3 explains what they flip/do

Thorin-Oakenpants commented 3 years ago

and https://old.reddit.com/r/firefox/comments/q4f92r/remain_calm_firefox_suggest_is_offline_by_default/

Jee-Hex commented 3 years ago

right, and it requires a reset to take effect. as a FYI, you can also hide it via CSS

I tested this on 94beta again and I don't think I need a restart to kill the label, at least on en-US builds.

it's important it is enabled so the type is show in the urlbar dropdown

The pics only showed segregation between live suggestions from search engines and (presumably) contextual suggestions from Firefox. What they didn't show is that other "suggestions" from Firefox (e.g. your own bookmarks, history, opened tabs, synced tabs etc...) will also be shown under the same label, so mozilla's product team were effectively rebranding their browser urlbar dropdown. And this user.js disables live search suggestions by default (in 0804?) anyway so IMO those pics do not tell the entire story.

Thorin-Oakenpants commented 3 years ago

The pics only showed

The first pic clearly shows a Firefox Suggest group label, the second image clearly shows a Sponsored label for eBay under the item listed in the Firefox Suggest group

I don't really care about if a restart is required or not, because the pref is useless for our purposes. If you want contextual (which is from a local list), then at least let that shit be labeled :)

Thorin-Oakenpants commented 3 years ago

sums it up nicely for now: https://old.reddit.com/r/firefox/comments/q5ipc5/firefox_suggest_gets_me_confused/hg5vk9n/

Looking at https://bugzilla.mozilla.org/show_bug.cgi?id=1729776#c3 .. it's not clear if users will get an onboarding dialog - I DIDN'T (I am en-US and region US), emphasis mine - but that's because no-one has been given "online" except in testing - and the patch and blogs explicitly say onboarding is for online, so that clears that up, phew

US region & en locales

The Firefox Suggest offline scenario should be enabled by default for users in the US region using en builds. Both sponsored and non-sponsored suggestions should be enabled. No Firefox Suggest onboarding dialog should appear


This is my issue, we can't set scenario (see OP) and I'm not 100% certain the user.js changes stick for the first run after an update. How often does browserglue run? Surely they have to respect users decisions (in my FF93 which is en-US and US region, they were both enabled after I updated, but once added to user.js they stick)

https://hg.mozilla.org/mozilla-central/rev/04a89fcd7400

With Nimbus, there were two essential mechanisms that restricted the scenario to the desired population: the browser.urlbar.quicksuggest.enabled pref, which is a global toggle for Firefox Suggest suggestions regardless of region and locale, and a Nimbus recipe that enabled the pref for US en-* users only.

We're opted out of experiments, so my only concern would be default update changes and runtime

Without Nimbus, we have only the browser.urlbar.quicksuggest.enabled pref. We can't rely on a server-side solution to target a specific population, so we need to do it in the client. This patch keeps the default false value of browser.urlbar.quicksuggest.enabled in firefox.js, and then it sets a new default-branch value for the pref for the US en-* population on app startup.

Anyone have anything else to offer? I don't think we can set the scenario, and setting quicksuggest.enabled will just get flipped at runtime as do the two in the user.js, except this must be a one off, see my comment about how it sticks for me

Thorin-Oakenpants commented 3 years ago

¯\_(ツ)_/¯

fxbrit commented 2 years ago

new UI from 94.0.2:

oof
Thorin-Oakenpants commented 2 years ago

is this from https://bugzilla.mozilla.org/show_bug.cgi?id=1735976 ?

fxbrit commented 2 years ago

yup. unless you want to block suggestions from firefox or enforce the dataCollection pref the current setup is good.

also, not very relevant for arkenfox but as a follow up to my previous comment, neither of the above prefs could prevent opt-in my later tests. I evened tried with browser.urlbar.quicksuggest.scenario = history but it got set back to offline, which means opted in without on boarding dialog being presented (see here for scenario-prefs combinations).

Thorin-Oakenpants commented 2 years ago

I'm happy with the prefs we set so far. I've monitored my test FFs to see what happens, and my main FF - e.g. i can't find it now, but I noticed one of my profiles has a bunch of files for categories of suggestions. So far nothing like that has been downloaded in my main arkenfoxed FF, and I haven't been prompted to opt in

I noticed that bugzilla a few days ago, and was going to address it in FF96 diffs, but happy to reopen this as a reminder

Thorin-Oakenpants commented 2 years ago

https://bugzilla.mozilla.org/show_bug.cgi?id=1735976 was added to beta, and will be handled in 94-95 diffs

qupig commented 6 months ago
browser.urlbar.suggest.quicksuggest.nonsponsored
browser.urlbar.suggest.quicksuggest.sponsored
browser.urlbar.quicksuggest.dataCollection.enabled
browser.urlbar.quicksuggest.enabled

For the record, these four prefs are all false by default in Firefox 115/126.0b4

qupig commented 6 months ago

https://github.com/arkenfox/user.js/blob/33a84b608c8a1f871c6ce9c4d2b932dc57078fae/user.js#L310-L315

[NOTE] Both must be true for the location bar to work

There seems to be something wrong with the description here, it doesn't cause the location bar not to work, not that scary, it's just limited to urlbar "suggest".

Thorin-Oakenpants commented 6 months ago

There seems to be something wrong with the description here

The "work" refers to "live search" - and AFAICT this is real time search results from the search engine - that's what "LIVE" search means.

I just tested. Both prefs off .. silence ... one pref on .. silence ... both prefs on live results per keystroke

qupig commented 6 months ago

I mean:

[NOTE] Both must be true for the location bar to work --> Tend to mislead and scary..
[NOTE] Both must be true for the location bar suggestions to work --> Better inheritance context
[NOTE] Both must be true for the location bar live search to work --> Better inheritance context

Please forgive my nitpicking.

Thorin-Oakenpants commented 6 months ago

so using some common sense ... we are setting at least one of the prefs to false .. so by your logic we are deliberately breaking the location bar so it can't be used