Closed Bug 1026384 Opened 10 years ago Closed 10 years ago

[MMS]Display switching of SMS/MMS composition screen

Categories

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

ARM
Linux
defect
Not set
normal

Tracking

(b2g-v2.2 fixed)

RESOLVED FIXED
2.1 S6 (10oct)
Tracking Status
b2g-v2.2 --- fixed

People

(Reporter: na-matsumoto, Assigned: salva)

References

Details

Attachments

(5 files, 3 obsolete files)

[User story]
1. Run message app
2. Create new messge
3. Type email adress as a recipient or attach the file.
4. Display MMS composition screen.
This bug is derived from the following.
https://github.com/mozilla-b2g/gaia/pull/20439/files#r13754745
Flags: needinfo?(felash)
This is necessary for the 'send MMS to email' feature.
Blocks: mms-by-email
Flags: needinfo?(felash)
Target Milestone: 2.0 S4 (20june) → ---
Attachment #8450883 - Flags: review?(schung)
Attachment #8450883 - Flags: review?(felash)
Hi, Julien and Steve.
I PR Attachment 8450883 [details].
Please review it.
Flags: needinfo?(schung)
Flags: needinfo?(felash)
Comment on attachment 8450883 [details] [review]
Display switching of SMS/MMS composition screen patch on github

This won"t work properly, we need something more involved in how we switch to 'mms'.

Basically, we want to be in 'mms' when (each one of these items are OR):
1. we have an attachment
2 [review]. we have a subject displayed and it's not empty
3. we have a too big text
4. we have an email as recipient (this is the new one)

Currently, 1. and 2. are done in Compose directly in 'updateType'.
3. is done in ThreadUI.onMessageTypeChange and ThreadUI.updateCounterForSms.

TBH I think some of the things we do in ThreadUI (and 3. is part of it) should move to Compose instead. But that's a quite big refactoring that maybe you don't want to do yourself.

One possible solution is to have a "contribution" model (Compose would request for 1. 2. 3. and 4. from the correct objects to set the type). But maybe this is overkill for what we really need here, so let me think about it over the weekend (and so I'm keeping the needinfo).
Attachment #8450883 - Flags: review?(schung)
Attachment #8450883 - Flags: review?(felash)
Attachment #8450883 - Flags: review-
Flags: needinfo?(schung)
Hi, Julien. Thanks for your review.
I see.
Amendment, such as the following how might it be?

 Recipients.prototype.checkmessagetype = function() {
     var list = data.get(this);
 
     for (var i = 0; i < list.length; i++) {
       if (Utils.isEmailAddress(list[i].number)) {
         Compose.type = 'mms';
         return this;
       }
     }
     Compose.updateType();
     ThreadUI.onMessageTypeChange();
     ThreadUI.updateCounterForSms();
     
     Compose.type = 'sms';
}
I gave some thought, and if you don't mind, I'd like that we do bug 944249 before this. We took it in the coming sprint and I'll try to start with it so that you don't stay blocked.

Does it work for you?
Depends on: 944249
Flags: needinfo?(felash)
There are no problems for me.
But I have concerned about who will fix Bug 944249.
Flags: needinfo?(felash)
Someone from Mozilla team (probably me, but maybe someone else).
Flags: needinfo?(felash)
Attachment #8450883 - Attachment is obsolete: true
Attachment #8489959 - Flags: review?(felash)
Flags: needinfo?(felash)
Please review it.
Comment on attachment 8489959 [details] [review]
Display switching of SMS/MMS composition screen patch on github

I left some comments for you while I fixed bug 944249. Just look for "Bug 1026384" in the files. I think it should be easy to fix like I suggested in the comment.

Please also add unit tests.

Thanks !
Attachment #8489959 - Flags: review?(felash)
Flags: needinfo?(felash)
Thank you for your comment.
I have corrected it. Please review again.
But unit test(thread_ui_test.js) is error before I modify.
Flags: needinfo?(felash)
Naoya, what should I review? I see the previous PR is closed.

Can you attach the PR I should review to this bug and add the "review?" flag on the attachment? Thanks!
Flags: needinfo?(felash)
Attachment #8489959 - Attachment is obsolete: true
Attachment #8491436 - Flags: review?(felash)
I'm sorry. I have replaced the attachment file.
Please review again
Flags: needinfo?(felash)
Comment on attachment 8491436 [details] [review]
Display switching of SMS/MMS composition screen patch on github

You didn't apply all the comments of my previous review, please do.

Also, I still need unit tests, please. I checked myself that compose_test.js has no failure on master currently so you should not have any issue.

Please request review once you're ready and applied all the comments. Thanks!
Attachment #8491436 - Flags: review?(felash)
Flags: needinfo?(felash)
Naoya, I was asked to help with bug 840515. I have a ready patch for this bug. Do you mind if I take it?
Flags: needinfo?(na-matsumoto)
Thank you Salvado.
Could you fix for this bug?
Flags: needinfo?(na-matsumoto) → needinfo?(salva)
For sure. Taking the bug.
Assignee: nobody → salva
Flags: needinfo?(salva)
Comment on attachment 8495752 [details] [review]
Now listening to recipientschange for updating when an e-mail among  the recipients.

I didn't test on the device yet so I'm keeping the r request. But you have some nits to fix + linter and unit tests failures.

Thanks :)
Attached image 2014-09-29-20-37-02.png
Hey Jenny, Fang, there is an issue when the user adds an email recipient and no text is added in composer yet.

In that case, we display "MMS" ahead of the send button, and this makes the composer bigger. Can you have a look to this picture and tell us if it's fine or if we should change it, and if yes, how we should change it?

Thanks !
Attachment #8497002 - Flags: ui-review?(jelee)
Attachment #8497002 - Flags: ui-review?(fshih)
Comment on attachment 8495752 [details] [review]
Now listening to recipientschange for updating when an e-mail among  the recipients.

Looks good, except for the issue I commented about, and the nits on github.

Thanks a lot for taking care of this!
Attachment #8495752 - Flags: review?(felash) → review+
Comment on attachment 8495752 [details] [review]
Now listening to recipientschange for updating when an e-mail among  the recipients.

oops, it was a feedback+ ;)
Attachment #8495752 - Flags: review+ → feedback+
Comment on attachment 8497002 [details]
2014-09-29-20-37-02.png

Hi Julien, 
Fang will try a few layout and give feedback. Thanks!
Attachment #8497002 - Flags: ui-review?(jelee)
Comment on attachment 8497002 [details]
2014-09-29-20-37-02.png

Hi Julien, 
After I tried few layouts, I think we should move MMS above of the composer. So the message can still align with send button and attachment icon, also it won't leave a big gap after the message moved down. 

Thanks!
Attachment #8497002 - Flags: ui-review?(fshih) → ui-review-
Attached image MMS_Spec.png
Attached the visual image. Hope it works for you. : ) Thanks!
Fang, there is a problem with your proposal: how does it work inside a thread ? the "MMS" text will be on top of messages :/
Flags: needinfo?(fshih)
And there's also the case where the composer is as big as possible, in that case the top of the composer is adjacent to the bottom of the recipient panel.
Attached image MMS.png
(In reply to Julien Wajsberg [:julienw] from comment #29)
> Fang, there is a problem with your proposal: how does it work inside a
> thread ? the "MMS" text will be on top of messages :/

Hi Julien, Thanks for mentioning. I've thought about that, so I was thinking to use the same method like "Subject MMS", give a height to it to avoid the problem of overlapping. 

And for the composer, we can also use the method. So the composer should have limited height when the message is expanded. 
Hope it works for you. Thanks!
Flags: needinfo?(fshih)
Fang, so, let me summarize: we should always show the "MMS" indicator in the same place (with or without subject), and when we're in MMS mode we should always show the subject part?
NI Fang for comment 32.

Also NI Jenny because some UX is changed and I want to be sure she agrees with this.
Also how should behave the "add/remove subject" item when we're in MMS mode then?
Flags: needinfo?(jelee)
Flags: needinfo?(fshih)
(In reply to Julien Wajsberg [:julienw] from comment #32)
> Fang, so, let me summarize: we should always show the "MMS" indicator in the
> same place (with or without subject), and when we're in MMS mode we should
> always show the subject part?

Notice this is happening even when simply attaching a picture. I would recommend another different bug for this. WDYT?
Comment on attachment 8495752 [details] [review]
Now listening to recipientschange for updating when an e-mail among  the recipients.

Do you mind to review it again? Thank you!
Attachment #8495752 - Flags: review?(felash)
(In reply to Salvador de la Puente González [:salva] from comment #34)
> (In reply to Julien Wajsberg [:julienw] from comment #32)
> > Fang, so, let me summarize: we should always show the "MMS" indicator in the
> > same place (with or without subject), and when we're in MMS mode we should
> > always show the subject part?
> 
> Notice this is happening even when simply attaching a picture. I would
> recommend another different bug for this. WDYT?

In that case, this is the (former) expected behavior.

I definitely agree to do this in another bug, but we can't enable "send MMS by email" before doing the change, otherwise this will look broken.
Comment on attachment 8495752 [details] [review]
Now listening to recipientschange for updating when an e-mail among  the recipients.

Redirecting to Steve as I'm away for a few days.

Hi Steve, to test the patch, you'll need to set Settings.supportEmailRecipient to true before flashing. You'll see we have tests that test some functions both with/without the feature. We need to still have these tests testing both cases until we enable the feature fully, so please take care that it is the case here.

As I said, we'll also need to figure out what to do with the MMS indicator before enabling the feature...
Attachment #8495752 - Flags: review?(felash) → review?(schung)
(In reply to Julien Wajsberg [:julienw] (PTO until 7th October, ask :steveck or :azasypkin for SMS stuff) from comment #33)
> NI Fang for comment 32.
> 
> Also NI Jenny because some UX is changed and I want to be sure she agrees
> with this.
> Also how should behave the "add/remove subject" item when we're in MMS mode
> then?

Hello Julien,

Looking at the screenshot you attached, we feel that the empty second line with the attachment button at the start really gives a broken visual experience. Fang and I discussed about it and decided to move the string and always show "MMS" at the end of subject line. Having a fixed position for the string can also avoid visual inconsistency that sometimes it appears in composer area but other times outside of it.
"add/remove subject" should behave the same way, the difference between with and without subject would be the appearance of "subject" placeholder. Thanks!
Flags: needinfo?(jelee)
Flags: needinfo?(fshih)
Comment on attachment 8495752 [details] [review]
Now listening to recipientschange for updating when an e-mail among  the recipients.

Looks fine, but please create another bug for addressing the MMS label issue with solution in comment 39(so you will need to copy the UX suggestion to new bug's description) and set the bug as blocker to email meta bug. Thanks!
Attachment #8495752 - Flags: review?(schung) → review+
master: 700fd2a191bf270ac3e91848425b352b430a4fee
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S6 (10oct)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: