For dismissals of AMP suggestions, don't fall back to full keyword
Categories
(Firefox :: Address Bar, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox147 | --- | fixed |
People
(Reporter: adw, Assigned: adw)
References
(Regressed 1 open bug)
Details
(Whiteboard: [sng])
Attachments
(1 file)
Bug 2002383 added a hardcoded fallback to full keyword for Merino AMP suggestion dismissals. We decided that wasn't a good idea after all, so let's revert that part of the bug. See that bug for details.
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
D274079 made two changes:
- Look for
dismissal_keyin Merino suggestions - For AMP Merino suggestions, fall back to the full keyword as the dismissal
key ifdismissal_keyisn't defined
The main point of this patch is to revert the first change. This patch keeps the
second change since it might be useful in the future.
The only part of this patch that's concerned with reverting the first change is
the small chunk in AmpSuggestions that starts with the comment, "AMP
suggestions are dismissed by their full keyword".
The rest of the patch is some related cleanup and (hopefully) improvement that I
took this opportunity to do. Summary:
-
In
UrlbarProviderQuickSuggest.#makeResult()- Document the code better by
splitting it up into smaller chunks and documenting each chunk. -
Also in
UrlbarProviderQuickSuggest- For unmanaged Merino suggestions, set
result.payload.isSponsoredin#makeUnmanagedResult()rather than in
#makeResult(). That way, all the Merino-specific code is in one place, in
#makeUnmanagedResult(). -
In
AmpSuggestions.makeResult()- Stop modifying the passed-in suggestion
object and make it clearer that we're normalizing the Merino suggestion in
order to make it like Rust suggestions. -
Also in
AmpSuggestions.makeResult()- Pass the normalized Merino suggestion
to#replaceSuggestionTemplates(). That way,#replaceSuggestionTemplates()
doesn't need to assume that the passed-in suggestion is from Merino and
therefore uses snake_case. Or IOW all the Merino-specific code is now in one
place, inmakeResult().
Comment 3•2 months ago
|
||
| bugherder | ||
Updated•2 months ago
|
| Assignee | ||
Comment 4•2 months ago
|
||
(In reply to Drew Willcoxon :adw from comment #1)
- Look for
dismissal_keyin Merino suggestions- For AMP Merino suggestions, fall back to the full keyword as the dismissal
key ifdismissal_keyisn't definedThe main point of this patch is to revert the first change. This patch keeps the
second change since it might be useful in the future.
I got this backwards: The main point is to revert the second change, not the first. I updated the summary in phab but wanted to note it here too.
Description
•