Closed Bug 1590461 Opened 5 years ago Closed 5 years ago

[Nudges] urlbar extensions need a way to start a search

Categories

(Firefox :: Address Bar, task, P3)

task
Points:
3

Tracking

()

RESOLVED FIXED
Firefox 72
Iteration:
72.2 - Nov 4 - 17
Tracking Status
firefox71 --- fixed
firefox72 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

The nudges/tips experiment needs to be able to open the urlbar view and show a tip without the user's interacting with the urlbar. i.e., it needs to be able to start an empty search so that its provider is called and can return a single tip result.

This is probably best implemented in mozilla-central as part of the browser.urlbar API. OTOH it may be a good idea to implement all new urlbar APIs in our experiment extensions, as experimental APIs, until they prove themselves over time to be useful in multiple extensions.

Assignee: nobody → adw
Status: NEW → ASSIGNED
Iteration: --- → 72.2 - Nov 4 - 17

The core part of this is trivial, but the forceUserTyping complexity in is due to the fact that the nudges spec shows the go-arrow button in the urlbar instead of the dropdown arrow when the view is open and showing the tip [1]. If you call UrlbarInput.search with an empty string, the dropdown arrow will appear, and that is what we want when showing the history view, but not in this case.

[1] https://mozilla.invisionapp.com/share/S5SQCACBVAF#/screens/370460250_Search_Tips_Experiment

Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5b0cc1595568
Add browser.urlbar.search() to the webextensions API r=mak,mixedpuppy
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
Flags: qe-verify-
Flags: in-testsuite+

Comment on attachment 9107107 [details]
Bug 1590461 - Add browser.urlbar.search() to the webextensions API

Beta/Release Uplift Approval Request

  • User impact if declined: We'd like the option of running quantumbar experiments on 71 that require this patch (bug 1564506, bug 1568594). Otherwise we'd need to wait until 72.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): All this patch does is add a WebExtension API we can call from experiment add-ons. The API is only available to Mozilla add-ons. It has a test.
  • String changes made/needed:
Attachment #9107107 - Flags: approval-mozilla-beta?

Comment on attachment 9107107 [details]
Bug 1590461 - Add browser.urlbar.search() to the webextensions API

Low risk, , uplift approved for 71 beta 9, thanks.

Attachment #9107107 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: