Closed Bug 1841295 Opened 11 months ago Closed 10 months ago

Update PocketSuggestions for the final suggestions schema

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

VERIFIED FIXED
117 Branch
Tracking Status
firefox116 --- verified
firefox117 --- verified

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

Pocket suggestions are now in remote settings. The final schema is:

{
  url,
  title,
  description,
  lowConfidenceKeywords,
  highConfidenceKeywords,
}

Each suggestion has "low" and "high confidence" keywords. When a high confidence
keyword is matched, the suggestion should be shown as a top pick, and otherwise
it should be shown as a normal Suggest result. High confidence keywords must be
matched in full, but low confidence keywords can be matched with prefixes
starting at the first word.

The low confidence matching behavior is the same as addon suggestions, so I
factored out that function into a new helper defined on SuggestionsMap.

I added a full_keyword property to the suggestions. It's not used yet but
we'll use it when we implement the final UI, which needs to show the full
keyword.

Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eac3da0f3b6e
Update PocketSuggestions for the final suggestions schema and implement the desired matching behavior. r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch

STR for QA

  1. Set browser.urlbar.pocket.featureGate = true to enable Pocket suggestions and browser.urlbar.bestMatch.enabled = true to enable best match
  2. Type "breakfas" (no "t" at the end) and verify a Pocket suggestion does not appear
  3. Finish typing "breakfast" (with a "t" at the end) and verify a "Cat Cora" Pocket suggestion appears at the bottom of the urlbar panel. It should have a Pocket icon.
  4. Continue typing "breakfast casserole" and verify the suggestion remains in the panel
  5. Clear the input and type "breakfast paninis". The "Cat Cora" suggestion should appear after you finish typing "breakfast" and "breakfast ", as before. After that, no suggestion should appear until you fully type "breakfast paninis". A top pick suggestion should appear called "Your New Favorite Breakfast Sandwich is Anything but Basic"

Note: This patch does not implement the final Pocket suggestion UI, so it's expected that the suggestions may not appear quite like they should in the Figma. (Depends on whether other patches have landed at the time you test)

Flags: qe-verify+
Flags: in-testsuite+

Comment on attachment 9341950 [details]
Bug 1841295 - Update PocketSuggestions for the final suggestions schema and implement the desired matching behavior.

Beta/Release Uplift Approval Request

  • User impact if declined: This bug is necessary for the Pocket suggestions feature we intend to ship as an experiment in 116.
  • 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 4
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This only affects Pocket suggestions, which are not enabled by default. Has tests.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9341950 - Flags: approval-mozilla-beta?
QA Whiteboard: [qa-triaged]

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

  • I can confirm that there is no Pocket suggestion displayed when the typed string is not complete (“breakfas”);
  • The "Cat Cora" Pocket suggestion appears at the bottom of the Urlbar panel (Firefox Suggest section) after typing the complete string (“breakfast”);
  • The "Cat Cora" Pocket suggestion remains displayed when continuing typing another string (“breakfast casserole”);
  • The "Cat Cora" Pocket suggestion remains displayed when the prefix string is completely typed and a space is added after it (“breakfast “);
  • There are no Pocket suggestions displayed when "breakfast panini" is typed in the Address Bar;
  • The "Your New Favorite Breakfast Sandwich is Anything but Basic" Pocket suggestion is displayed in the Top Pick section when all the strings are completely typed (“breakfast paninis”).

Comment on attachment 9341950 [details]
Bug 1841295 - Update PocketSuggestions for the final suggestions schema and implement the desired matching behavior.

Approved for 116.0b2

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

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

  • I can confirm that there is no Pocket suggestion displayed when the typed string is not complete (“breakfas”);
  • The "Cat Cora" Pocket suggestion appears at the bottom of the Urlbar panel (Firefox Suggest section) after typing the complete string (“breakfast”);
  • The "Cat Cora" Pocket suggestion remains displayed when continuing typing another string (“breakfast casserole”);
  • The "Cat Cora" Pocket suggestion remains displayed when the prefix string is completely typed and a space is added after it (“breakfast “);
  • There are no Pocket suggestions displayed when "breakfast panini" is typed in the Address Bar;
  • The "Your New Favorite Breakfast Sandwich is Anything but Basic" Pocket suggestion is displayed in the Top Pick section when all the strings are completely typed (“breakfast paninis”).
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Blocks: 1844266
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: