Closed Bug 870950 Opened 11 years ago Closed 11 years ago

[MMS] [UX] Thread view. Image thumbnail in bubble has a wrong size

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(blocking-b2g:leo+, b2g18 fixed)

RESOLVED FIXED
blocking-b2g leo+
Tracking Status
b2g18 --- fixed

People

(Reporter: vicky, Assigned: jugglinmike)

References

Details

Attachments

(5 files, 2 obsolete files)

Image inside the bubble should never pass the limit of 100px both height and width keeping the proportion of the image of course.
Blocks: 872514
Assignee: nobody → mike
Hi Victoria,

I'm working on this now, but I have one question about the maximum width:

Currently, images are displayed as "block-level" elements, so no text will appear on the same line. This makes limiting their width to 100px seem somewhat unnecessary--wide images may be scaled down further than necessary. The resulting unused space will be especially noticeable when the Messaging application is run at wide resolutions. Do you think we could set the max-width to be the width of the available space?

(Note that this does not effect the maximum height of the image--we can set that to be 100px regardless of the maximum width we choose.)
Flags: needinfo?(vpg)
Attached patch Fix image dimensions (obsolete) — Splinter Review
I'm attaching my proposal for a fix for this bug. This patch implements a maximum image width of 100%, which is in opposition to the bug description. Because of this, I will wait until I hear back from Victoria before requesting a formal review.
Hi Mike,
The fixed size has 2 reasons: 
1. to keep a consistant size of thumbnails, since the image is only one of the kind of files that can be attached in an MMS. 
2. to keep a size that allows the user to have a more general view of the thread without an image covering all the screen. 

Basically the thumbnail should just be a preview hint of the content given in a message but does not aim to work as a full preview, same as you cannot play a video or a song without going to the video/music app.

Thanks!
Flags: needinfo?(vpg)
(In reply to Victoria Gerchinhoren from comment #3)
> Hi Mike,
> The fixed size has 2 reasons: 
> 1. to keep a consistant size of thumbnails, since the image is only one of
> the kind of files that can be attached in an MMS. 
> 2. to keep a size that allows the user to have a more general view of the
> thread without an image covering all the screen. 

Victoria, Looking at Mike's comment 1 he is talking about fixing the hight to 100px but allowing flexible width. Surely this would not impact negatively on screen content as there is nothing to the left and right of the image, but would indeed allow wider images to scale and prevent them from being scaled down further than necessary. Are you sure you want to specify the fixing of image hight *and* width?
Flags: needinfo?(vpg)
Attached image "Hard" width limit
This demonstrates the effect that a "hard" limit on image width will have for "wide" images.
Attached image "Flexible" width limit
This demonstrates the effect that a "flexible" limit on image width will have for "wide" images.
Thanks Ayman, that is the crux of it! I created a couple images (see comment 5 and comment 6) to help illustrate the issue.
Thanks Mike,

I see your point, and appreciate your solution. But anyhow, the visual proposal is to have a maximum of 12rem (chequed with Patryk and since gallery uses that size instead of 10rem, will go for that for the sake of consistency) horizontal for landscape as well as 12rem vertical for portrait.

let me know if you have further questions. 

PS: the hit area for triggering the gallery app is the whole bubble, right?
Flags: needinfo?(vpg)
> PS: the hit area for triggering the gallery app is the whole bubble, right?

hey Victoria. 

The whole bubble cannot be the target area for a single app as a single MMS message can contain multiple files of different types: image, video and music as well as web links and phone numbers within the text. in order to achieve the requirements outlined in the wireframes each individual item within the bubble needs to be its own hit area.
Attached patch Fix maximum image dimensions (obsolete) — Splinter Review
This patch implements the "hard" limit on image height and width as described in comment 8.
Attachment #751831 - Attachment is obsolete: true
Attachment #752277 - Flags: review?(felash)
Comment on attachment 752277 [details] [diff] [review]
Fix maximum image dimensions

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

You've added twice the same patch as a patch ;) be careful next time.

Not r+ing because I'd like the answer to the question first.

::: apps/sms/js/thread_ui.js
@@ +729,5 @@
>      ThreadUI.scrollViewToBottom();
>    },
>  
>    createMmsContent: function thui_createMmsContent(dataArray) {
> +    var container = document.createDocumentFragment();

why this change ?

I mean, I'm not against it per se, and it doesn't seem to break anything, so just curious here.
I'm re-submitting the patch with the duplicate commit removed (strange as it may sound, I sometimes confuse the Unix `>` and `>>` operators...)

The reason I have replaced the `div` element with a Document Fragment is to minimize the amount of unnecessary markup generated. Because we already have a way to target MMS content containers (`.message.mms p`), this markup is redundant. Using this class in a CSS selector ignores the more regular structure we have defined for message markup, and would result in less maintainable stylesheets.
Attachment #752277 - Attachment is obsolete: true
Attachment #752277 - Flags: review?(felash)
Attachment #752735 - Flags: review?(felash)
(In reply to Mike Pennisi [:jugglinmike] from comment #12)
> Created attachment 752735 [details] [diff] [review]
> Fix maximum image dimensions
> 
> I'm re-submitting the patch with the duplicate commit removed (strange as it
> may sound, I sometimes confuse the Unix `>` and `>>` operators...)


Strange, I don't use this at all. `git format-patch` creates the file for me :)
Another alternative is to `git format-patch -U8 --stdout xxx | xclip` :)

> 
> The reason I have replaced the `div` element with a Document Fragment is to
> minimize the amount of unnecessary markup generated. Because we already have
> a way to target MMS content containers (`.message.mms p`), this markup is
> redundant. Using this class in a CSS selector ignores the more regular
> structure we have defined for message markup, and would result in less
> maintainable stylesheets.

oki, fine for me
Comment on attachment 752735 [details] [diff] [review]
Fix maximum image dimensions

r=me !
Attachment #752735 - Flags: review?(felash) → review+
Thanks, Julien!

Landed at b774a63c6a374d97da66c2310cf910c50acfc914
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Mike, alignment in the thread is wrong, and that's causing the images thumbnails to look so weird. Please take a look at the attachment, where I specify the issues that are not correctly implemented. It would be good to have a call or chat about it, in order to clarify the specs.

My skype user @vixvixy

Thanks!
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
There was a landing, Victoria could we file another bug, put depends on this one ? Will make uplifts easier !

Thanks !
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Hi Victoria,

Two of the issues you have specified in this new attachment have dedicated bugs on BugZilla:

- Bug 871055 - [MMS] [UX] Thread view. Wrong spacing between Image thumbnail and text below it
- Bug 873033 - [MMS] [UX] Messages thread view. Correct the line height for text inside msg bubbles

The final issue (relating to text justification and alignment) has no associated bug (as far as I can see). I recommend creating a new bug for that issue and marking it as another dependency of "Bug 872514 - [MMS] [UX] Align with UX specs".

I think you have done a good job explaining these issues; I understand them well. It doesn't look like anyone has had the opportunity to address the other UX problems yet. The reason why I closed this bug with the Status "Resolved" is because this bug pertains specifically to image sizing.

If you don't mind, could we re-close this bug and continue the discussion on those other issues in their specific pages?
Yes, Mike, here is the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=875690

Thanks!
blocking-b2g: --- → leo?
blocking-b2g: leo? → leo+
v1-train:5d6dc5c
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: