Closed
Bug 1147609
Opened 10 years ago
Closed 10 years ago
Loop standalone should be able to handle the room name embedded in context or as a separate value
Categories
(Hello (Loop) :: Client, defect, P1)
Hello (Loop)
Client
Tracking
(firefox40 fixed)
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
(Whiteboard: [context])
Attachments
(2 files, 1 obsolete file)
38.73 KB,
patch
|
mikedeboer
:
review+
|
Details | Diff | Splinter Review |
8.70 KB,
patch
|
Details | Diff | Splinter Review |
Splitting this out from bug 1142522 as this is likely to be ready to land sooner.
The aim here is to make it so that the standalone UI can deal with either room name being part of the encrypted context, or it being the existing standalone parameter when retrieved from the server.
We'll also deal with displaying errors for edge cases when decryption fails.
Assignee | ||
Comment 1•10 years ago
|
||
Current WIP, attaching here so I can read it through again and compare with tests more easily ;-)
Assignee | ||
Comment 2•10 years ago
|
||
Sevaan: Matej: I could do with some recommendations for the failure case strings. Here's what I have currently:
"Room Information is unavailable. Please request a refresh link from the person you received this from."
This error is displayed when the room context (e.g. name, description, url) is unavailable. This could be because decryption has failed (missing/invalid key) or maybe for some strange reason, there's no data available.
"Sorry, your browser is unable to access the room information. Please ensure it is upgraded to the latest version."
This error is displayed when we can't decrypt the room context because the browser doesn't support the facilities that we need.
Flags: needinfo?(sfranks)
Flags: needinfo?(matej)
Assignee | ||
Updated•10 years ago
|
Rank: 5
Comment 3•10 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #2)
> Sevaan: Matej: I could do with some recommendations for the failure case
> strings. Here's what I have currently:
>
> "Room Information is unavailable. Please request a refresh link from the
> person you received this from."
"No information about this conversation is available. Please request a new link from the person who sent it to you."
> This error is displayed when the room context (e.g. name, description, url)
> is unavailable. This could be because decryption has failed (missing/invalid
> key) or maybe for some strange reason, there's no data available.
>
> "Sorry, your browser is unable to access the room information. Please ensure
> it is upgraded to the latest version."
"Your browser cannot access any information about this conversation. Please make sure you're using the latest version.
> This error is displayed when we can't decrypt the room context because the
> browser doesn't support the facilities that we need.
In both cases I think we should stick to "conversation" to be consistent. Does that work?
Flags: needinfo?(matej)
Assignee | ||
Comment 5•10 years ago
|
||
This depends on the patch in bug 1114563.
The basic idea here is for standalone to be able to decrypt the context, but fall back to the roomName if no context is supplied.
I've also created a new view for the standalone for the room name or failure to decrypt messages, but I'm also envisioning that it can be used for the rest of the context information once we've got the browser side hooked up.
I'll attach another patch in a moment that's not intended for landing, but makes it possible to create a room with encrypted context for testing purposes.
Attachment #8583739 -
Flags: review?(mdeboer)
Assignee | ||
Comment 6•10 years ago
|
||
Once applied and built, select start a conversation. You then get the room created (the title shows as "Encrypted" in the desktop as a workaround).
Then:
1) Copy the room link & paste into a browser.
2) Go back to the room generator, look up the loop.context.key pref and copy its value
3) Back on the url, add a hash, then append the copied key.
The room name should be shown (it'll be "Conversation 1" or something like that).
This is just a PoC hack and not intended for landing.
Assignee | ||
Updated•10 years ago
|
Attachment #8583351 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Iteration: 39.3 - 30 Mar → 40.1 - 13 Apr
Comment 7•10 years ago
|
||
Mark, can we pair-review this one? I'll make a general pass (nits, etc) today.
Status: NEW → ASSIGNED
Comment 8•10 years ago
|
||
Comment on attachment 8583739 [details] [diff] [review]
Make Loop's standalone UI work with roomName as an unecrypted parameter or as an encrypted part of context.
Review of attachment 8583739 [details] [diff] [review]:
-----------------------------------------------------------------
Hmm, forget about my pair-review request, this was more straightforward than I thought before.
So, apology for the delay!
r=me with comments addressed.
::: browser/components/loop/content/shared/js/activeRoomStore.js
@@ +228,5 @@
> + }
> +
> + var roomInfoData = new sharedActions.UpdateRoomInfo({
> + roomOwner: result.roomOwner,
> + roomUrl: result.roomUrl
nit: whoops! Indentation.
@@ +237,5 @@
> + this.dispatcher.dispatch(roomInfoData);
> + return;
> + }
> +
> + if (result.roomName && !result.context) {
Please add a comment for this case of 'legacy', non-encrypted room names.
@@ +266,5 @@
> +
> + this.dispatcher.dispatch(roomInfoData);
> + }.bind(this), function(err) {
> + roomInfoData.roomInfoFailure = ROOM_INFO_FAILURES.DECRYPT_FAILED;
> + this.dispatcher.dispatch(roomInfoData);
If you just alias `this.dispatcher` to `var dispatcher`, you won't need to do the bind() dance all the time.
::: browser/components/loop/standalone/content/l10n/en-US/loop.properties
@@ +127,5 @@
> rooms_display_name_guest=Guest
> rooms_unavailable_notification_message=Sorry, you cannot join this conversation. The link may be expired or invalid.
> rooms_media_denied_message=We could not get access to your microphone or camera. Please reload the page to try again.
> +room_information_failure_not_available=No information about this conversation is available. Please request a new link from the person who sent it to you.
> +room_information_failure_unsupported_browser=Your browser cannot access any information about this conversation. Please make sure you're using the latest version.
O noes, strings! What shall we do with these?
::: browser/components/loop/test/standalone/standaloneRoomViews_test.js
@@ +40,5 @@
> });
>
> + describe("StandaloneRoomContextView", function() {
> + beforeEach(function() {
> + sandbox.stub(navigator.mozL10n, "get").returnsArg(0);
Nice! I'll be using this from here on out. Sinon rocks.
Attachment #8583739 -
Flags: review?(mdeboer) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Re strings - they are for standalone so don't need uplifting.
Assignee | ||
Comment 10•10 years ago
|
||
Target Milestone: --- → mozilla40
Updated•10 years ago
|
Flags: firefox-backlog+
Whiteboard: [context]
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•