Closed Bug 1375855 Opened 7 years ago Closed 6 years ago

omnibox API: allow calling the suggestion callback from onInputChanged multiple times

Categories

(WebExtensions :: Frontend, enhancement, P5)

52 Branch
enhancement

Tracking

(firefox57 wontfix)

RESOLVED WONTFIX
Tracking Status
firefox57 --- wontfix

People

(Reporter: horridimpfoobarbaz, Unassigned)

Details

(Keywords: feature, Whiteboard: [design-decision-denied])

Attachments

(2 files)

374 bytes, application/javascript
Details
174 bytes, application/json
Details
Attached file background.js
User Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170613225334

Steps to reproduce:

Install the attached WebExtension. Type 'example foo' in the location bar.


Actual results:

The suggestion is 'First' and stays that way. This is Chromium's behaviour as well.


Expected results:

The suggestion would be 'Second'.

WebExtensions might be able to offer some suggestions quickly, while also wanting to retrieve more or better suggestions asynchronously (e.g., if they hit the network or perform heavier computation). But, presently, calling the addSuggestions callback uses it up.

This behaviour would not be inconsistent with the rest of the awesomebar machinery, where different suggestions can pop up after different amounts of delay. I'm not sure if this might introduce problems with, say, the user moving between the selections and then a new batch arrive; how does the awesomebar deal with this sort of thing?
Attached file manifest.json
Component: Untriaged → WebExtensions: Frontend
Product: Firefox → Toolkit
Severity: normal → enhancement
Keywords: feature
Priority: -- → P5
Whiteboard: [design-decision-needed]
Hi bucklereed, this has been added to the agenda for the December 19, 2017 WebExtensions APIs triage. Would you be able to join us? 

Here’s a quick overview of what to expect at the triage: 

* We normally spend 5 minutes per bug
* The more information in the bug, the better
* The goal of the triage is to give a general thumbs up or thumbs down on a proposal; we won't be going deep into implementation details

Relevant Links: 

* Wiki for the meeting: https://wiki.mozilla.org/WebExtensions/Triage#Next_Meeting
* Meeting agenda: https://docs.google.com/document/d/1KwfTum8Ow5w4afPAOvShpu_d_MNtahhOIqL3-Em9lLc/edit#
* Vision doc for WebExtensions: https://wiki.mozilla.org/WebExtensions/Vision
Policy Review Comments (https://wiki.mozilla.org/WebExtensions/policy)

This request does not appear to run counter to any of the WebExtension policies. I do have one concern around (II) - security and privacy.  Could a malicious extension take advantage of this to overwhelm the omnibox, or try to "out-suggest" other extensions?

I also wonder about drawbacks (V) - how closely is the API tied to the Omnibox (Awesomebar) implementation? Does this tie it closer? Are there timing and/or race conditions that could make this difficult to implement/test/support?
Flags: needinfo?(amckay)
Whiteboard: [design-decision-needed] → [design-decision-denied]
Thanks for the bug. There was concern that this seemed a lot of work, especially on the user interface end of things. 

At this point the omnibox API isn't really used that much by developers. We could argue that perhaps lacking an API like this is the reason, but I don't think so. I think with some more ideas and use cases around this it might make more sense. There's probably better things to do on the omnibox API though.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(amckay)
Resolution: --- → WONTFIX
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: