Граф коммитов

5 Коммитов

Автор SHA1 Сообщение Дата
Chuck Harmston 6b1cbc1434
Correctly report the result type. 2016-09-26 17:15:07 -06:00
Jared Hirsch 03aeb87dc8 Disable one-off search buttons and simplify popup initialization
This commit contains a small cluster of changes that jointly fix #286:

Connecting the urlbar to the popup in an XBL constructor works far
better than the old onFirstPopupOpen approach. This is a better way of
fixing #138, and it resolves the 'maxRows - 1 is undefined' error.

Disabling one-off search by disabling the pref and removing the one-off
search buttons from the XUL DOM (via hidden=true) closes #292,
closes #293, closes #298--but those bugs aren't really fixed, just
hidden. Filed #304 to re-enable one-off search as time allows. Note that
the disabletab attribute was added just to make the set of attributes in
our one-off-search-buttons element match the element in FF.)

Switching our popup.js listener from the 'popupshowing' event to the
'popupshown' event fixes #295, with some cascading changes related to
renaming the function and the signal fired by the function.

\o/
2016-08-26 17:19:05 -07:00
Chuck Harmston cf224a7708
Fix reporting of recommendationType to metrics (closes #263). 2016-07-15 08:09:43 -05:00
Jared Hirsch 0c6decaf73 Use 'popuphidden' instead of 'popuphiding' to detect XUL popup state
It turns out[1] that DOM Level 2 `addEventListener` handlers, when added
using JS, override XBL handlers for the same events. Nothing seems to
listen for the 'popuphidden' event that's fired just after
'popuphiding', and for our purposes (starting a metrics interaction
event, hiding the recommendation, resetting interaction state in the
highlight manager), either event works fine.

Update the pubsub event from 'before-popup-hide' to 'after-popup-hide',
so that our event names reflect the browser's reality as closely as
possible.

Fixes #164, closes #187.

[1] http://mb.eschew.org/15#sub_15.2.7.1
2016-05-19 20:31:23 -07:00
Jared Hirsch 59f7f32311 Implement minimal version of metrics
* Update metrics documentation to reflect reality.

* Assign the RecommendationRow to the Recommendation, so the metrics
  ping can minimize hitting the DOM to get information.

* Fire an event when the popup is about to open, so the metrics code can
  start listening for events.

* Fire an event when the popup detects a click, so the metrics code can
  get an accurate selectedIndex value.

Fixes #18.
2016-05-04 17:04:27 -07:00