webcompat / webcompat-reporter-extensions

Browser extensions to help report site compatibilty issues.
26 stars 21 forks source link

Port reporter back to add-on #52

Closed adamopenweb closed 7 years ago

adamopenweb commented 7 years ago

In order to move on issues #50 and #28, we need to switch the Firefox reporter back to add-on SDK. @miketaylr might still have the old code which could be handy.

miketaylr commented 7 years ago

A few important links:

CustomizableUI module to stick it in the hamburger by default: https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/CustomizableUI.jsm

The pocket add-on to steal ideas from: https://dxr.mozilla.org/mozilla-central/source/browser/extensions/pocket

miketaylr commented 7 years ago

Last state of the SDK firefox add-on before we nuked it: https://github.com/webcompat/webcompat-reporter-extensions/tree/ca378bb42ab37a21f7c7a63945b5e49a274f0eb5/firefox

miketaylr commented 7 years ago

I think we probably want to convert this to a bootstrap add-on rather than keep on using the SDK. If that's the case, we could just make the built-in mobile reporter e10s friendly, and use the CustomizableUI module to stick the icon where we want it:

https://dxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/WebcompatReporter.js

miketaylr commented 7 years ago

Message Manager docs: https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Message_Manager

miketaylr commented 7 years ago

From https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Message_Manager/_Limitations_of_frame_scripts#Observers_in_the_content_process,

As noted in Observers in the chrome process, most observers should be registered in the chrome process and will not work in the content process. The exceptions are:

content-document-global-created document-element-inserted outer-window-destroyed inner-window-destroyed dom-window-destroyed

We use content-document-global-created in the mobile reporter: https://dxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/WebcompatReporter.js#32