Closed Bug 934531 Opened 11 years ago Closed 11 years ago

[Messages] The Visual Design is incorrect for the contact card

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3+)

RESOLVED FIXED
1.3 Sprint 6 - 12/6
blocking-b2g 1.3+

People

(Reporter: julienw, Assigned: julienw)

References

Details

(Keywords: regression)

Attachments

(8 files, 9 obsolete files)

111.26 KB, image/png
Details
75.60 KB, image/png
Details
139.94 KB, image/png
Details
125.19 KB, image/png
Details
102.90 KB, image/png
Details
160.13 KB, image/png
Details
88.40 KB, patch
steveck
: review+
Details | Diff | Splinter Review
1.85 KB, patch
Details | Diff | Splinter Review
Description:
When the user taps on a header of a group sent MMS message, taps on a contact, they will notice that the context menu is incorrect.

The same context menu is displayed when the user taps on a header of a known contact's thread.

Repro Steps:
1)  Have a recent nightly
2)  Ensure that the user has a contact created on the phone that has a name and carrier type.
3)  Tap on the "Messaging" icon.
4)  Tap on the "Compose New Message" icon.
5)  Tap on the "+" icon and add the contact from step 2 to the "To:" field.
6)  Type a SMS.
7)  Press send.
8)  Tap on the header of the SMS message

See attachments.
(note: these repro steps is not a regression, however the repro steps in bug 924475 shows the same contact card and is a regression)
Attached image latest visual spec (obsolete) —
Confused. Is the keyword here right that this is a regression or not?
Yep Jason, this is a regression.

This is due to either a BB evolution or a change in the SMS app, but still, this is a regression.

We fixed a first issue that was occuring on 1.2 in bug 924475, but on 1.3 there is a different issue. One of the root cause is that we're outputting a markup that we should not (a <a> element), and that get styled as a <a> element.

A quick fix would be to overload that style, but I want to catch the opportunity to output a cleaner markup.
triage: would not block release, please land directly into master 1.3
blocking-b2g: 1.3? → ---
This is a regression, we blocked bug 924475 for something similar (except in bug 924475 we also missed some information; but it was in a more obscure panel, whereas now it's in a panel displayed as soon as we tap the header of a known contact's thread).

Renominating.
blocking-b2g: --- → 1.3?
Attached patch WIP patch v1 (obsolete) — Splinter Review
Hey Steve,

The patch is not completely finished yet, especially I'd like to add some comments to be more explicit about the properties templates can use.

However, I think the code is fairly complete, and everything seems to work on Firefox Desktop and Peak. I haven't tried on a non-HD phone yet, I'd like to see how it looks like for not long names.

But still I think you can already have a look at the code before the final patch where I'll ask you review.

Thanks!

Github PR is at https://github.com/mozilla-b2g/gaia/pull/13713

This changes how we render a contact in the Messages app.
---
 apps/sms/index.html                              |   46 ++-
 apps/sms/js/contact_renderer.js                  |  228 ++++++++++++
 apps/sms/js/desktop-only/contacts.js             |   84 +++--
 apps/sms/js/desktop-only/mobilemessage.js        |   20 +-
 apps/sms/js/desktop-only/photo-man-bowtie.jpg    |  Bin 0 -> 7046 bytes
 apps/sms/js/desktop-only/photo-man.jpg           |  Bin 0 -> 6769 bytes
 apps/sms/js/desktop-only/photo-woman.jpg         |  Bin 0 -> 7179 bytes
 apps/sms/js/startup.js                           |    1 +
 apps/sms/js/thread_ui.js                         |  243 ++-----------
 apps/sms/style/sms.css                           |   60 ++-
 apps/sms/test/unit/contact_renderer_test.js      |  394 ++++++++++++++++++++
 apps/sms/test/unit/mock_contact_renderer.js      |   14 +
 apps/sms/test/unit/thread_ui_integration_test.js |  130 +------
 apps/sms/test/unit/thread_ui_test.js             |  425 ++++------------------
 14 files changed, 893 insertions(+), 752 deletions(-)
 create mode 100644 apps/sms/js/contact_renderer.js
 create mode 100644 apps/sms/js/desktop-only/photo-man-bowtie.jpg
 create mode 100644 apps/sms/js/desktop-only/photo-man.jpg
 create mode 100644 apps/sms/js/desktop-only/photo-woman.jpg
 create mode 100644 apps/sms/test/unit/contact_renderer_test.js
 create mode 100644 apps/sms/test/unit/mock_contact_renderer.js
Attachment #8333953 - Flags: feedback?(schung)
Blocks: 933131
1.3+ as it blocks committed user story
blocking-b2g: 1.3? → 1.3+
Comment on attachment 8333953 [details] [diff] [review]
WIP patch v1

Hi Julien, I've left some comments in the patch, might need another deep look when finished but I haven't discover seriours drawback yet. Thanks for the refactoring!

Since the contact rendering is related to bug 933131, which is 1.3 blocking issue now. I've suggested Joe to set this issue as 1.3 blocker.

One question is about the layout in option menu. You put the fancy header in the contact option menu. Did Ayman confrim this changes? It seems not a proper place to put contact in section(it should be options instead), but I'm not sure if we should put complete contact section in the header(and we didn't display the portrait in contact removal confirm prompt). I'll attach the image to UX for mare information later.
Attachment #8333953 - Flags: feedback?(schung)
Hi Ayman, this is the screenshot from Julien's patch. Do you think it looks great if we add the contact portrait in the header, or we should just put text in the header?
Flags: needinfo?(aymanmaat)
Steve, please see https://bugzilla.mozilla.org/attachment.cgi?id=826849, this is the latest Visual Spec I got.

Maybe José or Victoria could confirm this.
Flags: needinfo?(vpg)
Flags: needinfo?(vittone)
(In reply to Julien Wajsberg [:julienw] from comment #11)
> Steve, please see https://bugzilla.mozilla.org/attachment.cgi?id=826849,
> this is the latest Visual Spec I got.
> 
> Maybe José or Victoria could confirm this.

Oops, sorry I missed the visual spec in the front... I think the information is clear since vsual spec is right here.
Flags: needinfo?(vpg)
Flags: needinfo?(vittone)
Flags: needinfo?(aymanmaat)
To be fair, I got it from a quite old bug (2 months ago), it can make sense to still ask Visual Team if it's still current so that we don't have bugs filed later :)

Hey Victoria, José, could you please tell us if https://bugzilla.mozilla.org/attachment.cgi?id=826849 is still current for showing a prompt about a contact?

Thanks!
Flags: needinfo?(vpg)
Flags: needinfo?(vittone)
Attached image Overlay with Photo - SPEC (obsolete) —
Hi Julien, 

Thanks for asking. I checked it with Vicky, made a little adjustment and walla! Here is the last spec.
Flags: needinfo?(vpg)
Flags: needinfo?(vittone)
Attachment #826849 - Attachment is obsolete: true
ok, so the right padding then :)
Will adjust tomorrow.
Julien, 

I misunderstand you, sorry about that. I thought that you were asking about the spec itself, not the implementation of it.

This is the actual implementation? https://bug934531.bugzilla.mozilla.org/attachment.cgi?id=8334407 
Can I see a screenshot from the phone of these? Or can I see it on my phone? It's kind of difficult to check the implemetation without the correct fonts.
Attached patch patch v2 (obsolete) — Splinter Review
Hey Steve,

here is the updated patch.

The pull request is updated too: https://github.com/mozilla-b2g/gaia/pull/13713
Note that I added the changes to the previous patch as an additional commit on the pull request.

I'm still pending Arnau's feedback on the building blocks issue, but we can probably start reviewing. I won't merge without his feedback here anyway.

Thanks!
Attachment #8333953 - Attachment is obsolete: true
Attachment #8335197 - Flags: review?(schung)
(In reply to José Vittone from comment #16)
> Julien, 
> 
> I misunderstand you, sorry about that. I thought that you were asking about
> the spec itself, not the implementation of it.

That's exactly what I was asking :)

> 
> This is the actual implementation?
> https://bug934531.bugzilla.mozilla.org/attachment.cgi?id=8334407 

This is the implementation of the first patch, but not on a device.

> Can I see a screenshot from the phone of these? Or can I see it on my phone?
> It's kind of difficult to check the implemetation without the correct fonts.

I'll do a screenshot on the device right now and ask you feedback on it.
Here is the contact card for a contact with a photo, a phone number without the carrier information, but with a type information.
Attachment #8335199 - Flags: review?(vittone)
Comment on attachment 8335199 [details]
contact with photo and no phone number type

Sorry, this one has _no_ phone number type (ie: a custom empty one). This does not happen a lot on our real phones when using the Contacts app, but I have this contact on my reference workload.
Attachment #8335199 - Attachment description: contact with photo and a phone number type → contact with photo and no phone number type
Attachment #8335201 - Flags: review?(vittone)
Attached image No contact, only a plain number (obsolete) —
Attachment #8335202 - Flags: review?(vittone)
Attachment #8335203 - Flags: review?(vittone)
Attached image contact with a long name without a photo (obsolete) —
Attachment #8335204 - Flags: review?(vittone)
Hey José,

I uploaded all screenshots taken on a Peak. I can do some from a non-HD device too, but only later today as I'm not in the office right now.
Hey Julien, 

Thanks a lot! I'll check them out.
bug 925929 just landed, I'll check today how this affects my work here.
Hey Julien,

General comments on this:

- The image should be 6x6rem (sorry, it is not in the spec)
- Fonts on header (.name & .details) must be light
- Spacing tweaks (shown in comparison)
- When there is no contact (only a plain number) should be styled as .name (font-size 2.3rem and light)

Arnau (who is next to me) told me "Joan will create a patch for your pull request with these changes". Is that OK?
Attachment #8335199 - Attachment is obsolete: true
Attachment #8335201 - Attachment is obsolete: true
Attachment #8335199 - Flags: review?(vittone)
Attachment #8335201 - Flags: review?(vittone)
Attachment #8335203 - Attachment is obsolete: true
Attachment #8335204 - Attachment is obsolete: true
Attachment #8335203 - Flags: review?(vittone)
Attachment #8335204 - Flags: review?(vittone)
Attachment #8335202 - Attachment is obsolete: true
Attachment #8335202 - Flags: review?(vittone)
follow-up to comment 27: the landing of bug 925929 doesn't affect us here.

José, about the image size, I thought like you that it should be 6x6rem, the problem is that when I add everything, it didn't match correctly. Maybe it will be ok once the spacing tweaks are done, but then maybe the spec is not good?

You can tell Arnau there is a question for him on the pull request too ;)
Julien, Joan who works with me, could create a patch to your PR to fine-tune css values to fit latest visuals.
Target Milestone: --- → 1.3 Sprint 6 - 12/6
Hey Julien, 

The numbers in the spec are not that precise, sorry about that. I'm not going to blame anybody more than me, next time I'll double check them. 

I can update the Spec if you consider necessary for other reasons (like QA), just tell me.
Hey José,

Yes please, an updated spec would be definitely desirable, for future reference :)

Arnau, if I have an updated spec, I can fine-tune myself, but I would also appreciate a PR if she has the time :)

Arnau (again), I had a question for you on the PR, Basically, it's about the code at [1], I think it could be done in the BB directly. If that sounds good to you, I can change the BB in my pull request and ask a review from you.

[1] https://github.com/mozilla-b2g/gaia/pull/13713/files#diff-40ff32ff8ddce22c88b864f33e07f312R873

(Flagging Arnau and José)
Flags: needinfo?(vittone)
Flags: needinfo?(arnau)
Comment on attachment 8335197 [details] [diff] [review]
patch v2

Removing review flag until I have an updated spec.

Steve, if it's still not ok on Monday, I may split this bug in half: the refactoring in another bug that we'll be able to land, and the fine visual changes here, so that you're not blocked.
Attachment #8335197 - Flags: review?(schung)
(In reply to Julien Wajsberg [:julienw] from comment #36)
> Comment on attachment 8335197 [details] [diff] [review]
> patch v2
> 
> Removing review flag until I have an updated spec.
> 
> Steve, if it's still not ok on Monday, I may split this bug in half: the
> refactoring in another bug that we'll be able to land, and the fine visual
> changes here, so that you're not blocked. 

I can still take a review first and land it if possible. We can create a follow-up bug for any visual changes in the future.
If you want to split the patch, Joan can update the visuals later.
So we are not delaying you before closing 1.3
Flags: needinfo?(arnau)
Attached image SPEC
The measurement are now correct. Also added more info about the font styles.

The way you implement them can vary as you want, for example use more padding rather than modifying the line-height. In this particular case,line-height value is not a must have, since there are only single lines and not paragraphs.

Sorry for the inconvenience again.
Attachment #8334553 - Attachment is obsolete: true
Flags: needinfo?(vittone)
Attached patch patch v3Splinter Review
Hey Steve,

I want to move forward here so I filed bug 943165 for making the "number/not a contact" case right. The "contact" case should be fine with this patch.

I think I fixed all your comments :)

I added a follow-up commit to the PR at https://github.com/mozilla-b2g/gaia/pull/13713 for an easy review and the patch here contains all the changes.
Attachment #8335197 - Attachment is obsolete: true
Attachment #8338173 - Flags: review?(schung)
Comment on attachment 8338173 [details] [diff] [review]
patch v3

Review of attachment 8338173 [details] [diff] [review]:
-----------------------------------------------------------------

It's looks great, thanks for the refactoring!
Attachment #8338173 - Flags: review?(schung) → review+
Patch to update visual styles in action menu headers
Julien, have a look to my patch. You could apply it to your branch 934531-fix-contact-card to fix the headers.
Thanks Joan, I'll definitely use it in bug 943165!
I'd like to see if I could not inherit a little more from the BB because redefining everything in sms.css seems counter-productive.
master: 62009adb592cfb3bd68a06318c5d01552ede79e7
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: