Closed Bug 1995362 Opened 5 months ago Closed 5 months ago

Reconcile online Suggest with the new online-enabled pref

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

RESOLVED FIXED
146 Branch
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 QuickSuggest init that indicates whether online is available to the user, called (say) onlineAvailable. But that’s basically what the settingsUi pref is: It’ll be SETTINGS_UI.FULL if 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: Replace settingsUi with two new boolean prefs, showSettingsUi and onlineAvailable. We can defer that to later though. For now we can simply create onlineAvailable and make sure it’s set iff settingsUi is SETTINGS_UI.FULL.

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

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

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

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

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

Pushed by dwillcoxon@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8d325ea75a0d https://hg.mozilla.org/integration/autoland/rev/aeeb5c6ebe5e Part 1: Core changes: Reconcile online Suggest with the new online-enabled pref. r=daisuke,Standard8,urlbar-reviewers https://github.com/mozilla-firefox/firefox/commit/c646419334e3 https://hg.mozilla.org/integration/autoland/rev/aaa3bf4c53e5 Part 2: Make the contextual opt-in use the new online Suggest pref. r=daisuke,Standard8,urlbar-reviewers https://github.com/mozilla-firefox/firefox/commit/67a598e274b9 https://hg.mozilla.org/integration/autoland/rev/75a91c0c8cf5 Part 3: Record the new online Suggest pref in urlbar pref telemetry. r=daisuke,Standard8,urlbar-reviewers https://github.com/mozilla-firefox/firefox/commit/7a83369035cd https://hg.mozilla.org/integration/autoland/rev/cee7ccd2fe41 Part 4: Record the new online Suggest prefs in the AMP quicksuggest ping. r=daisuke,nanj,urlbar-reviewers https://github.com/mozilla-firefox/firefox/commit/eeec63cbd15f https://hg.mozilla.org/integration/autoland/rev/64d118c44868 Part 5: Update enterprise policies to use the new online Suggest pref. r=mkaply,Standard8
Blocks: 1996169
See Also: → 1996152
QA Whiteboard: [search] [qa-triage-done-c146/b145]
Depends on: 2014296
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: