Closed
Bug 1125181
Opened 11 years ago
Closed 10 years ago
Hello should put the conversation (aka room) name in the <title>
Categories
(Hello (Loop) :: Client, enhancement, P2)
Hello (Loop)
Client
Tracking
(firefox42 verified)
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | verified |
People
(Reporter: nsm, Assigned: mai)
References
Details
Attachments
(1 file, 7 obsolete files)
I've set up all links to open in a new tab. When I open a Hello Link which has been named by the sender, a new tab opens with the title of the tab as "Firefox Hello". I see the name of that conversation in the page itself, right of the conversation window. It would be great to have that title in the page's title too so that awesomebar can index it and the other party doesn't have to send the link to me the next time.
Comment 2•10 years ago
|
||
To do this in a way that makes most sense for the user (and for development) probably depends on bug 1114563 so that we can get the room name before the room is entered (and hence have the title updated then).
Comment 4•10 years ago
|
||
Sevaan, any suggested wording/order here? I think its probably "<brand name> - <conversation name>"?
Flags: needinfo?(sfranks)
Summary: show conversation title in tab → Hello should put the conversation (aka room) name in the <title>
Comment 5•10 years ago
|
||
I think it should be "<conversation name> - <brand name>" to keep consistent with how Mozilla titles other pages.
Flags: needinfo?(sfranks)
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → marina.rodrigueziglesias
| Assignee | ||
Comment 6•10 years ago
|
||
Hi,
would you mind take a look to the patch?
Regards,
Mai
Attachment #8634643 -
Flags: feedback?(mdeboer)
Comment 7•10 years ago
|
||
Comment on attachment 8634643 [details] [diff] [review]
0001-Bug-1125181-Hello-should-put-the-conversation-aka-ro.patch
Review of attachment 8634643 [details] [diff] [review]:
-----------------------------------------------------------------
I provided the rest of the necessary feedback on IRC.
::: browser/components/loop/standalone/content/l10n/en-US/loop.properties
@@ +135,5 @@
> ## LOCALIZATION_NOTE(standalone_title_with_status): {{clientShortname}} will be
> ## replaced by the brand name and {{currentStatus}} will be replaced
> ## by the current call status (Connecting, Ringing, etc.)
> standalone_title_with_status={{clientShortname}} — {{currentStatus}}
> +standalone_title_with_room_name={{romName}} - {{clientShortname}}
Well, with this typo it didn't work, now did it?
Attachment #8634643 -
Flags: feedback?(mdeboer)
| Assignee | ||
Comment 8•10 years ago
|
||
updated
Attachment #8634643 -
Attachment is obsolete: true
Attachment #8634679 -
Flags: feedback?(mdeboer)
| Assignee | ||
Comment 9•10 years ago
|
||
Updated pr, bad rebase, sorry
Attachment #8634679 -
Attachment is obsolete: true
Attachment #8634679 -
Flags: feedback?(mdeboer)
Attachment #8634683 -
Flags: feedback?(mdeboer)
Comment 10•10 years ago
|
||
Comment on attachment 8634683 [details] [diff] [review]
0001-Bug-1125181-Hello-should-put-the-conversation-aka-ro.patch
Review of attachment 8634683 [details] [diff] [review]:
-----------------------------------------------------------------
Well, this touches the correct files, you found the correct room state to check for - so I have no feedback there :)
The place where you decided to set the title and the way you attempt it could use a bit of work:
- Please move the operation to the `StandaloneRoomView` components, inside the `componentWillUpdate` method to be precise; the activeRoomStore is part of that component and whenever we get data in from the store, the state of the component changes, because they're linked together. The `componentWillUpdate` method is called whenever the state object of the component is about to be updated and that's the place where we can put additional logic. (See the ROOM_STATES.MEDIA_WAIT check, for example.)
- There is a special `DocumentTitleMixin` that we use and adds a `setTitle` method to a component. Please use that, instead of `document.title = x`.
Attachment #8634683 -
Flags: feedback?(mdeboer) → feedback+
Comment 11•10 years ago
|
||
Oh! And don't forget to add test coverage here! :)
Status: NEW → ASSIGNED
Iteration: --- → 42.2 - Jul 27
Points: --- → 2
Updated•10 years ago
|
Priority: -- → P2
Updated•10 years ago
|
Flags: qe-verify+
Flags: firefox-backlog+
| Comment hidden (obsolete) |
| Assignee | ||
Comment 13•10 years ago
|
||
Missing file on the previous attachment
Attachment #8635969 -
Attachment is obsolete: true
Attachment #8635969 -
Flags: review?(mdeboer)
Attachment #8635971 -
Flags: review?(mdeboer)
Comment 14•10 years ago
|
||
Comment on attachment 8635971 [details] [diff] [review]
0001-Bug-1125181-Hello-should-put-the-conversation-aka-ro.patch
Review of attachment 8635971 [details] [diff] [review]:
-----------------------------------------------------------------
I provided quite a bit of feedback, but please don't worry about that. If there's anything I said that you don't understand or agree with, please let me know!
::: browser/components/loop/standalone/content/js/standaloneRoomViews.jsx
@@ +318,5 @@
> * @param {Object} nextProps (Unused)
> * @param {Object} nextState Next state object.
> */
> componentWillUpdate: function(nextProps, nextState) {
> + if (this.state.roomState === ROOM_STATES.READY) {
Please change this to:
```js
if (this.state.roomState !== ROOM_STATES.READY &&
nextState.roomState === ROOM_STATES.READY) {
```
@@ +321,5 @@
> componentWillUpdate: function(nextProps, nextState) {
> + if (this.state.roomState === ROOM_STATES.READY) {
> + var roomName = this.state.roomName;
> + this.setTitle(mozL10n.get("standalone_title_with_room_name", {
> + roomName: roomName,
Please make this simply `nextState.roomName || this.state.roomName` and you can remove the variable declaration above.
::: browser/components/loop/standalone/content/l10n/en-US/loop.properties
@@ +134,5 @@
>
> ## LOCALIZATION_NOTE(standalone_title_with_status): {{clientShortname}} will be
> ## replaced by the brand name and {{currentStatus}} will be replaced
> ## by the current call status (Connecting, Ringing, etc.)
> +standalone_title_with_room_name={{roomName}} - {{clientShortname}}
Three points here:
1. Can you move the LOCALIZATION_NOTE above here to the string it belongs to (standalone_title_with_status)?
2. Can you use the same dash as the string below (—)?
3. Can you add a new LOCALIZATION_NOTE for this string too? You can model it after the one you're supposed to move down in 1). Localization notes are used to provide a bit of metadata for translators' tools so that translations can be assured to be more accurate.
::: browser/components/loop/test/standalone/standaloneRoomViews_test.js
@@ +42,5 @@
> + sandbox.stub(navigator.mozL10n, "get", function(key, args) {
> + switch(key) {
> + case "standalone_title_with_room_name":
> + return args.roomName;
> + default: return "";
Please change `return "";` to `return key;` and put it on its own line.
@@ +44,5 @@
> + case "standalone_title_with_room_name":
> + return args.roomName;
> + default: return "";
> + }
> + });
Can you fix the indentation of this block?
@@ +102,5 @@
> + addEventListener: function() {},
> + document: { addEventListener: function(){} },
> + setTimeout: function(callback) { callback(); }
> + };
> + loop.shared.mixins.setRootObject(fakeWindow);
Does moving this to the first beforeEach() in this file break things horribly?
If it works, please move it there.
@@ +103,5 @@
> + document: { addEventListener: function(){} },
> + setTimeout: function(callback) { callback(); }
> + };
> + loop.shared.mixins.setRootObject(fakeWindow);
> + activeRoomStore.setStoreState({roomName: "fakeName", roomState: ROOM_STATES.READY});
Well, this'll need to change if you make this the changes I suggested earlier.
Attachment #8635971 -
Flags: review?(mdeboer) → review-
| Assignee | ||
Comment 15•10 years ago
|
||
Updated the pr with your comments,
regards
Attachment #8635971 -
Attachment is obsolete: true
Attachment #8636337 -
Flags: review?(mdeboer)
Comment 16•10 years ago
|
||
Comment on attachment 8636337 [details] [diff] [review]
0001-Bug-1125181-Hello-should-put-the-conversation-aka-ro.patch
Review of attachment 8636337 [details] [diff] [review]:
-----------------------------------------------------------------
\o/ Looks awesome to me! Ship it!
(Please attach the final patch with the two nits fixed, before you request checkin.)
::: browser/components/loop/standalone/content/l10n/en-US/loop.properties
@@ +137,5 @@
> ## by the current call status (Connecting, Ringing, etc.)
> standalone_title_with_status={{clientShortname}} — {{currentStatus}}
> +## LOCALIZATION_NOTE(standalone_title_with_room_name): {{roomName}} will be replaced
> +## by the name of the conversation and {{clientShortname}} will be
> +## replaced by the brand name
nit: missing dot.
::: browser/components/loop/test/standalone/standaloneRoomViews_test.js
@@ +105,5 @@
> sinon.match.instanceOf(sharedActions.SetupStreamElements));
> }
>
> describe("#componentWillUpdate", function() {
> + it("should set document.title to roomName and branch when the READY state is dispatched", function() {
s/branch/brand name/
Attachment #8636337 -
Flags: review?(mdeboer) → review+
| Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Can we get a try run for this (or a reason why no try run is needed) before asking for checkin-needed?
Flags: needinfo?(marina.rodrigueziglesias)
Keywords: checkin-needed
| Assignee | ||
Comment 19•10 years ago
|
||
Flags: needinfo?(marina.rodrigueziglesias)
| Assignee | ||
Comment 20•10 years ago
|
||
Sorry, I'm a novice at launching gecko patchs.
Keywords: checkin-needed
Updated•10 years ago
|
Rank: 26
| Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 23•10 years ago
|
||
Keywords: checkin-needed
Updated•10 years ago
|
Iteration: 42.2 - Jul 27 → 42.3 - Aug 10
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Updated•10 years ago
|
QA Contact: bogdan.maris
I verified that the name of the conversation is correctly displayed in the title bar,
<Conversation name> - <Firefox Hello> using calls in Firefox 42 beta 4 across platforms (Windows 7 64-bit, Mac OS X 10.10.5 and Ubuntu 12.04 32-bit).
You need to log in
before you can comment on or make changes to this bug.
Description
•