Closed Bug 1831657 Opened 2 years ago Closed 2 years ago

Implement the "Show less frequently" weather suggestion command

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

VERIFIED FIXED
115 Branch
Tracking Status
firefox114 + verified
firefox115 --- verified

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

No description provided.

This increments the minimum keyword length when the user clicks the "Show less
frequently" command for the weather suggestion. It adds a pref to keep track of
the current min length. If the pref is zero, we use the min length in Nimbus or
remote settings.

There is a limit to the number of times "Show less frequently" can be clicked.
This patch calls it the cap. Once the cap is reached, the min length can't be
incremented any more and the command is not shown in the menu again. The cap can
be set in Nimbus and remote settings.

This patch also modifies UrlbarPrefs by making it possible to remove observers.
Weather needs to listen for changes to the weather.minKeywordLength pref,
and when the weather feature is disabled, it needs to stop listening.

Depends on D175827

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3c1a0a44f823 Implement the "Show less frequently" weather suggestion command. r=daisuke

STR for QA:

  1. Enable the weather suggestion: browser.urlbar.weather.featureGate = true
  2. If you are testing a build with bug 1831657 fixed, also set browser.urlbar.weather.ignoreVPN = true to make it easier to test on a VPN
  3. Type 3 characters of a weather keyword to trigger the suggestion, e.g. wea (If the suggestion appears on zero prefix and not when you type wea, you'll need to wait until Firefox syncs remote settings; see bug 1828796 comment 6 for details)
  4. In the suggestion, click the Feedback menu > Show less frequently
  5. Verify the "Thanks for your feedback message" appeared in the suggestion
  6. Close the urlbar panel
  7. Reopen the panel or clear the input and type wea again. If you reopen it without changing the input, the weather suggestion will likely appear briefly and then be removed. That's not ideal but it's expected.
  8. Verify the suggestion does not appear
  9. Type one more character so that your search string is weat
  10. Verify the suggestion appears
  11. Click "Show less frequently" again
  12. Reopen the panel or clear the input and type weat again
  13. Verify the suggestion does not appear
  14. Type one more character so that your search string is weath
  15. Verify the suggestion appears
  16. Click "Show less frequently" again
  17. Reopen the panel or clear the input and type weath again
  18. Verify the suggestion does not appear
  19. Type one more character so that your search string is weathe
  20. Verify the suggestion appears
  21. Open the Feedback menu and verify "Show less frequently" no longer appears
Flags: qe-verify+
Flags: in-testsuite+

Comment on attachment 9331931 [details]
Bug 1831657 - Implement the "Show less frequently" weather suggestion command.

Beta/Release Uplift Approval Request

  • User impact if declined: This bug is necessary for the Firefox Suggest weather suggestion feature we intend to ship in 114.
  • 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 3
  • List of other uplifts needed: Bug 1831656 and bug 1828796 must be uplifted first
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small patch that only affects the Firefox Suggest weather feature. Has automated tests.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9331931 - Flags: approval-mozilla-beta?

[Tracking Requested - why for this release]: This bug is necessary for the Firefox Suggest weather suggestion feature we intend to ship in 114.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

Comment on attachment 9331931 [details]
Bug 1831657 - Implement the "Show less frequently" weather suggestion command.

Approved for 114 beta 2, thanks.

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

I have verified this issue on the latest Firefox Nightly 115.0a1 (Build ID: 20230508214159), on Windows 10 x64, macOS 12.6.1, and Ubuntu 20.04 x64.

  • Clicking the "Show less frequently" option for the weather suggestion increments the minimum keyword length the user has to type in order to trigger the suggestion.
  • After clicking it 3 times, the "Show less frequently" option from the Feedback menu is no longer displayed.

I have verified this issue on the latest Firefox Beta 114.0b2 (Build ID: 20230509180058), on Windows 10 x64, macOS 12.6.1, and Ubuntu 20.04 x64.

  • Clicking the "Show less frequently" option for the weather suggestion increments the minimum keyword length the user has to type in order to trigger the suggestion.
  • After clicking it 3 times, the "Show less frequently" option from the Feedback menu is no longer displayed.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: