Closed
Bug 1059087
Opened 9 years ago
Closed 9 years ago
[Contacts] No space between 'Carrier Name' and 'Label'
Categories
(Firefox OS Graveyard :: Gaia::Contacts, defect)
Tracking
(blocking-b2g:2.1+, b2g-v2.0 unaffected, b2g-v2.1 verified, b2g-v2.2 verified)
Tracking | Status | |
---|---|---|
b2g-v2.0 | --- | unaffected |
b2g-v2.1 | --- | verified |
b2g-v2.2 | --- | verified |
People
(Reporter: ericcc, Assigned: drs)
References
Details
(Keywords: regression, Whiteboard: [planned-sprint])
Attachments
(4 files)
67.41 KB,
image/png
|
Details | |
37.19 KB,
image/png
|
Details | |
9.68 KB,
patch
|
arcturus
:
review+
bajaj
:
approval-gaia-v2.1+
|
Details | Diff | Splinter Review |
3.13 KB,
patch
|
arcturus
:
review+
|
Details | Diff | Splinter Review |
### STR 1. Have a contact with a phone number and carrier name. 2. View in detail view. ### Actual No space between 'Carrier Name' and 'Label' ### Expected With some space ### Version Gaia ea93363a8c424d65a9ad91438ce6961377a20f98 Gecko https://hg.mozilla.org/mozilla-central/rev/f9bfe115fee5 BuildID 20140826160204 Version 34.0a1 ro.build.version.incremental=110 ro.build.date=Fri Jun 27 15:57:58 CST 2014 B1TC00011230
Reporter | ||
Comment 1•9 years ago
|
||
[Blocking Requested - why for this release]: Regression
Reporter | ||
Comment 2•9 years ago
|
||
Also found in Call Information.
Comment 3•9 years ago
|
||
Probably a regression of the work we did for sharing the way to display contact information
Updated•9 years ago
|
Target Milestone: --- → 2.1 S4 (12sep)
Assignee | ||
Updated•9 years ago
|
Whiteboard: [planned-sprint]
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → drs+bugzilla
Comment 5•9 years ago
|
||
Moving this to Dialer because it's our responsibility. (and it also manifests in Call Info)
Component: Gaia::Contacts → Gaia::Dialer
Assignee | ||
Comment 6•9 years ago
|
||
For reference, the purpose of components is not for tracking who is doing what, but for tracking the component the work is being done on. If someone encountered this bug, they would likely file it against contacts. Also, the regressing bug is against contacts. For these reasons, even though it manifests in the call info page, I'm moving it back to contacts. I think this is being caused by the following very fragile code: https://github.com/mozilla-b2g/gaia/blob/master/shared/js/contacts/contacts_buttons.js#L118 Here, we set the data-l10n-id to 'mobile', but then once it's translated, we append the 'separator' string, which in US English is ', ', to it. The obvious problem with this is that if the locale changes or l10n retranslates this for any reason, the separator/comma will be gone. So this was always a problem (or at least since v2.0), but now it's more of a problem since we're directly calling translateFragment() on the contacts buttons containers where we didn't used to. I'm not sure what the best way is to fix this, so I'll talk with Stas and/or Zibi and then report back.
Status: NEW → ASSIGNED
Component: Gaia::Dialer → Gaia::Contacts
Comment 7•9 years ago
|
||
So, I'd suggest splitting this into three <span/>'s within <h2/>: - type - separator - carrier Separator and carrier would be hidden by default. If type has l10nId, set it on type, otherwise remove data-l10n-id and set textContent. If carrier exists, unhide separator and carrier and set carrier's textContent to carrier. Flod - does it sound like a good solution? RTL should switch, and I don't think we need to allow localizers to mingle with the order of those two by themselves, right?
Flags: needinfo?(francesco.lodolo)
Comment 8•9 years ago
|
||
Sounds like a good solution. My doubt is if we actually need a separator. Can't we just have a distinct <span> for carrier, spaced from the existing element with padding/margin? What are the possible variants of this text? P.S. still on vacation with spotty hotel's wi-fi, replies might take a while.
Flags: needinfo?(francesco.lodolo)
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to Francesco Lodolo [:flod] (offline from Aug 31 to Sep 7) from comment #8) > My doubt is if we actually need a separator. Can't we just have a distinct > <span> for carrier, spaced from the existing element with padding/margin? > What are the possible variants of this text? The separator contains a comma.
Assignee | ||
Comment 10•9 years ago
|
||
PR: https://github.com/mozilla-b2g/gaia/pull/23742 This fixes the problem properly, as described in comment 7 and comment 8.
Attachment #8484534 -
Flags: review?(francisco)
Comment 11•9 years ago
|
||
I still don't understand this condition: https://github.com/mozilla-b2g/gaia/blob/6c844de438a58dbf7368e7a3ce0af1effcb21e7b/shared/js/contacts/contacts_buttons.js#L109-L114 - it seems to me like the code will only be fired if escapedType is falsy, in which case it will always get to this.DEFAULT_TEL_TYPE in mozL10n.get What am I missing here?
Comment 12•9 years ago
|
||
(In reply to Doug Sherk (:drs) from comment #9) > The separator contains a comma. That's exactly what I asked: do we need it or is it enough to have visual space between items, since they're already styled differently?
Assignee | ||
Comment 13•9 years ago
|
||
(In reply to Zibi Braniecki [:gandalf] from comment #11) > I still don't understand this condition: > https://github.com/mozilla-b2g/gaia/blob/ > 6c844de438a58dbf7368e7a3ce0af1effcb21e7b/shared/js/contacts/contacts_buttons. > js#L109-L114 - it seems to me like the code will only be fired if > escapedType is falsy, in which case it will always get to > this.DEFAULT_TEL_TYPE in mozL10n.get > > What am I missing here? I think PHONE_MAP_TYPE is some kind of backwards compatibility shim. I'm not sure why |escapedType| is one of the possibilities in this branch, so I think I could remove that in this patch. As for entering the branch to begin with, users can set custom types, so escapedType won't be falsy then. (In reply to Francesco Lodolo [:flod] (offline from Aug 31 to Sep 7) from comment #12) > (In reply to Doug Sherk (:drs) from comment #9) > > The separator contains a comma. > > That's exactly what I asked: do we need it or is it enough to have visual > space between items, since they're already styled differently? I'm inclined to leave it, but we can ask for VD input.
Flags: needinfo?(fshih)
Comment 14•9 years ago
|
||
(In reply to Doug Sherk (:drs) from comment #13) > As for entering the branch to begin with, users can set custom types, so > escapedType won't be falsy then. That's exactly my concern. If the user will set custom Type then escapedType will be truthy, so the !escapedType will be falsy, so the branch will never be launched! So it seems to me that the only scenario in which it will be launched is if escapedType is falsy, in which case it can be reduced to: if (!escapedType) { escapedType = navigator.mozL10n.get(this.DEFAULT_TEL_TYPE); } and from there it's easy to just assign data-l10n-id instead :)
Comment 15•9 years ago
|
||
> > That's exactly what I asked: do we need it or is it enough to have visual
> > space between items, since they're already styled differently?
>
> I'm inclined to leave it, but we can ask for VD input.
Yes, For the consistence with other carrier separator, we should stay with the comma. Thanks!
Flags: needinfo?(fshih)
Comment 16•9 years ago
|
||
Comment on attachment 8484534 [details] [diff] [review] Fix missing spacing between "Carrier Name" and "Type Label". Thanks Doug!
Attachment #8484534 -
Flags: review?(francisco) → review+
Assignee | ||
Comment 17•9 years ago
|
||
(In reply to Zibi Braniecki [:gandalf] from comment #14) > That's exactly my concern. If the user will set custom Type then escapedType > will be truthy, so the !escapedType will be falsy, so the branch will never > be launched! > > So it seems to me that the only scenario in which it will be launched is if > escapedType is falsy, in which case it can be reduced to: > > if (!escapedType) { > escapedType = navigator.mozL10n.get(this.DEFAULT_TEL_TYPE); > } > > and from there it's easy to just assign data-l10n-id instead :) I wrote a followup patch for this. Should be a quick review. It's also on the PR now.
Attachment #8487356 -
Flags: review?(francisco)
Comment 18•9 years ago
|
||
Comment on attachment 8487356 [details] [diff] [review] Remove unnecessary mozL10n.get() calls. Tried on the PR and working like charm. Great work Doug!
Attachment #8487356 -
Flags: review?(francisco) → review+
Assignee | ||
Comment 19•9 years ago
|
||
https://github.com/mozilla-b2g/gaia/commit/14709c76da02d7353f52cce8dafee9d08a6afc18
Assignee | ||
Updated•9 years ago
|
Comment 20•9 years ago
|
||
This isn't fixed on v2.1 yet. Correcting the flags to reflect that. Please request approval when you get a chance, though.
status-b2g-v2.2:
--- → fixed
Assignee | ||
Comment 21•9 years ago
|
||
Comment on attachment 8484534 [details] [diff] [review] Fix missing spacing between "Carrier Name" and "Type Label". [Approval Request Comment] [Bug caused by] (feature/regressing bug #): bug 1054995 [User impact] if declined: The phone type (e.g. "Mobile", "Work") and carrier name on the call info and contact pages will be mashed together, which is aesthetically unpleasing. [Testing completed]: Francisco and I tried this. [Risk to taking this patch] (and alternatives if risky): Low. Currently depends on bug 1030346, but a branch patch can be made which doesn't. [String changes made]: None.
Attachment #8484534 -
Flags: approval-gaia-v2.1?(release-mgmt)
Updated•9 years ago
|
Attachment #8484534 -
Flags: approval-gaia-v2.1?(release-mgmt) → approval-gaia-v2.1+
Comment 22•9 years ago
|
||
Needs rebasing for v2.1 uplift.
Flags: needinfo?(drs+bugzilla)
Keywords: branch-patch-needed
Assignee | ||
Comment 23•9 years ago
|
||
https://github.com/mozilla-b2g/gaia/commit/713448b8963cd53c561f4b38640f8c63b655ce33
Reporter | ||
Comment 24•9 years ago
|
||
Gaia-Rev b542080231bb9cdbdb282ab926965ad3f91f7460 Gecko-Rev https://hg.mozilla.org/releases/mozilla-aurora/rev/d614ae398c03 Build-ID 20140923155123 Version 34.0a2 Device-Name flame FW-Release 4.4.2 FW-Incremental 27 FW-Date Thu Sep 4 14:59:02 CST 2014 Bootloader L1TC10011800
Status: RESOLVED → VERIFIED
Comment 25•9 years ago
|
||
This bug is verified fixed on the Flame 2.1 (319mb) and the Flame 2.2 (319mb) Flame 2.2 Master KK (319mb) (Full Flash) Device: Flame 2.2 Master BuildID: 20141011040204 Gaia: 95f580a1522ffd0f09302372b78200dab9b6f322 Gecko: 3f6a51950eb5 Gonk: 52c909e821d107d414f851e267dedcd7aae2cebf Version: 35.0a1 (2.2 Master) Firmware: V180 User Agent: Mozilla/5.0 (Mobile; rv:35.0) Gecko/35.0 Firefox/35.0 Flame 2.1 KK (319mb) (Full Flash) Device: Flame 2.1 BuildID: 20141011000201 Gaia: f5d4ff60ffed8961f7d0380ada9d0facfdfd56b1 Gecko: d813d79d3eae Gonk: 52c909e821d107d414f851e267dedcd7aae2cebf Version: 34.0a2 (2.1) Firmware: V180 User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0 Result: There is space between 'Carrier Name' and 'Label'
QA Whiteboard: [COM=Gaia::Contacts] → [QAnalyst-Triage?] [COM=Gaia::Contacts]
Flags: needinfo?(ktucker)
Updated•9 years ago
|
QA Whiteboard: [QAnalyst-Triage?] [COM=Gaia::Contacts] → [QAnalyst-Triage+] [COM=Gaia::Contacts]
Flags: needinfo?(ktucker)
You need to log in
before you can comment on or make changes to this bug.
Description
•