Closed Bug 1754594 Opened 4 years ago Closed 4 years ago

Remove the best match row from the view when the user clicks the block button

Categories

(Firefox :: Address Bar, task, P1)

task
Points:
3

Tracking

()

VERIFIED FIXED
99 Branch
Tracking Status
firefox99 --- verified

People

(Reporter: adw, Assigned: daisuke)

References

()

Details

Attachments

(1 file)

When the user clicks the block button in the best match row, the row should be removed from the view immediately and the view should remain open. This is exactly like how the user can press Shift-Delete to remove history rows from the view, which is implemented in UrlbarController._handleDeleteEntry() -- see especially this line, which does this:

this.notify(NOTIFICATIONS.QUERY_RESULT_REMOVED, index);

So clicking the block button should send this notification, and hopefully that's enough and it should just work.

Notes:

  • This depends on the block button (bug 1754588)
  • The spec calls for block buttons on best match rows only, but there's no reason to limit the implementation in this bug to only best matches. It should be able to support all quick suggest rows, unless I'm missing something obvious
  • In addition to the block button, we could handle Shift-Delete on best match rows pretty easily too. I'll ask Ryan about that
Assignee: nobody → daisuke
Status: NEW → ASSIGNED
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/81aa2f6ceb80 Remove the row from the view when the user clicks the block button. r=adw
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch

STR for QA:

  1. Enable Firefox Suggest
  2. Enable best match by setting browser.urlbar.bestMatch.enabled to true
  3. Type "amazon" to trigger a best match
  4. Pick the thumbs-down block button in the best match using the keyboard
  5. Verify the best match row disappears
  6. Repeat steps 4 and 5 but use the mouse to pick the block button

Note that this bug only removes the row for a single search session. The row will come back if you trigger another search. Blocking the suggestion permanently will be handled by another bug.

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

I have verified this issue on the latest Nightly 99.0a1 (Build ID: 20220220215821) on Windows 10 x64. macOS 10.15.7 and Linux Mint 20.

  • In order to verify this issue we have used the STR from comment 4.
  • The Best Match result is successfully dismissed by clicking the "thumbs-down" button or using keyboard navigation.
  • After the result is dismissed the next result is focused.
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: