Closed Bug 1852300 Opened 1 year ago Closed 1 year ago

Address Bar result menu glitches after an Add-on recommendation is dismissed

Categories

(Firefox :: Address Bar, defect, P1)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
119 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- unaffected
firefox117 --- unaffected
firefox118 --- verified
firefox119 --- verified

People

(Reporter: oardelean, Assigned: adw)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached video repro

Notes

  • Screencast of the issue attached;

Found in

  • Nightly 119.0a1;

Affected versions

  • Nightly 119.0a1;

Tested platforms

  • macOS 12;
  • Windows 10;
  • Ubuntu 22;

Affected platforms

  • macOS 12;
  • Windows 10;
  • Ubuntu 22;

Unaffected platforms

  • N/A;

Preconditions

  • browser.urlbar.quicksuggest.enabled set to true
  • browser.urlbar.addons.featureGate set to true
  • browser.search.region set to US

Steps to reproduce

  1. Launch Firefox with the profile from the preconditions.
  2. In the Address Bar type a keyword that would trigger an add-on recommendation, such as ‘tts’ , ‘adblock’ , ‘videos’.
  3. Once the Add-on recommendation is shown, click on the ‘Feedback’ button.
  4. Choose Don’t show this -> Not relevant.
  5. Open a new tab.
  6. Navigate back to the tab from step 2( The one where the add-on recommendation was dismissed from earlier).

Expected result

  • No glitches.

Actual result

  • There’s a split second glitch of the dismissed add-on after switching tabs.

Regression range
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=360d86fdb97bfa02c4fb847059da51c90db14014&tochange=c8b40099127c273a58ba6defbe045c55752f0f64
Potentially regressed by: bug 1851942

Set release status flags based on info from the regressing bug 1851942

:adw, since you are the author of the regressor, bug 1851942, could you take a look?

For more information, please visit BugBot documentation.

Assignee: nobody → adw
Status: NEW → ASSIGNED
Depends on: 1830385
Flags: needinfo?(adw)
Priority: -- → P1

The problem is that showing the dismissal acknowledgment tip does not remove the
result from the query context, so when the view later opens and reuses the
cached query context, it still has the dismissed result in it.

At first I thought I should modify UrlbarView.acknowledgeDismissal() so it
either invalidates the context cache or removes the result from the cached
context, but I saw that dismissals without the acknowledgment tip do not have
this problem. That's because they go through UrlbarController.removeResult(),
which removes the result from the context and then notifies the view.

The real problem is that I implemented dismissal acknowledgments wrong. They
should start by going through UrlbarController.removeResult() too.

This patch updates all callers of acknowledgeDismissal() so they call
removeResult() instead. To signal that an acknowledgment should be shown, they
first set a result.acknowledgeDismissalL10n property. When the view is
notified that a result was removed, it shows the tip if this property is
present.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/800d55584907 Make dismissal acknowledgments go through UrlbarController.removeResult(). r=dao
Flags: qe-verify+
Flags: in-testsuite-
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch

The patch landed in nightly and beta is affected.
:adw, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox118 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(adw)

Comment on attachment 9352325 [details]
Bug 1852300 - Make dismissal acknowledgments go through UrlbarController.removeResult().

Beta/Release Uplift Approval Request

  • User impact if declined: This fixes a minor visual bug for addon suggestions in the address bar, which are enabled by default for U.S. users starting on 118.
  • 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: Should be clear from comments
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a small patch that affects the following types of suggestions in the address bar: addons, trending searches, weather, MDN, and Pocket. (All these types are affected by this bug.) Of those, only addons are enabled on Release (starting in 118), and they are only enabled for U.S. users. This code is covered by tests but this specific bug is hard to test and does not have an automated test.
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(adw)
Attachment #9352325 - Flags: approval-mozilla-beta?
QA Whiteboard: [qa-triaged]

Comment on attachment 9352325 [details]
Bug 1852300 - Make dismissal acknowledgments go through UrlbarController.removeResult().

Approved for 118.0b9 (last beta) thanks.

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

Issue is verified as fixed on Firefox 118.0b9(build ID: 20230913180147; treeherder build) and Nightly 119.0a1(build ID: 20230913205335) on Windows 10, macOS 12, Ubuntu 22.

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: