Closed Bug 1097703 Opened 11 years ago Closed 11 years ago

Standalone version of UI for ROOM clickers should allow users to install and/or open the FxOS Loop client

Categories

(Hello (Loop) :: Client, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla37
Iteration:
37.1
backlog Fx37+

People

(Reporter: oteo, Assigned: macajc)

References

Details

Attachments

(1 file, 8 obsolete files)

The hosted Loop client should check for the FxOS Loop client and allow the user to install it if it is not already installed in the device or to open it to handle the connection to the ROOM if it is already installed. Basically, it's the same US than the one in bug 1008990 but for Rooms
Component: Gaia::Loop → Client
Product: Firefox OS → Loop
QA Contact: anthony.s.hughes
Maria -- What is your expected timeline for implementing Rooms on the Hello app? On Bug 1008990, a developer from your team implemented the changes you wanted on the standalone app, and a developer from my team reviewed it. I'd like to do something similar for this bug.
Flags: needinfo?(oteo)
We want to have landed all the Rooms features at the end of December but we need the Standalone UI working earlier otherwise we can not test properly.
Flags: needinfo?(oteo)
Assignee: nobody → carmen.jimenezcabezas
backlog: --- → Fx37?
Depends on: 1103331
Attached patch V1 WIP (obsolete) — Splinter Review
Attached patch V1 WIP (obsolete) — Splinter Review
Attachment #8527377 - Attachment is obsolete: true
Maire, who developer from your team can help us with the feedback/review process? Carmen has WIP patch that would like to someone to have a look at it?
Flags: needinfo?(mreavy)
Comment on attachment 8527378 [details] [diff] [review] V1 WIP I can take a look at this. It'll likely be tomorrow or Wednesday.
Flags: needinfo?(mreavy)
Attachment #8527378 - Flags: feedback?(standard8)
Attached patch v1 WIP (obsolete) — Splinter Review
I've only rebased the old wip
Attachment #8527378 - Attachment is obsolete: true
Attachment #8527378 - Flags: feedback?(standard8)
Attachment #8528293 - Flags: feedback?(standard8)
Blocks: 1097684
Attachment #8528293 - Attachment is patch: true
Comment on attachment 8528293 [details] [diff] [review] v1 WIP Review of attachment 8528293 [details] [diff] [review]: ----------------------------------------------------------------- Sorry for the delay in getting to this. The general idea isn't too bad, but there's a couple of things I'm concerned about: - The way the views and stores interact doesn't quite fit the flux style we've been dealing with. I've added comments inline so you can see the changes that should be necessary. - The new FxOSRoomStore duplicates a lot of the existing activeRoomStore. That's a bit worrying from a maintainability aspect. I think we should look at either some sort of mixin or some other way of removing the duplication. If you want to chat more about this, or have more thoughts, I'm happy to help. ::: browser/components/loop/content/shared/js/activeRoomStore.js @@ +25,5 @@ > // The room is full > FULL: "room-full" > }; > > +loop.store.FxOSRoomStore = (function() { I would go with FxOSActiveRoomStore. I think we might want to make it a new file, but lets see how we can refine it first. ::: browser/components/loop/standalone/content/js/fxOSMarketplace.jsx @@ +22,5 @@ > + if (this.props.onMarketplaceMessage) { > + // The reason for listening on the global window instead of on the > + // iframe content window is because the Marketplace is doing a > + // window.top.postMessage. > + window.addEventListener("message", this.props.onMarketplaceMessage); The callback from the event listener should dispatch an action with the necessary data to be handled. ::: browser/components/loop/standalone/content/js/standaloneRoomViews.jsx @@ +238,5 @@ > }, > > + _onFxOSAppNeeded: function(onMarketplaceMessageHandler) { > + this.setState({ > + marketplaceSrc: loop.config.marketplaceUrl, FxOSRoomStore should be setting this in its store state - the view will then pick it up via the listeners. @@ +247,3 @@ > joinRoom: function() { > + this.props.dispatcher.dispatch(new sharedActions.JoinRoom({ > + fireAppInstallation: this._onFxOSAppNeeded.bind(this) This shouldn't be necessary with the changes I've mentioned elsewhere.
Attachment #8528293 - Flags: feedback?(standard8) → feedback-
Attached file V2 wip (obsolete) —
Attachment #8528293 - Attachment is obsolete: true
Attachment #8530808 - Attachment description: V2 → V2 wip
Comment on attachment 8530808 [details] V2 wip New version. There are still some unit tests missing here. I think I addressed all your comments except: >The callback from the event listener should dispatch an action with the >necessary data to be handled. The code you commented is common between the standalone conversation UI and the standalone room UI, and the conversation UI doesn't have the concept of "actions". So changing that handler to a new WhateverAction(actionData) is not really an option there.
Attachment #8530808 - Flags: feedback?(standard8)
Attached patch V2 proposed patch (obsolete) — Splinter Review
Attachment #8530808 - Attachment is obsolete: true
Attachment #8530808 - Flags: feedback?(standard8)
Attachment #8530881 - Flags: review?(standard8)
Attached patch V2 proposed patch (obsolete) — Splinter Review
Attachment #8530881 - Attachment is obsolete: true
Attachment #8530881 - Flags: review?(standard8)
Attachment #8531223 - Flags: review?(standard8)
Comment on attachment 8531223 [details] [diff] [review] V2 proposed patch Review of attachment 8531223 [details] [diff] [review]: ----------------------------------------------------------------- Its looking a lot clearer with this update. Though there's still a few things to address. ::: browser/components/loop/content/shared/js/activeRoomStore.js @@ +29,5 @@ > // The room conversation has ended > ENDED: "room-ended" > }; > > +loop.store.FxOSActiveRoomStore = (function() { Please can you make this store into a separate file. Now its reduced in size and easier to understand, I think it makes sense given how we've split our files. @@ +63,5 @@ > + * Handles a room failure. > + * > + * @param {sharedActions.RoomFailure} actionData > + */ > + roomFailure: function(actionData) { This function can be dropped, since it isn't used at the moment. @@ +103,5 @@ > + > + /** > + * Handles the action to join to a room. > + */ > + joinRoom: function(actionData) { nit: no need to specify actionData here. @@ +112,5 @@ > + > + this.setupOutgoingRoom(true); > + }, > + > + setupOutgoingRoom: function(installApp) { Please make this an underscore function (_setupOutgoingRoom) to indicate that its private, and please add a jsdoc for the function. @@ +142,5 @@ > + }); > + }).bind(this); > + }, > + > + _onMarketplaceMessage: function(event) { nit: please add jsdoc describing the parameters and what this is for and how it gets called. @@ +332,5 @@ > })); > > // For the conversation window, we need to automatically > // join the room. > + this.dispatchAction(new sharedActions.JoinRoom({})); nit: no need for the braces addition ::: browser/components/loop/standalone/content/js/fxOSMarketplace.jsx @@ +22,5 @@ > + if (this.props.onMarketplaceMessage) { > + // The reason for listening on the global window instead of on the > + // iframe content window is because the Marketplace is doing a > + // window.top.postMessage. > + window.addEventListener("message", this.props.onMarketplaceMessage); Please add an XXX comment in here to say that this should be changed to an action once the old-style call urls go away. ::: browser/components/loop/standalone/content/js/standaloneRoomViews.jsx @@ +309,5 @@ > } > }, > > joinRoom: function() { > + this.props.dispatcher.dispatch(new sharedActions.JoinRoom({})); nit: no need to add the double braces in here ::: browser/components/loop/standalone/content/js/webapp.jsx @@ +1036,5 @@ > sdk: OT > }); > + var conversation; > + var activeRoomStore; > + if (helper.isFirefoxOS(navigator.userAgent)) { Please can we make the logic here slightly different. I want to make it so that we are able to not enable the rooms part of this on production until it has been fully tested. Additionally, it wouldn't hurt to have the existing conversation code switched on if the fxosApp is defined or not. Something like: if (helper.isFirefoxOS(...) { if (loop.config.fxosApp) { // Use the FxOSConversationModel if (loop.config.fxosApp.rooms) { // Use the FxOSActiveRoomStore } } } // If none of the above apply, // Use the ConversationModel // Use the ActiveRoomStore loop.config.fxosApp.rooms would be a new configuration value - please add it to Makefile and to server.js. ::: browser/components/loop/test/shared/activeRoomStore_test.js @@ +217,5 @@ > })); > > sinon.assert.calledTwice(dispatcher.dispatch); > sinon.assert.calledWithExactly(dispatcher.dispatch, > + new sharedActions.JoinRoom({})); nit: there's a few places of added braces in this file that can be dropped. ::: browser/components/loop/test/standalone/standaloneRoomViews_test.js @@ +229,5 @@ > TestUtils.Simulate.click(getJoinButton(view)); > > sinon.assert.calledOnce(dispatch); > + sinon.assert.calledWithExactly(dispatch, > + new sharedActions.JoinRoom({})); nit: please remove this change.
Attachment #8531223 - Flags: review?(standard8) → review-
Attached patch V3 proposed patch (obsolete) — Splinter Review
Attachment #8531223 - Attachment is obsolete: true
Attached patch V3 proposed patch (obsolete) — Splinter Review
Attachment #8534714 - Attachment is obsolete: true
Attachment #8534931 - Flags: review?(standard8)
No longer blocks: Sprin1_loop_1_1_1
Comment on attachment 8534931 [details] [diff] [review] V3 proposed patch Review of attachment 8534931 [details] [diff] [review]: ----------------------------------------------------------------- Sorry for the delay, looks good. r=Standard8
Attachment #8534931 - Flags: review?(standard8) → review+
r = standard8
Attachment #8534931 - Attachment is obsolete: true
Attachment #8537877 - Flags: review+
Depends on: 1109032
try: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=2ef4bce3c7b3 Bug 1109032 must land before this one (otherwise, this patch won't apply).
We need this for Fx35
backlog: Fx37? → Fx35?
This is for the standalone app -- so it just needs to land and merge in m-c this week (which is officially the Fx37 cycle), and it will be in the next release of the standalone app. We are planning to do another standalone release before Fx35 goes to release (Jan 13). In bug 1109032 I asked "how soon do you need the standalone app updated?"
backlog: Fx35? → Fx37+
Already answered in bug 1109032
treeherder looks good. Requesting checkin
Keywords: checkin-needed
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla37
Iteration: --- → 37.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: