Last Comment Bug 26517 - [SM] Attachment list should show size
: [SM] Attachment list should show size
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: MailNews: Message Display (show other bugs)
: Trunk
: All All
: -- enhancement with 15 votes (vote)
: seamonkey2.1b2
Assigned To: Jens Hatlak (:InvisibleSmiley)
:
:
Mentors:
: 90352 173269 230447 339606 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2000-02-03 23:30 PST by Henrik Gemal
Modified: 2011-01-26 10:35 PST (History)
22 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch [Checkin: comment 36] (6.27 KB, patch)
2011-01-06 07:27 PST, Jens Hatlak (:InvisibleSmiley)
mnyromyr: review+
neil: superreview+
Details | Diff | Splinter Review

Description Henrik Gemal 2000-02-03 23:30:17 PST
When you recieve a mail with attachment(s) the dropdown attachment list that 
appear when you press the paperclip should also show the size of the attachment.

So that entries could be:
text.txt (34 bytes)
killer.jpg (36,6 KB)
Comment 1 Phil Peterson 2000-02-04 09:52:28 PST
Personally, I'd prefer to keep this UI simple, and not include these details.
But since it seems valuable to you, I'll move to the helpwanted list rather than
resolve the bug.
Comment 2 Henrik Gemal 2000-02-05 06:12:45 PST
I think it's VERY important for us people who sit a home behind a 56K modem. 
There a big difference between downloading a 36K attachment and a 5Mb 
attachment.
Comment 3 Henrik Gemal 2000-04-06 13:34:25 PDT
It should only show the size when the attachment is not a mail.

btw: why it this assigned to nobody@mozilla.org
Comment 4 lchiang 2000-04-06 17:32:04 PDT
Henrik - this is a new "feature" and no one to work on it; hence the 
nobody@mozilla.org and helpwanted keyword.
Comment 5 Henrik Gemal 2001-02-11 03:53:57 PST
is the size of the mail available to the UI? Then it could be easy to fix this 
baby.

Perhaps some UI expert could do some magic?
Comment 6 Blake Ross 2001-02-11 10:18:36 PST
I'm all out of magic at the moment.

cc'ing Matthew for thoughts on whether to do this
Comment 7 timeless 2001-02-11 11:03:37 PST
i'd like to do it, but i'll have to research the interfaces. sspitzer do you 
know if we have what it takes?
Comment 8 Matthew Paul Thomas 2001-02-12 03:56:00 PST
Attachments to a message should be shown in-line in the message pane, like in 
4.x. That way:
*   you can show the name and size *and* type *and* description of each
    attachment, without having to clutter a menu to doing so;
*   you can open attachment by clicking on them, open them in a new browser
    window by Command+clicking on them, save them by Option+clicking on them ...
*   you can drag the attachment to a browser window of your choice to open it, or
    to a folder in your file manager to save it, or to any other app which eats
    URLs to do whatever;
*   you can copy (for example) a reusable URL for an attachment included in a
    message which was posted to a public NNTP server.

All of these are impractical using a menu, which makes the current UI a bad 
regression from 4.x.

As an improvement over 4.x, show the attachments as rows in the same table, like 
a Finder/Explorer list view, with `Name', `Size', `Type', and `Description' 
columns.
Comment 9 Bob Lockie 2002-12-12 20:52:16 PST
Is it the same as http://bugzilla.mozilla.org/show_bug.cgi?id=90352
Comment 10 Henrik Gemal 2002-12-13 01:15:41 PST
*** Bug 90352 has been marked as a duplicate of this bug. ***
Comment 11 stephend@netscape.com (gone - use stephen.donner@gmail.com instead) 2002-12-13 13:52:18 PST
*** Bug 173269 has been marked as a duplicate of this bug. ***
Comment 12 Desmond Armstrong 2003-08-07 23:28:07 PDT
The requirement to show the attachment size is very important. We are used to it
with Internet Explorer and becomes therefore vital.
For those of us without broadband (the majority) this is a very important
feature in the conversion stakes.
Comment 13 Mike Cowperthwaite 2003-11-04 09:46:44 PST
Attachments no longer shown in a dropdown, but in their own little box.

Would a tooltip on the attachment that included the size be sufficient?
Comment 14 Bob Lockie 2003-11-14 12:24:37 PST
A tooltip would be nice but not ideal at all.
The size of each attachment should be listed beside the file (maybe like this:
"file (size)".
Comment 15 Matthieu MOY 2004-01-05 08:56:35 PST
A tooltip would be nice.

A right-click -> contextual menu -> properties

With all the information about the file would be perfect !



There is at least a case whent this would be really usefull : Under WinXP, you
can right-click -> send as email a document, and if it is an image, you can
modify its size and compress it for example. Then, the attached file is a
temporary file, and you would really want to know its size, which is far from
being obvious currently.
Comment 16 Mike Cowperthwaite 2004-01-05 09:33:47 PST
Attachment size in the *compose* window is bug 195702.  This bug is about 
displaying attachment size for messages in the folders.
Comment 17 Asa Dotzler [:asa] 2004-05-11 16:03:50 PDT
*** Bug 230447 has been marked as a duplicate of this bug. ***
Comment 18 Desmond Armstrong 2004-05-11 16:31:20 PDT
We should have a program like 'Mailwasher' for windows. This program is
extremely valuable as it shows what is sitting on server before downloading.
Then it gives options to delete bounce etc without downloading and before we
download.

Perhaps we can have a taker for such program.

Yes, I would like to see the size of the attachment.
Comment 19 Henrik Skupin (:whimboo) [away 09/30 - 10/06] 2006-08-11 02:56:58 PDT
*** Bug 339606 has been marked as a duplicate of this bug. ***
Comment 20 Jon B 2007-08-30 07:12:11 PDT
(In reply to comment #1)
> Personally, I'd prefer to keep this UI simple, and not include these details.

Umm..  it should be accessible *somehow*.  It's not in the drop-down, it's not in the icon view, it's not in a tooltip, it's not in a right-click menu...  The only way to tell the size of an attachment is to download it.
Comment 21 Sergio 2007-09-21 07:41:34 PDT
> Personally, I'd prefer to keep this UI simple, and not include these details.

The request of this bug (or requested Feature list) is very clear and logical:

When you see that you've just received an attached "PowerPoint" for instance, you want to know how many bytes you will have to download before starting the "show".

Sometimes, depending on the size of it, you prefer to give up downloading.

So it is vital. Is it possible to retrieve this information from the mail server without downloading the file ? 

My suggestion is the classic way (beside the attachment icon):
[icon] Show.pps (3.75 MB)
Comment 22 FX 2008-03-18 07:46:01 PDT
Simple feature request, something very useful and supported in most other email clients. Yet no sign of progress for 7 years. Sad.
Comment 23 Geert Poels 2008-03-18 11:40:02 PDT
I agree. There are dozens of these.
Comment 24 Jon B 2008-06-20 10:41:01 PDT
Here's an extension that shows attachment sizes:

https://addons.update.mozilla.org/en-US/firefox/addon/878
Comment 25 Vincent (caméléon) 2008-10-11 09:15:00 PDT
I think this bug should be affected to Thunderbird instead of Seamonkey for better chance to see it solve.
Comment 26 dfghjkjhg 2009-08-27 02:38:06 PDT
Would really be a great enhancement to finally show the attachment size in the "attachment pane" of "received mails"
(as well as in the "compose window" when writing new mails).
Comment 27 Thomas D. (currently busy elsewhere; needinfo?me) 2010-06-25 09:38:37 PDT
Related bugs in the "Thunderbird" product:

Bug 559559  - Show the file size of attachments in attachment panel of *any* messages (received/sent/deleted etc.)
Bug 195702  - attachment size should be visible in compose window
Comment 28 Jim Porter (:squib) 2010-12-27 22:00:12 PST
This should be pretty trivial for anyone to fix now, since it's just a matter of porting the Thunderbird changes in the bugs in comment 27 to Seamonkey. I'd do it, but I don't have Seamonkey builds set up, so I wouldn't be able to test it.
Comment 29 Jens Hatlak (:InvisibleSmiley) 2011-01-06 07:27:33 PST
Created attachment 501661 [details] [diff] [review]
patch [Checkin: comment 36]

Since bug 559559 landed, the following appears in the Error Console:

Error: [Exception... "'JavaScript component does not have a method named: "addAttachmentField"' when calling method: [nsIMsgHeaderSink::addAttachmentField]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "<unknown>"  data: no]

So we either need to fix this bug (by porting the msgHdrViewOverlay.js changes from changeset 41df9e16a197, except the cloneAttachment change, which we don't have) or at least add a dummy function called "addAttachmentField".
Comment 30 Philip Chee 2011-01-07 04:55:34 PST
> Bug 559559  - Show the file size of attachments in attachment panel of *any*
> messages (received/sent/deleted etc.)
See also [Bug 516787] Message size in the main window should format large numbers (message size).
Comment 31 Karsten Düsterloh 2011-01-14 16:02:05 PST
Comment on attachment 501661 [details] [diff] [review]
patch [Checkin: comment 36]

>+++ b/suite/mailnews/msgHdrViewOverlay.js
>+    addAttachmentField: function(field, value)

New functions at least should follow the 'a' prefix Pattern for arguments (aField, aValue).

r=me with that.
Comment 32 neil@parkwaycc.co.uk 2011-01-15 12:17:03 PST
Comment on attachment 501661 [details] [diff] [review]
patch [Checkin: comment 36]

Mnyromyr, I was thinking that there were two other options to implement this:
1. Create a new XBL binding that allows us to right-align the size
2. Change the listbox into a tree so that we have two columns
   (thus you could hide the size column if you didn't want it)
I could probably whip up a patch for 1. if you want to try it out, but don't ask me for a patch for 2. unless you're really sure you want it.

>+                                                          displayName, 
Nit: trailing space

>+ * @param displayName The name to be displayed for this attachment (usually the 
Nit: trailing space
Comment 33 Philip Chee 2011-01-15 20:42:11 PST
A multicolumn tree sounds attractive. How much work would it take?
Comment 34 Jim Porter (:squib) 2011-01-15 21:22:38 PST
(In reply to comment #32)
> Comment on attachment 501661 [details] [diff] [review]
> patch
> 
> Mnyromyr, I was thinking that there were two other options to implement this:
> 1. Create a new XBL binding that allows us to right-align the size
> 2. Change the listbox into a tree so that we have two columns
>    (thus you could hide the size column if you didn't want it)
> I could probably whip up a patch for 1. if you want to try it out, but don't
> ask me for a patch for 2. unless you're really sure you want it.

It's probably worth keeping this in sync with Thunderbird, since I'm going to be updating this code further. I originally planned to do something like (2), but getting the column size right was a pain.

I'm planning on revisiting this when I update the XBL binding for the attachment pane in bug 282068, so if you'd rather wait for that, that's ok by me (preferable really, since I think it's easier to stay in sync here).
Comment 35 Jens Hatlak (:InvisibleSmiley) 2011-01-16 01:58:57 PST
I'm not sure waiting for bug 282068 would help us here since TB's interface is somewhat different to ours (esp. judging from the screen shots over there).

I think we should go for KISS here, which would rule out option 2 from comment 32 (esp. with comment 33 in mind). If Karsten wants Neil to try and implement comment 32 option 1, fine (I'll unassign myself then), otherwise I think we should land what we have.
Comment 36 Jens Hatlak (:InvisibleSmiley) 2011-01-26 10:33:48 PST
Comment on attachment 501661 [details] [diff] [review]
patch [Checkin: comment 36]

http://hg.mozilla.org/comm-central/rev/f47191dbd14b
(comment 32 addressed)
Comment 37 Jens Hatlak (:InvisibleSmiley) 2011-01-26 10:35:19 PST
Please take any improvement/replacement considerations to new bugs, thanks.

Note You need to log in before you can comment on or make changes to this bug.