Reconcile online Suggest with the new online-enabled pref
Categories
(Firefox :: Address Bar, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox146 | --- | fixed |
People
(Reporter: adw, Assigned: adw)
References
Details
(Whiteboard: [sng])
Attachments
(5 files)
We’ll need to hook up online to the new pref.
We will need to add logic that does not exist today to properly handle region-locales where offline Suggest is enabled but online should not be available. That’s because the old online pref defaulted to false while the new one defaults to true. So for region-locales where offline is enabled but online is not available, online in the new world would be enabled in the absence of extra logic.
We could instead default the new pref to false in firefox.js and then, in QuickSuggest init, set it to true on the default branch for region-locales where online is available (US only right now). I’d much prefer to do that because we wouldn’t need to make nearly as many changes, but then people outside the US wouldn’t be able to go into about:config and preemptively set the pref to false with a single click, which is a product requirement.
We could add the new logic directly to SuggestBackendMerino, which is where the online Merino fetch is made: If the user’s region isn’t US, don’t actually do the fetch. However, I’d prefer to keep all such logic in QuickSuggest init. I do not want it spread throughout the code.
So I’m thinking we’ll actually need two online prefs:
- The one we added in the 144 dot release, which only records whether the user opted out
- A new one that is set in
QuickSuggestinit that indicates whether online is available to the user, called (say)onlineAvailable. But that’s basically what thesettingsUipref is: It’ll beSETTINGS_UI.FULLif online is available. So we could just use that. I don’t like that idea though because whether or not online is available is pretty important, and keeping track of that in a thing called “settingsUi” would be hiding it. Instead I’d like to reverse it: ReplacesettingsUiwith two new boolean prefs,showSettingsUiandonlineAvailable. We can defer that to later though. For now we can simply createonlineAvailableand make sure it’s set iffsettingsUiisSETTINGS_UI.FULL.
Updated•5 months ago
|
| Assignee | ||
Comment 1•5 months ago
|
||
This is part 1 of 5 and is the core set of changes for the new online Suggest
pref. There are actually two prefs:
browser.urlbar.quicksuggest.online.available
browser.urlbar.quicksuggest.online.enabled
Once all the patches in this stack land, the old pref,
browser.urlbar.quicksuggest.dataCollection.enabled, won't be used at all
anymore (aside from a few isolated cases we can handle in separate bugs), which
means people who are currently opted in to online Suggest will stop getting
online Suggest until we ship new online (OHTTP) to them and they accept the
Terms of Use. This revision (and patch stack) keeps the pref in firefox.js for
now however because it's used by Nimbus targeting filters that are currently
used by some live experiments.
Please see the bug for details.
Depends on D269266
| Assignee | ||
Comment 2•5 months ago
|
||
This makes the contextual opt-in use the new online Suggest pref. It's not clear
whether we'll use the contextual opt-in again, but it is clear that old online
Suggest and the dataCollection.enabled pref will not be supported anymore.
Depends on D269320
| Assignee | ||
Comment 3•5 months ago
|
||
This records the new online prefs in urlbar pref telemetry. I added some code
for treating the quickSuggestOnlineAvailable Nimbus variable the same as its
fallback pref for the purpose of this telemetry. That way, when we use Nimbus to
enable new online Suggest for people, we'll record the value that makes sense
for the pref even though technically the pref itself will not be set.
Why record the online.available pref/variable in the first place? Because most
regions will not have online Suggest available at all, but all users will have
the online.enabled pref set to true by default (see bug 1995362). So recording
only the enabled pref wouldn't tell us the whole story.
Depends on D269321
| Assignee | ||
Comment 4•5 months ago
|
||
This replaces the improve_suggest_experience bool recorded in the AMP ping
with online_available_and_enabled. We can't use simply online.enabled as the
value because that pref will be true by default for users in all regions,
including regions where online Suggest is not available.
Depends on D269322
| Assignee | ||
Comment 5•5 months ago
|
||
Online Firefox Suggest is changing in 146: The old opt-in experience is being
replaced with a new opt-out experience that uses OHTTP to protect user privacy.
As part of that, we are replacing the quicksuggest.dataCollection.enabled pref
with a new quicksuggest.online.enabled pref. The online checkbox in the
settings UI will now correspond to this new pref.
In case it matters, the old pref defaulted to false (since old online was
opt-in), and the new pref defaults to true (since new online is opt-out).
Depends on D269323
Comment 7•5 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/aeeb5c6ebe5e
https://hg.mozilla.org/mozilla-central/rev/aaa3bf4c53e5
https://hg.mozilla.org/mozilla-central/rev/75a91c0c8cf5
https://hg.mozilla.org/mozilla-central/rev/cee7ccd2fe41
https://hg.mozilla.org/mozilla-central/rev/64d118c44868
Updated•5 months ago
|
Description
•