Closed
Bug 889735
Opened 12 years ago
Closed 12 years ago
[MMS] when attaching so many images,size of the attached MMS content is not refreshed even after removing some images
Categories
(Firefox OS Graveyard :: Gaia::SMS, defect, P1)
Tracking
(blocking-b2g:leo+, b2g18 fixed, b2g-v1.1hd fixed)
People
(Reporter: leo.bugzilla.gaia, Assigned: gnarf)
Details
(Whiteboard: [TD-56035][u=commsapps-user c=messaging p=2], TaipeiMMS, [LeoVB+] )
Attachments
(1 file, 2 obsolete files)
|
7.65 KB,
patch
|
gnarf
:
review+
|
Details | Diff | Splinter Review |
1. Title: when attaching so many images,size of the attached MMS content is not refreshed even after removing some images
2. Precondition: Should be able to send and receive MMS
3. Tester's Action: 1) Add some images in order to show the information about maximum size reached pop-up
2) Remove some pics in order to meet the allowed size and try to send the MMS
4. Detailed Symptom (ENG.) : User is not able to send MMS after reducing its size (the pop-up is still shown even after removing the image). Only adding new pic refreshes the size and activates 'Send' button
5. Expected: The size of the message should be refreshed also after removing pics in order to allow sending it.
6. Reproducibility: Y
1) Frequency Rate : 100%
7. Gaia Master/v1-train: Reproduced on v1-train
8. Gaia Revision: f2d6ed54a236e6e3b94f0abad9f0dacb8a1cc7b3
9. Personal email id: sasikala.paruchuri8@gmail.com
blocking-b2g: --- → leo+
Whiteboard: [TD-56035]
Target Milestone: --- → 1.1 QE4 (15jul)
Updated•12 years ago
|
Assignee: nobody → kaze
Whiteboard: [TD-56035] → [TD-56035][u=commsapps-user c=contacts p=2]
Updated•12 years ago
|
Whiteboard: [TD-56035][u=commsapps-user c=contacts p=2] → [TD-56035][u=commsapps-user c=messaging p=2]
This issue is happening because when we remove an image the state.size is not reset, and in wherever we use Compose.size we are getting the old size value.
But when we press back space state.size is reset, and value is recalculated next time compose.size is accessed.
If allowed, we can steal this issue and provide a patch for review :-)
Comment 2•12 years ago
|
||
I just asked kaze, he's ok, then please do !
Stealing from kaze
Assignee: kaze → leo.bugzilla.gaia
Attachment #772026 -
Flags: review?(felash)
Comment 4•12 years ago
|
||
Comment on attachment 772026 [details]
Pointer to pull request
looks good to me, but could you please add a unit test to check that the size is recalculated in both cases (delete and update) ?
Attachment #772026 -
Flags: review?(felash) → feedback+
Comment 5•12 years ago
|
||
please ask review again when you update the pull request. thanks !
Updated•12 years ago
|
Whiteboard: [TD-56035][u=commsapps-user c=messaging p=2] → [TD-56035][u=commsapps-user c=messaging p=2], TaipeiMMS
| Assignee | ||
Comment 6•12 years ago
|
||
Took the fix from :Leo (Thanks!) and added some unit tests so we can land this.
Assignee: leo.bugzilla.gaia → gnarf37
Attachment #772026 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #773320 -
Flags: review?(felash)
Comment 7•12 years ago
|
||
Comment on attachment 773320 [details] [diff] [review]
patch v2
Review of attachment 773320 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nits
::: apps/sms/test/unit/compose_test.js
@@ +381,5 @@
> };
> Compose.on('input', onInput);
> Compose.append(mockImgAttachment());
> + // we store this so we can make sure it gets resized
> + actualSize = Compose.size;
makes probably more sense to store it before appending. So that if one day we change and calculate the size in "append" this won't break for nothing.
@@ +504,4 @@
> Compose.append(this.attachment);
> + this.sinon.stub(AttachmentMenu, 'open');
> + this.sinon.stub(AttachmentMenu, 'close');
> + this.size = Compose.size;
same here, makes more sense to store the size before append.
also, maybe call it "initialSize" instead of "size".
@@ +535,5 @@
> });
> test('closes the menu', function() {
> assert.isTrue(AttachmentMenu.close.called);
> });
> + test('recaluclates size', function() {
nit: recalculates
Attachment #773320 -
Flags: review?(felash) → review+
| Assignee | ||
Comment 8•12 years ago
|
||
carrying r=julienw - nits addressed
Attachment #773320 -
Attachment is obsolete: true
Attachment #773339 -
Flags: review+
| Assignee | ||
Comment 9•12 years ago
|
||
Comment 10•12 years ago
|
||
Whiteboard: [TD-56035][u=commsapps-user c=messaging p=2], TaipeiMMS → [TD-56035][u=commsapps-user c=messaging p=2], TaipeiMMS, [LeoVB+]
Comment 11•12 years ago
|
||
v1.1.0hd: ff587d985531ad96430215aafd93dddc6de2739f
status-b2g-v1.1hd:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•