Closed Bug 1799363 Opened 2 years ago Closed 2 years ago

Add weather suggestions to quick suggest

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

VERIFIED FIXED
109 Branch
Tracking Status
firefox108 --- verified
firefox109 --- verified

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

This adds a weather feature to quick suggest. It periodically fetches a weather
suggestion from Merino. UrlbarProviderQuickSuggest shows the suggestion when the
search string is empty ("zero prefix").

The implementation of the UrlbarResult returned by UrlbarProviderQuickSuggest is
only temporary. Mandy is working on the final UI in
SNT-323. Landing a temporary
implementation allows Mandy to base her patch on it and trigger real weather
suggestions from Merino to test her implementation against. It also lets people
on the team test weather suggestions without having to wait for the final UI to
land.

I added two prefs and one Nimbus variable to control the feature. It will
initially be rolled out in an experiment, so we need a Nimbus variable. In the
initial experiment, users will not be able to turn off the weather suggestion,
but they will be able in the future. So, right now there is no other UI related
to this feature, but in the future there will be.

  • weatherFeatureGate - Nimbus variable that controls the whole feature
  • browser.urlbar.weather.featureGate - Fallback pref for the Nimbus variable
  • browser.urlbar.suggest.weather - This is similar to the other browser.urlbar.suggest prefs. Right now there's no UI to allow the user to toggle this, but there probably will be in the future.

I set the fetch interval to 30 minutes. That seems reasonable considering that
the suggestion contains the current temperature and weather. Merino will set
caching headers appropriately so that Firefox won't actually make a new network
request if the previously fetched suggestion is new enough.

Depends on D161368

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/053963c15ffe Add weather suggestions to quick suggest. r=daisuke

Backed out for causing xpcshell failures

Flags: needinfo?(adw)
Flags: needinfo?(adw)
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/af45c2fbfbec Add weather suggestions to quick suggest. r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch

STR for QA:

This feature should be disabled by default, so we want to verify that weather suggestions are not fetched and do not appear. Ideally you could enable it and also verify that weather suggestions do appear when appropriate, but Merino doesn't currently return them, so that will have to wait.

To verify the feature is disabled by default:

  1. Open about:config
  2. Verify browser.urlbar.weather.featureGate is false
  3. Set browser.urlbar.loglevel to Info
  4. Restart Firefox
  5. Open the browser console and filter on "weather". Verify nothing is logged
  6. Click in the urlbar to open the panel. Verify a weather suggestion does not appear.
Flags: qe-verify+
Flags: in-testsuite+

Comment on attachment 9302218 [details]
Bug 1799363 - Add weather suggestions to quick suggest.

Beta/Release Uplift Approval Request

  • User impact if declined: The feature added by this bug is disabled by default, so there is no user impact. However, we want to foxfood it sooner than later.
  • 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: Please see comment 6
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This bug adds a new feature that is disabled by default. There are no user-facing changes. (The feature is behind a pref.)
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9302218 - Flags: approval-mozilla-beta?
QA Whiteboard: [qa-triaged]

I have verified the feature on the latest Firefox Nightly 109.0a1 (Build ID: 20221121153827) on Windows 10 x64, macOS 12.4, and Ubuntu 20.04 x64.

  • I verified that the browser.urlbar.weather.featureGate pref is set to false by default.
  • I verified that the Browser Console doesn't contain logs related to the feature.
  • I verified that there are no weather suggestions in the Address Bar panel when the feature is disabled.
  • Additionally, I verified that there are no weather suggestions in the Address Bar panel when the feature and Merino are enabled (expected behavior at this time as per comment 6).
Status: RESOLVED → VERIFIED
Flags: qe-verify+

Comment on attachment 9302218 [details]
Bug 1799363 - Add weather suggestions to quick suggest.

Approved for 108.0b5

Attachment #9302218 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I have verified the feature on the Firefox Beta 108.0b5 (Build ID: 20221122190120) on Windows 10 x64, macOS 12.4, and Ubuntu 20.04 x64.

  • I verified that the browser.urlbar.weather.featureGate pref is set to false by default.
  • I verified that the Browser Console doesn't contain logs related to the feature.
  • I verified that there are no weather suggestions in the Address Bar panel when the feature is disabled.
  • Additionally, I verified that there are no weather suggestions in the Address Bar panel when the feature and Merino are enabled (expected behavior at this time as per comment 6).
Blocks: 1811018
Blocks: 1808974
Blocks: 1815018
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: