-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add postMessage support for report site issue data (other than screenshots) to bugform.js #2985
Comments
I've tried sending the data through postMessage from the addon and prefilling the form on the front end (url, details and reported_with fields). It works fine, the only thing is missing is
@karlcow or @miketaylr is there any reason why it is saved to the session? Hopefully I'm not missing anything here :) |
(edit: wow, this comment sat open for 4 hours... thought I hit submit, sorry :(((() Let's do a bit of digging... most recent commit, some refactoring: karlcow@10dba44 before that: #2006... a3aed65#diff-a50603a824fb762e9303ee20ff0f2945R176-R212 We put the stuff from GET params in the session cookie so we wouldn't lose it if we redirected to GitHub to login before we had a form object. In general, I think it's fine to put it in a hidden input, there's no reason for it to be treated differently than details. We don't want to remove support for the |
…down, so all other tests are not affected by it
Nice work on this one, @ksy36! |
This issue tracks the work necessary for mozilla/webcompat-team-okrs#107
Context:
In Firefox and Firefox for Android, when the user clicks "Report Site Issue", a few things happen:
POST
ed towebcompat.com/issues/new
in a new tabpostMessage
https://searchfox.org/mozilla-central/source/browser/extensions/report-site-issue/background.js#23 is where to start tracing the code.
We would like to port Report Site Issue to Fenix (like, beyond the simple link it is today, see mozilla/webcompat-team-okrs#110), but currently it does not support Experimental Web Extension APIs, which is how
loadURIWithPostData
is implemented. And there are no web extension APIs to open a tab andPOST
, rather thanGET
.One way around this issue is to optionally send all the data via
postMessage
, along with the screenshot. We don't want to remove the POST abilities -- as it allows for HTTP client possibilities, but we should make sure we don't end up sending the data twice. Not 100% sure what that will look like right now, but I'm sure someone smart will think of something. 😄The text was updated successfully, but these errors were encountered: