Closed Bug 1143594 Opened 9 years ago Closed 9 years ago

[RTL][Contacts]Device truncates beginning instead of the end of the contact name which is too long.

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:2.2+, b2g-v2.2 verified, b2g-master verified)

VERIFIED FIXED
2.2 S9 (3apr)
blocking-b2g 2.2+
Tracking Status
b2g-v2.2 --- verified
b2g-master --- verified

People

(Reporter: lulu.tian, Assigned: steveck)

References

Details

Attachments

(3 files)

Attached image long_contacts_name.png
[1.Description]:
[RTL][v2.2 & v3.0][Contacts]Device truncates beginning instead of the end of the contact name which is too long. It means that the ellipsis is at left side of header.
See attachment:long_contacts_name.png

[2.Testing Steps]: 
1. Set system language as Arabic.
2. Create a contact with a long name  in LTR language.
3. Tap the contact to check details.

[3.Expected Result]: 
3. The ellipsis should be at right side of the name in headers.

[4.Actual Result]: 
3. The ellipsis is at left side of name.

[5.Reproduction build]: 
Flame 2.2 build: affected
Build ID               20150315162500
Gaia Revision          a6b2d3f8478ec250beb49950fecbb8a16465ff6f
Gaia Date              2015-03-15 14:33:22
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/18619f8f6c5c
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150315.195030
Firmware Date          Sun Mar 15 19:50:42 EDT 2015
Bootloader             L1TC000118D0

Flame 3.0 build: affected
Build ID               20150315160203
Gaia Revision          d4177902b04b8fedcb7df9a30ae6e9677e03d2d4
Gaia Date              2015-03-13 15:58:35
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/af68c9c0e903
Gecko Version          39.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150315.192711
Firmware Date          Sun Mar 15 19:27:22 EDT 2015
Bootloader             L1TC000118D0

[6.Reproduction Frequency]: 
Always Recurrence,5/5

[7.TCID]: 
Free Test
QA Whiteboard: [rtl-impact]
Nominating for triage -- inconsistency here in how we are truncating name/address/email values.
blocking-b2g: --- → 2.2?
Priority: -- → P2
Test case has been added in moztrap:
https://moztrap.mozilla.org/manage/case/15396/
Flags: in-moztrap+
Triage: Agreed on comment 1.
blocking-b2g: 2.2? → 2.2+
I can take a look first since it's related to bug 1138340
Hi Steve, are you going to take this? Thanks.
Flags: needinfo?(schung)
Comment on attachment 8579937 [details] [review]
[gaia] steveck-chung:contact-header-RTL > mozilla-b2g:master

Hey Francisco, this patch was migrated from bug 1138340 with additional bdi element in header title. Requesting feedback first since you may have different thought about this change and some test cases might need update, thanks!
Flags: needinfo?(schung)
Attachment #8579937 - Flags: feedback?(francisco)
Assignee: nobody → schung
Comment on attachment 8579937 [details] [review]
[gaia] steveck-chung:contact-header-RTL > mozilla-b2g:master

Hi Steve, :), before you picked up this bug I was taking a look to the same one in sms, so definitely works pretty good. As you commented we will need to modify some of the unit tests, and perhaps son integration ones (those last one I'm not really sure yet).

Also Julien is working on the favorites marker, that hopefully won't conflict with this one.
Attachment #8579937 - Flags: feedback?(francisco) → feedback+
Comment on attachment 8579937 [details] [review]
[gaia] steveck-chung:contact-header-RTL > mozilla-b2g:master

Patch updatd with unit test changes. I didn't touch the integration test since the element text API could still fetch the text inside the bdi correctly, but I can chage the node to bdi instead of h1 if you prefer.
Attachment #8579937 - Flags: review?(francisco)
(In reply to Steve Chung [:steveck] from comment #10)
> Comment on attachment 8579937 [details] [review]
> [gaia] steveck-chung:contact-header-RTL > mozilla-b2g:master
> 
> Patch updatd with unit test changes. I didn't touch the integration test
> since the element text API could still fetch the text inside the bdi
> correctly, but I can chage the node to bdi instead of h1 if you prefer.

Patch looks perfect for me, if integration tests are not affected let's keep this solution. :)
Comment on attachment 8579937 [details] [review]
[gaia] steveck-chung:contact-header-RTL > mozilla-b2g:master

Great job!
Attachment #8579937 - Flags: review?(francisco) → review+
Comment on attachment 8579937 [details] [review]
[gaia] steveck-chung:contact-header-RTL > mozilla-b2g:master

FYI: I added a comment on github, maybe there is no need for the extra `<bdi>` elements - `[dir="auto"]` or `unicode-bidi: isolate` should solve the issue as well.
(In reply to Miller Medeiros [:millermedeiros] from comment #13)
> Comment on attachment 8579937 [details] [review]
> [gaia] steveck-chung:contact-header-RTL > mozilla-b2g:master
> 
> FYI: I added a comment on github, maybe there is no need for the extra
> `<bdi>` elements - `[dir="auto"]` or `unicode-bidi: isolate` should solve
> the issue as well.

Thanks for the suggestion, but I've tried this before patch created since we all prefer simpler structure. Sadly the dir="auto" or `unicode-bidi: isolate` will have no effect if header set direction already. Maybe unset the direction could work, but wrapping text with bdi might be the safest because it could avoid any direction related changes from gaia-header.
In master : https://github.com/mozilla-b2g/gaia/commit/6f1f94d6c1452204ba4d04d49335fee577f386f0
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment on attachment 8579937 [details] [review]
[gaia] steveck-chung:contact-header-RTL > mozilla-b2g:master

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): RTL feature request
[User impact] if declined: Incorrect ellipsis display in contact information header.
[Testing completed]: Yes
[Risk to taking this patch] (and alternatives if risky): Low
[String changes made]: N/A
Attachment #8579937 - Flags: approval-gaia-v2.2?(bbajaj)
Attachment #8579937 - Flags: approval-gaia-v2.2?(bbajaj) → approval-gaia-v2.2+
This issue has been verified successfuly on Flame 2.2/3.0 with the same steps in comment 0. The ellipsis is shown at right side of the name in header. 
See attachment:contacts_name_in_header.png
Rate:0/5

Device: Flame 2.2 (pass)
Build ID               20150326002504
Gaia Revision          e59ac067a1d22b7a72cbebc892ec652723f2a557
Gaia Date              2015-03-26 00:02:53
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/04b4b9d1faae
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150326.042521
Firmware Date          Thu Mar 26 04:25:30 EDT 2015
Bootloader             L1TC000118D0

Device: Flame 3.0 (pass)
Build ID               20150326160206
Gaia Revision          525c341254e08f07f90da57a4d1cd5971a3cc668
Gaia Date              2015-03-26 16:34:16
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/59554288b4eb
Gecko Version          39.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150326.193247
Firmware Date          Thu Mar 26 19:32:58 EDT 2015
Bootloader             L1TC000118D0
Status: RESOLVED → VERIFIED
QA Whiteboard: [rtl-impact] → [rtl-impact][MGSEI-Triage+]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: