Closed Bug 1729776 Opened 3 years ago Closed 3 years ago

Make the Firefox Suggest offline scenario default enabled for en-* users

Categories

(Firefox :: Address Bar, task, P1)

task
Points:
2

Tracking

()

VERIFIED FIXED
94 Branch
Iteration:
94.1 - Sep 6 - Sept 19
Tracking Status
firefox92 --- verified
firefox93 --- verified
firefox94 --- verified

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(2 files)

The offline scenario should be enabled by default for en-* users.

Don't forget to set the default quickSuggestScenario and quicksuggest.scenario to "offline".

Summary: Make the offline scenario default enabled for Firefox Suggest → Make the Firefox Suggest offline scenario default enabled for en-* users

[Tracking Requested - why for this release]: This is required for the Firefox Suggest rollout on a 92 dot release.

Enable the Firefox Suggest "offline" scenario by default for users in en-*
locales.

Previously we relied on Nimbus to enable the offline scenario, and the goal here
is to make it permanent for all en-* users so that we don't need Nimbus for it
anymore.

With Nimbus, there were two essential mechanisms that restricted the scenario to
en-* users only: the browser.urlbar.quicksuggest.enabled pref, which is a
global toggle for Firefox Suggest suggestions regardless of locale, and a Nimbus
recipe that enabled the pref for en-* users only. These two mechanisms combined
let us roll out the scenario to en-* users.

Without Nimbus, we have only the browser.urlbar.quicksuggest.enabled pref. We
can't rely on a server-side solution to target en-* users, so we need to do it
in the client. This patch is keep the default false value of
browser.urlbar.quicksuggest.enabled in firefox.js, and then it sets a new
default-branch value for the pref in en-* locales using a UI migration for
existing profiles and a startup idle task for new profiles.

There's actually a set of prefs related to the offline scenario that need to be
set, not only browser.urlbar.quicksuggest.enabled.

Depends on D124943

STR for QA

This bug depends on the user's home region (i.e., where they are physically located) and their build's locale. Do you have a usual way to test different regions? If you don't, then you can run this in the browser console to set your home region to US:

(function(){
  let home = "US";
  Cu.import("resource://gre/modules/Region.jsm");
  Region._setHomeRegion(home, false);
  console.log(`Home region is now:`, Region.home);
})();

You'll need to restart Firefox after that.

Replace "US" in the snippet with another region to test non-US regions if necessary. For example "GB" for the UK, "MX" for Mexico, etc.

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.

  1. New profile
  2. Open about:config and verify the following prefs are set. They should not be bold, i.e., they should be default values.
browser.urlbar.quicksuggest.enabled: true
browser.urlbar.quicksuggest.scenario: "offline"
browser.urlbar.quicksuggest.shouldShowOnboardingDialog: false
browser.urlbar.suggest.quicksuggest: true
browser.urlbar.suggest.quicksuggest.sponsored: true

  1. Open about:preferences#privacy, scroll down to the address bar section, and verify that the two Firefox Suggest checkboxes are both enabled and checked:
  • Personalized search suggestions
  • Show sponsored suggestions

If you are testing a build with bug 1729587 also fixed, then these checkbox labels will instead be:

  • Contextual suggestions
  • Include occasional sponsored suggestions
  1. Type "ebay" in the address bar and verify that an eBay Sponsored suggestion appears last in the panel
  2. Type "wikipedia" and verify that a Wikipedia non-sponsored suggestion appears last in the panel
  3. Please restart the app and repeat steps 2-5 to make sure nothing changes after restart

Non-US region & non-en locales

For users who are not in the US region or who are not using en builds, the Firefox Suggest offline scenario should not be enabled. Sponsored and non-sponsored suggestions should not appear.

For example, the scenario should not be enabled in these cases:

  • You are in the US region but are using an es-MX build
  • You are in the MX region but are using an en-US build

STR:

  1. New profile
  2. Open about:config and verify the following prefs are set. They should not be bold, i.e., they should be default values.
browser.urlbar.quicksuggest.enabled: false
browser.urlbar.quicksuggest.scenario: "history"
browser.urlbar.quicksuggest.shouldShowOnboardingDialog: true
browser.urlbar.suggest.quicksuggest: false
browser.urlbar.suggest.quicksuggest.sponsored: false
  1. Open about:preferences#privacy, scroll down to the address bar section, and verify that the two Firefox Suggest checkboxes do not appear
  2. Type "ebay" in the address bar and verify that no eBay Sponsored suggestion appears in the panel
  3. Type "wikipedia" and verify that no Wikipedia non-sponsored suggestion appears
  4. Please restart the app and repeat steps 2-5 to make sure nothing changes after restart
Flags: qe-verify+
Flags: in-testsuite+
Attachment #9240207 - Attachment description: Bug 1729776 - Enable the Firefox Suggest "offline" scenario by default for users in en-* locales. → Bug 1729776 - Enable the Firefox Suggest "offline" scenario by default for users in the US region with en-* locales.
Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/04a89fcd7400
Enable the Firefox Suggest "offline" scenario by default for users in the US region with en-* locales. r=mythmon,daleharvey,mak
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

Approval Request Comment
[Feature/Bug causing the regression]: Firefox Suggest offline/online rollouts
[User impact if declined]: Needed for important rollouts on 93 and 92
[Is this code covered by automated tests?]: Yes
[Has the fix been verified in Nightly?]: No
[Needs manual test from QE? If yes, steps to reproduce]: Yes, please see comment 3
[List of other uplifts needed for the feature/fix]: See uplift coordination spreadsheet
[Is the change risky?]: Moderate risk relative to other uplifts needed in the patch stack
[Why is the change risky/not risky?]: This patch enables Firefox Suggest suggestions in the address bar by default for users in the US using en locales. It's a new, large, and important feature. The patch adds a hook on app startup that sets some preferences on the default preferences branch. We have the ability to roll this back if necessary via Nimbus.
[String changes made/needed]:

Attachment #9240772 - Flags: approval-mozilla-beta?

Comment on attachment 9240772 [details] [diff] [review]
93/mozilla-beta & 92/mozilla-release patch

Beta/Release Uplift Approval Request

  • User impact if declined: Needed for important rollouts on 93 and 92
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Yes, please see comment 3
  • List of other uplifts needed: None
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): This patch enables Firefox Suggest suggestions in the address bar by default for users in the US using en locales. It's a new, large, and important feature. The patch adds a hook on app startup that sets some preferences on the default preferences branch. We have the ability to roll this back if necessary via Nimbus.
  • String changes made/needed:
Attachment #9240772 - Attachment description: 93 patch → 93/mozilla-beta & 92/mozilla-release patch
Attachment #9240772 - Flags: approval-mozilla-release?

Comment on attachment 9240772 [details] [diff] [review]
93/mozilla-beta & 92/mozilla-release patch

Needed for experiments targeting Fx92. Approved for 93.0b4.

Attachment #9240772 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]
  • I have verified this issue using the latest Nightly 94.0a1 (Build ID: 20210912213037) and Beta 93.0b4 (Build ID: 20210912185727) builds on Windows 10 x64, macOS 11.5.2, and Linux Mint 20.

en-US build and US region:

  • I have verified that the preferences are set accordingly as mentioned in comment 3.
  • I have verified that the "about:preferences#privacy" -> Address bar section displays 2 Firefox Suggest checkboxes (both enabled by default).
  • I have verified that the sponsored and non-sponsored suggestions (ebay&wikipedia) are displayed last in the panel.
  • I have verified that the behavior described above remains the same after restarting the browser.

non-en build and non-US region (ro, fr, es-ES):

  • I have verified that the preferences are set accordingly as mentioned in comment 3.
  • I have verified that the "about:preferences#privacy" -> Address bar section does not display 2 Firefox Suggest checkboxes.
  • I have verified that the sponsored and non-sponsored suggestions (ebay&wikipedia) are not displayed.
  • I have verified that the behavior described above remains the same after restarting the browser.

@Drew, we usually use a VPN client in order to simulate different regions. Thanks for the snippet, its a great alternative and we'll definitely consider it when it comes to testing using different regions.

Status: RESOLVED → VERIFIED
Depends on: 1730596
Blocks: 1730618

Comment on attachment 9240772 [details] [diff] [review]
93/mozilla-beta & 92/mozilla-release patch

Approved for 92.0.1.

Attachment #9240772 - Flags: approval-mozilla-release? → approval-mozilla-release+

en-US build and US region:

  • I have verified that the preferences are set accordingly as mentioned in comment 3.
  • I have verified that the "about:preferences#privacy" -> Address bar section displays 2 Firefox Suggest checkboxes (both enabled by default).
  • I have verified that the sponsored and non-sponsored suggestions (ebay&wikipedia) are displayed last in the panel.
  • I have verified that the behavior described above remains the same after restarting the browser.

en-US build and non-US region (ro):

  • I have verified that the preferences are set accordingly as mentioned in comment 3.
  • I have verified that the "about:preferences#privacy" -> Address bar section does not display 2 Firefox Suggest checkboxes.
  • I have verified that the sponsored and non-sponsored suggestions (ebay&wikipedia) are not displayed.
  • I have verified that the behavior described above remains the same after restarting the browser.
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: