Closed Bug 799707 Opened 8 years ago Closed 5 years ago
[email] UI: hook-up contact thumbnail display in message list
Porting from: https://github.com/mozilla-b2g/gaia/issues/2544 manually: I said: === It's punt-able, but it would be nice to display the contact thumbnails in the message list. @caseyyee raises the issue that the crop done by the contacts app is biased to be horizontal for the cool graphic design setup, but djf suggests that just using "background-size: cover" should probably be fine. In terms of resource consumption concerns, apps/contacts/js/contacts.js currently scales the selected photo to have dimensions of 2.5 * size of the thumbnail display widget (whose size does not seem to be clearly explicitly styled?) which makes the image small enough that we should not explode. Specifically, a 64*64 image should be about 16k of image data, and 2.5 times that is only 40k, so the ballpark figures are reasonable for now. Contacts crams the scaled photo to be photo on the contact, and is created as a File via Canvas.mozGetAsFile. In terms of specific implementation, I would propose that we create a short-lived lookup cache. Because createObjectURL can have resource-usage implications, we need to reference-count live uses, so all hits should be stored with a reference count that we decrement when we remove the header from the list. I think we should also have a miss cache with simple flush heuristics of 1) when the app loses focus and 2) when the cache hits some middle number of entries like 100. === Alberto said: === There is not scaling anymore in the contacts app since #4984 landed :) === I said: === @albertopq It looks like gallery does the scaling now, though, as long as contacts requests a smaller image size? So all our memory use assumptions should still hold? === Casey said: === It appears that we allocate the space for the contact thumbnail regardless if there is a contact photo or not. We should be maximizing the space for the subject and body text if there is no contact photo. ===
RFI to Andrew. two questions: 1) by 'the message list' are you referring to the inbox and other subsequent email listings? 2) Is this actually bug? If i am interpreting it correctly it is a suggestion to alter the specified architecture to include the contacts image in the inbox listing and other subsequent email listings. Can you clarify please
Graphic design calls for the pictures associated with contacts to displayed in the message list on the right edge, but this is not implemented. Most of the stuff I quoted in comment 0 is in regards to performance concerns; we wouldn't want to display giant megapixel images all shrunk down in the list because we would exhaust our memory budget. The data suggests that thanks to cropping done by the contacts app this is not a concern.
As a proof-of-working for bug 848266, I've got an implementation of showing the thumbnail here: https://github.com/mozilla-b2g/gaia/pull/8490
The contact thumbnail stuff was removed from UX designs some time ago, mooting this bug.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.