Closed Bug 574685 Opened 16 years ago Closed 16 years ago

On install/enable, Helper addon should add window.mozFlightDeck to already-open windows and send notification events to them

Categories

(Mozilla Labs Graveyard :: FlightDeck, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dietrich, Assigned: avarma)

References

Details

i started FlightDeck development from scratch in a new profile. after installing the flightdeck addon, i tried clicking "test", and got the "addon required" notification again. i reloaded the page, and then it worked as expected. looks like FlightDeck needs to be reloaded after installing the addon? if so this should be done for the user, so it doesn't just appear broken. i'd also recommend another notification once the addon is detected, confirming things are ready to go.
I just checked and in FF 3.6.3 the Addons window is displayed saying that the restart is needed. Isn't that enough?
I'm using trunk, where the addon doesn't require a restart.
Sure - it should reload in the next iteration or Addon should instantiate itself in the window scope after installation
The optimal experience for this process would be the following: 1. A user presses the Test button for an addon they would like to test. 2. The builder displays a notification informing the user that they need to install the helper addon and prompting them to install it. Per bug 573860, the notification should read: To test this add-on, please install the <a href="https://addons.mozilla.org/firefox/downloads/latest/182410?src=external-builder">Add-ons Builder Helper add-on</a>. 3. When the user clicks the link, AMO prompts them to install the helper addon. 4. After the user accepts AMO's prompt, the helper addon is installed and loaded without a restart. 5. Once the helper addon has been installed and loaded, FD notifies the user that it is proceeding with the testing of the addon via a temporary notification that disappears after several seconds (and thus does not need to be dismissed manually). That notification reads: Now that you have installed the Add-ons Builder Helper, loading the add-on into your browser for testing... 6. FD tells the helper addon to load the addon into the user's browser, and the helper addon does so. Note that there are no page reloads as part of this process, as reloads can lose the user's context on a page (scroll position, unsaved changes, the test request) or require cumbersome additional steps (a prompt about saving unsaved changes, once we add that feature). Instead, the helper addon should notify open FD pages when it is installed and inject the necessary globals into them. And FD pages should start using those globals the moment it receives those notifications. cc:ing Atul, as building this experience likely requires some work on the helper addon in addition to some FD work. Once we figure out what needs to be done, we should split the helper addon work and FD work into separate bugs.
OS: Linux → All
Hardware: x86 → All
Blocks: 578542
Atul: can you confirm whether or not the experience described in comment 4 requires any changes to the helper addon?
Hm, there's a number of different ways we can do this actually. Since the FD addon injects the jetpack global into windows on trusted domains when they're loaded, one option is to just have a simple iframe in FD that constantly reloads itself and checks for the existence of the jetpack global, effectively "polling" for evidence of the installation of the addon. The nice thing about this is that since it takes place entirely in content space, it's easier to debug/iterate on. It also won't involve distracting me from work on e10s integration, if that's of any concern... Another option is for me to implement an actual notification from the FD addon, presumably as a DOM event that gets sent down to the page on installation.
(In reply to comment #6) > The nice thing about this is that since it takes place entirely in content > space, it's easier to debug/iterate on. It also won't involve distracting me > from work on e10s integration, if that's of any concern... That's certainly of concern! > Another option is for me to implement an actual notification from the FD addon, > presumably as a DOM event that gets sent down to the page on installation. This sounds like the better approach, but it doesn't necessarily involve your involvement. We could find someone else to implement this piece.
just as a side note - it needs to happen in all FD pages which are currently open
No longer blocks: 578542
Atul is going to take on the helper addon pieces to make this work, so assigning this bug to him.
Assignee: nobody → avarma
Ok, I've just added this functionality to the helper addon: "As soon as the addon is activated, an event of type addonbuilderhelperstart will be dispatched to the document.body element of every open tab." This is covered by these commits: http://github.com/toolness/addons-builder-helper/commit/897e3ab8616124716a87cb8841f5b05c6f6bad0b http://github.com/toolness/addons-builder-helper/commit/423eb9bf97d18c2bd0de8c3f052766455c7b6265 http://github.com/toolness/addons-builder-helper/commit/a9a3ffe92848167096eaa887052d11610b865891 The latest xpi can be found here: https://secure.toolness.com/xpi/addons-builder-helper.html Let me know if this works for you.
Added window.mozFlightDeck to all trusted open windows when the addon is activated: http://github.com/toolness/addons-builder-helper/commit/a98093b382de1fd96c45054924fa2e6b55cacdc3
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Summary: FlightDeck should auto-reload after installing the helper addon → On install/enable, Helper addon should add window.mozFlightDeck to already-open windows and send notification events to them
Just one thing - could you add http://localhost:8090 and http://127.0.0.1:8090 to the list of allowed hosts? I know I can create my own XPI, but that simplifies and unifies the experience. Thanks
Sure, I've just added a mechanism at addon install/enable that checks the `extensions.addonBuilderHelper.trustedOrigins` preference and adds it to the list of trusted origins. You can separate multiple origins with commas.
Product: Mozilla Labs → Mozilla Labs Graveyard
You need to log in before you can comment on or make changes to this bug.