Closed Bug 813472 Opened 12 years ago Closed 11 years ago

Add troubleshooting information with one click in AAQ process

Categories

(support.mozilla.org :: Knowledge Base Software, task, P3)

Tracking

(Not tracked)

RESOLVED FIXED
2012Q4

People

(Reporter: atopal, Assigned: mythmon)

References

Details

(Whiteboard: u=user c=aaq p=1 s=2013.2)

We have a new extension that automatically copies the about:support info into an object that we can put into the troubleshooting info field in the AAQ process. Here is Drew's email:

> I wrote a first draft of an add-on that adds a mozTroubleshoot
> property to all www.mozilla.org, support.mozilla.org, and
> input.mozilla.org pages.  It's an object with one method,
> snapshotJSON, and you can use it like this:
> 
> window.mozTroubleshoot.snapshotJSON(function (json) { 
> console.log(json); });
> 
> json is a blob of data about the user's Firefox, the same data that's
> listed in about:support.  There's a readme that goes into more
> detail:
> 
> https://github.com/0c0w3/troubleshooter
> 
> And here's a XPI:
> 
> http://people.mozilla.com/~adw/troubleshooter/

Things to do:
* have the field prefilled and grayed out when the add-on is installed
* Decide how the add-on would be offered for install.
The reason to automate this: Only 13% of users succeed in giving us the troubleshooting information we need, while 22% try and fail. 65% of users never give us any trouble shooting information.
Blocks: 813571
We still need to figure out:

* Decide how the add-on would be offered for install.
Whiteboard: u=user c=aaq p= s=2012.24 → u=user c=aaq p= s=2013.1
The user flow is discussed in bug 586076
Priority: -- → P3
estimated to 1pt and dropping to next sprint. this is basically a link, some text and some js.
Whiteboard: u=user c=aaq p= s=2013.1 → u=user c=aaq p=1 s=2013.2
Grabbing this.
Assignee: nobody → mcooper
Summary: [tracker] Add troubleshooting information with one click in AAQ process → Add troubleshooting information with one click in AAQ process
I have a prototype of this working, but it has some issues.

1. Because of the way the addon works, the page has to be reloaded after installation. This is kind of confusing for the user, and it would be ideal if the provided API became available immediately, or triggered a callback, or else that would allow us not to have to refresh the page.

2. The addon is currently hosted on people.mozilla.org. This isn't great. We should probably host it on AMO.

3. If the user submits the form, gets an error, and then installs the add-on, the required refresh opens a confusing dialog box for the user. This isn't great, and would be solved if #1 gets solved.

:adw, since you wrote the addon, can you provide some insight into these issues? Ideally, it would be great if you could modify the addon to provide the information even to pages that are already loaded. If nothing else, it would be good to get this addon hosted on AMO, or at least somewhere more permanent than People.
Flags: needinfo?(adw)
Prototype pull request: https://github.com/mozilla/kitsune/pull/1076

Note that in it's current state, this is a bit more than one click. The first time a user interacts with this page, it would be 4 clicks (3 if the addon gets on AMO), but I think it is still an improvement. If the user asks a second question having the addon installed, the data will be filled in automatically, with no user interaction needed.
(In reply to Mike Cooper [:mythmon] from comment #7)
> 1. Because of the way the addon works, the page has to be reloaded after
> installation.

The API should become available to all matching, open pages after the add-on is installed without having to reload them.  Which version of Firefox are you testing on?  Could you turn on debug logging, open some matching pages, install the add-on, and attach the output to this bug?  https://github.com/0c0w3/troubleshooter/blob/master/README.md

> 2. The addon is currently hosted on people.mozilla.org. This isn't great. We
> should probably host it on AMO.

Sure, you should take it and host it wherever you want.
Flags: needinfo?(adw)
Mike, I wonder if you mean that there's no way for a page to tell when (or even if) the add-on was installed, so there's no way to tell when the API becomes available.  (In your testing, I bet reloading the page happened to let enough time pass after installation, even though reloading wasn't strictly necessary.)  Sorry, that's a problem I should have foreseen.  I'll work on adding an event that's fired when the API becomes available that pages can listen for.
I made a new version that notifies pages when the API becomes available.  From the readme:

> The add-on is restartless and its API becomes available to all blessed pages
> immediately on installation.  Pages that are open and loaded at the time of
> installation are notified of the API's availability by a
> `mozTroubleshootDidBecomeAvailable` event dispatched to their windows:
> 
>     window.addEventListener("mozTroubleshootDidBecomeAvailable", function () {
>       // Hot dang, do your stuff.
>     });
> 
> Of course, a conditional like the following can test if the API is available at
> any time, for example on load:
> 
>     if ("mozTroubleshoot" in window)
>       // Hot dang, do your stuff.

http://people.mozilla.com/~adw/troubleshooter/troubleshooter-3cdb585.xpi

Sorry again, obvious problem.  Let me know if you need more.
Thanks for the notification callback Drew, that made this a lot slicker for the user.

I almost have this ready to land. The final pull request is: https://github.com/mozilla/kitsune/pull/1090. I decided to ship the addon in the `/media` directory, because even if it was hosted on AMO, the warning would still come up because SUMO is the site that has the link to install.

Kadir, how hard is it to tell what sort of affect this has once we roll it out? Do we need to do any prep work before the push so that we know whether this was effective or not?
Landed in: https://github.com/mozilla/kitsune/commit/dcdfb266a6aeaaf1892f4e115605930c4ee4a5ba.

Ricky noticed that this extra data isn't actually shown in the question UI, so I don't think it matters if we see a big change in this or not. Kadir, is this data used anywhere? I assumed it was shown to contributors, but I don't see this.

I pushed this just now.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Tyler will file a new bug detailing what part of the trouble shooting information we want to display in the forums.
Blocks: 836321
You need to log in before you can comment on or make changes to this bug.