Closed Bug 759397 Opened 12 years ago Closed 12 years ago

Remove per-item download rate clutter

Categories

(Firefox :: Downloads Panel, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 17

People

(Reporter: gcp, Assigned: mconley)

References

(Blocks 1 open bug)

Details

Attachments

(11 files, 22 obsolete files)

31.00 KB, image/png
Details
4.00 KB, patch
Gavin
: review+
mconley
: checkin+
Details | Diff | Splinter Review
48.99 KB, image/png
Details
23.51 KB, image/png
Details
33.15 KB, image/png
Details
35.25 KB, image/png
Details
44.87 KB, image/png
Details
51.07 KB, image/png
Details
27.66 KB, image/png
Details
33.65 KB, image/png
Details
21.09 KB, patch
Details | Diff | Splinter Review
Attached image Truncated display
The download panels often cuts off the last part of its text. See attached screenshot. This is a "standard" Windows 7 install with default font sizes.
Note that asides from looking quite silly and unprofessional, there doesn't appear to be an easily discoverable way to resize the panel, so the user can't fix this.
Sure, we're aware of the issue, that will be fixed in an imminent visual refresh.

That's already listed in bug 726447 comment 0 but I'll leave this bug open to
make life easier to other people trying to see if the same issue has been
already reported. So, thanks for filing!
Blocks: 726447
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Attachment #630681 - Flags: review?(mak77)
When will this patch and the others be pushed to m-c ?
Blocks: 767321
These new patchs are almost one month old. Why hasn't been any reviews yet ? They should pushed to central.
No longer blocks: 767321
Attachment #630681 - Flags: review?(mak77) → review+
https://hg.mozilla.org/mozilla-central/rev/e29a85527782
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Shouldn't it also be in FF16 (currently Aurora)?
(In reply to Eugene Savitsky from comment #8)
> Shouldn't it also be in FF16 (currently Aurora)?

The panel should be disabled in the next Aurora build because it's not ready yet,
thus we're not planning to uplift the fixes we'll do in the following days.
This is still broken for downloads that take >1 hour. The problem is that the resizing is now OK for "xxx minutes" and all that follows, but the text "xxx hours, xxx minutes" is longer.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
...and "xxx minutes, xxx seconds" is still just as broken, too.
in the localization note we should improve the note to tell what the longest text may look like, with an example. IF we can't make it right in English I see an hard time for localizers.
Can't we make this panel resizable? I think it will be the best idea, like it's in old Download panel.
Attached patch WIP Patch 1 (obsolete) — Splinter Review
This patch widens the panel on Windows, and shrinks each download item vertically.

Not sure if this is how we want to fly, but I'm going for it until I hear otherwise.

Screenshots coming.
Assignee: paolo.mozmail → mconley
Attached image Windows 7 - Panel wider size (obsolete) —
Comment on attachment 672433 [details]
Windows 7 - Panel wider size

Hey Stephen,

Just curious to know what you think about these new dimensions.

-Mike
Attachment #672433 - Flags: feedback?(shorlander)
Comment on attachment 630681 [details] [diff] [review]
The width of the Downloads Panel should be larger and locale-dependent.

This patch has already been checked in.
Attachment #630681 - Flags: checkin+
Attached image Windows XP - Panel wider size (obsolete) —
Attached image Ubuntu - Panel wider size (obsolete) —
Attached patch WIP Patch 2 (obsolete) — Splinter Review
checkpointing Windows and Ubuntu.
Attachment #672431 - Attachment is obsolete: true
Could you please address comment 12?
also, I find the new width a bit excessive, would 75 be enough?
Attached patch Patch v2 (obsolete) — Splinter Review
Paolo - you're right - 75ch seemed to do the job just fine.  The longest string I could come up with in English was 65 characters long:

23 hours, 59 minutes remaining — 300 of 695 MB (999.4 bytes/sec)

So the added 10ch seemed to be what it took to not auto-truncate.

I've added a localization comment, as you've suggested.
Attachment #672433 - Attachment is obsolete: true
Attachment #672468 - Attachment is obsolete: true
Attachment #672472 - Attachment is obsolete: true
Attachment #672481 - Attachment is obsolete: true
Attachment #672433 - Flags: feedback?(shorlander)
23 hours, 59 minutes vs
4 minutes, 59 seconds is one character longer

I hope you have headroom for that one more :-) I presume we don't display seconds when minutes > 10.
(In reply to Gian-Carlo Pascutto (:gcp) from comment #29)
> 23 hours, 59 minutes vs
> 4 minutes, 59 seconds is one character longer
> 
> I hope you have headroom for that one more :-) I presume we don't display
> seconds when minutes > 10.

Hm, I can do you one better:

59 minutes, 59 seconds remaining — 1022 of 1023 KB (999.4 bytes/sec)

That's 69 characters, so I've had to bump the width to 77ch. New patch coming.
Attached patch Patch v3 (obsolete) — Splinter Review
Attachment #672862 - Attachment is obsolete: true
Attached image Windows 7 - Panel new size (Patch v3) (obsolete) —
Attached image OSX - Panel new size (Patch v3) (obsolete) —
Attached image Ubuntu - Panel new size (Patch v3) (obsolete) —
It's strange how 77ch seems to be a lot for all OS's, except for Windows 7. That's the squeaky wheel here.

Ubuntu, for example, can hold the long string with the original 65ch without a problem.
Comment on attachment 672887 [details] [diff] [review]
Patch v3

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

Any idea why Windows 7 is strangely "thin" with 77ch?

I wonder if perhaps it'd be better to special-case Windows 7 to make the panel wider, and leave the 65ch where it is for everybody else...
Attachment #672887 - Flags: feedback?(mak77)
Hm, so 'ch' is defined as "Equal to the advance measure of the "0" (ZERO, U+0030) glyph found in the font used to render it.", so my guess is that the win font family has small numbers, others have larger.
I don't think we can take a default that is smaller than the actual number of chars we may have there, since the user may change the font globally in the OS and I suppose we'd inherit the system choice.
The laternative, if we want a smaller panel, could be to split the string to 2 lines... maybe we should ask Stephen if that'd be acceptable from a ux point of view.
Flags: needinfo?(shorlander)
That would clearly mean we should change padding and the scrollbar to avoid having too tall items... I wonder if if we could come with a better scrollbar design, like filling item background (just a crazy idea but I think I saw this on some mobile device recently)
ehr, in comment 50 I meant progressbar, not scrollbar.
comment 40 not 50... sigh.
Comment on attachment 672887 [details] [diff] [review]
Patch v3

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

code-wise, this is fine. We just need design directions but there's nothing more I have to see in this patch as of now.
Attachment #672887 - Flags: feedback?(mak77) → review+
Comment on attachment 672887 [details] [diff] [review]
Patch v3

Most locales likely got this wrong when the string landed originally, so you need to change the entity name (e.g. downloadPanel.width).
Attachment #672887 - Flags: review-
I suspect locales got this right by actually seeing if the string were cut since they are used to do such testing, we didn't. But yeah renaming may help seeing the updated note.
Btw, we are likely to remove some text than increasing the width.
(In reply to Marco Bonardo [:mak] from comment #46)
> I suspect locales got this right by actually seeing if the string were cut
> since they are used to do such testing, we didn't. But yeah renaming may
> help seeing the updated note.

Most just copied en-US, apparently.
http://mxr.mozilla.org/l10n-central/search?string=downloads.width

> Btw, we are likely to remove some text than increasing the width.

So should we hold off landing this, to avoid requiring futile work from localizers?
(In reply to Dão Gottwald [:dao] from comment #47)
> So should we hold off landing this, to avoid requiring futile work from
> localizers?

Yes, I think that would be prudent.
Attachment #672887 - Attachment is obsolete: true
(In reply to Dão Gottwald [:dao] from comment #47)
> > Btw, we are likely to remove some text than increasing the width.
> 
> So should we hold off landing this, to avoid requiring futile work from
> localizers?

Yes, this should not land until we get a finalized design from UX, Stephen working on that.
So, what about we start by removing the download speed from single items, calculate the new max width and set it (revving the entity name).  Then we file a follow-up to figure out where to put a global download speed indicator, in case we still consider it a UX requirement. We seemed to somehow agree about this solution on IRC and it seems like an improvement overall.
Alrighty - can do.
Does this mean that each entry will not have its own download speed indicated along it ?
(In reply to Girish Sharma [:Optimizer] from comment #52)
> Does this mean that each entry will not have its own download speed
> indicated along it ?

yes. Though they have a progressbar and the remaining time. Imo the only missing information will be an instant indicator of whether downloads are proceeding fast/slow, that is why we likely need at least a global speed indicator.
The panel has never been intended as a micromanagement ui, single items complete info will always be available in the manager.
Attachment #672888 - Attachment is obsolete: true
Attachment #672889 - Attachment is obsolete: true
Attachment #672893 - Attachment is obsolete: true
Attachment #672898 - Attachment is obsolete: true
Comment on attachment 677035 [details] [diff] [review]
Part 1: Remove download rate from download item (but keep it in tooltip)

So here's the first bit - going to try to recalculate the panel width now.
Attachment #677035 - Flags: review?(mak77)
Attachment #677035 - Attachment description: Remove download rate from download item (but keep it in tooltip) → Part 1: Remove download rate from download item (but keep it in tooltip)
(In reply to Mike Conley (:mconley) from comment #57)
> Created attachment 677057 [details]
> Thinner Panel on Ubuntu

Now that I see this screenshot, is the width in ch relative to the filename font size or the details? There is quite a font-size difference here, much more than on other platforms, that may better explain why it looks larger.
So, what happens if you set the width on the details box, than on the richlistbox?
Checkpointing alternative patch that moves the width attribute to the details node.
Attached image Ubuntu - having moved width attribute (obsolete) —
Attached image OSX - having moved width attribute (obsolete) —
Comment on attachment 677035 [details] [diff] [review]
Part 1: Remove download rate from download item (but keep it in tooltip)

Withdrawing review request until we settle on how to move forward.
Attachment #677035 - Flags: review?(mak77)
Attached image Ubuntu - having moved width attribute (obsolete) —
Attachment #677108 - Attachment is obsolete: true
Attached image OSX - having moved width attribute (obsolete) —
Attachment #677109 - Attachment is obsolete: true
The moved attribute + no rate looks really good.
Attachment #677114 - Attachment is obsolete: true
Attachment #677116 - Attachment is obsolete: true
Attachment #677118 - Attachment is obsolete: true
Attachment #677119 - Attachment is obsolete: true
Attachment #677050 - Attachment is obsolete: true
Attached patch Patch v1 (obsolete) — Splinter Review
We remove the individual download rates (but keep them in the tooltips), and we move the width attribute to the details node, setting it to 49ch for the en-US locale, which seems sufficient for our longest strings.
Attachment #677035 - Attachment is obsolete: true
Attachment #677104 - Attachment is obsolete: true
Attachment #677458 - Flags: review?(mak77)
(In reply to Mike Conley (:mconley) from comment #73)
> We remove the individual download rates (but keep them in the tooltips)

That's a horrible decision! If I have several files being downloaded (which I do regularly), I will have to work the mouse a lot to see what I want to know (the download rates), instead of just glancing at the download box. Why do you think that forcing users to do more work to get what they want is better than making the box wider? Do you have a width deficit or what?
(In reply to Roman R. from comment #74)
> (In reply to Mike Conley (:mconley) from comment #73)
> > We remove the individual download rates (but keep them in the tooltips)
> 
> That's a horrible decision! If I have several files being downloaded (which
> I do regularly), I will have to work the mouse a lot to see what I want to
> know (the download rates), instead of just glancing at the download box. Why
> do you think that forcing users to do more work to get what they want is
> better than making the box wider? Do you have a width deficit or what?

I would argue that the time remaining is of more use to the average user than the download rate per second. Removing the rate reduces the noise in the panel, and keeps it minimal - remember, the idea behind the panel is to be a very light and quick visualization of recent downloads.

Information like the rate of download is, IMO, better suited for the Downloads Manager (being implemented in bug 675902).

My recommendation would be to simply use that window to monitor the rate of ongoing downloads if this is of particular interest to you.
s/"download rate per second"/"download rate".  Sorry for the redundancy. :)
Ah, yes, I forgot about the Downloads Manager. Then this panel will become a pretty little thing that has too little value to allow it to occupy space :)
(In reply to Roman R. from comment #77)
> Ah, yes, I forgot about the Downloads Manager. Then this panel will become a
> pretty little thing that has too little value to allow it to occupy space :)

That's why you'll be able to remove it from the toolbar.  Most users will find it useful, customization is there for a reason.
Comment on attachment 677458 [details] [diff] [review]
Patch v1

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

::: browser/components/downloads/content/downloads.js
@@ +921,5 @@
>                                              DownloadsCommon.strings.statePaused,
>                                              transfer);
>      } else if (this.dataItem.state == nsIDM.DOWNLOAD_DOWNLOADING) {
> +      // We don't want to display the rate of download in the download item
> +      // description, because it can get easily truncated.

This comment reads as "we don't know how to fix this bug so we remove the feature", that is untrue (we may indeed just make enough space). It should rather explain we want to reduce clutter and have a slim panel design, since we already show the remaining time we can avoid rates for each entry.

And a new bug to investigate a global rate indicator should be filed.

@@ +928,5 @@
> +                                              this.dataItem.maxBytes,
> +                                              this.dataItem.speed,
> +                                              this.lastEstimatedSecondsLeft);
> +
> +      // We are, however, OK with displaying the rate in the tooltip.

I'm starting thinking this difference will be confusing to some users, but let's try.

::: browser/locales/en-US/chrome/browser/downloads/downloads.dtd
@@ +15,5 @@
>  <!-- LOCALIZATION NOTE (downloads.width):
> +     Width of details for a Downloads Panel item (which directly influences the
> +     width of the Downloads Panel) expressed using a CSS unit. The longest
> +     labels that should fit in the item width are usually those of in-progress
> +     downloads and those of blocked downloads.

Where did go the nice comment you added previously to guess the maximum size? We still want that.

Also the LOCALIZATION NOTE is pointing to the old wrong entity name

::: toolkit/mozapps/downloads/DownloadUtils.jsm
@@ +437,5 @@
>     */
>    convertByteUnits: function DU_convertByteUnits(aBytes)
>    {
> +    if (!aBytes)
> +      aBytes = -1;

Is this change actually needed?
It is removing what looks like a valid 0 case, changing an interface (this is a pretty much used helper across the codebase) and doesn't look part of the fix for this bug (if it's actually a bug should be filed apart).
Attachment #677458 - Flags: review?(mak77) → review-
I think we discussed enough on irc and comments about this, clearing the request, we can iterate later.
Flags: needinfo?(shorlander)
(In reply to Marco Bonardo [:mak] from comment #79)
>
> And a new bug to investigate a global rate indicator should be filed.
> 

The *might* land within the territory of bug 808277.


> ::: toolkit/mozapps/downloads/DownloadUtils.jsm
> @@ +437,5 @@
> >     */
> >    convertByteUnits: function DU_convertByteUnits(aBytes)
> >    {
> > +    if (!aBytes)
> > +      aBytes = -1;
> 
> Is this change actually needed?
> It is removing what looks like a valid 0 case, changing an interface (this
> is a pretty much used helper across the codebase) and doesn't look part of
> the fix for this bug (if it's actually a bug should be filed apart).

You're right - I may have been a little careless here. Not sure what I was thinking. Thanks for spotting it!
Attached patch Patch v2 (obsolete) — Splinter Review
(In reply to Marco Bonardo [:mak] from comment #79)
> Comment on attachment 677458 [details] [diff] [review]
> Patch v1
> 
> Review of attachment 677458 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: browser/components/downloads/content/downloads.js
> @@ +921,5 @@
> >                                              DownloadsCommon.strings.statePaused,
> >                                              transfer);
> >      } else if (this.dataItem.state == nsIDM.DOWNLOAD_DOWNLOADING) {
> > +      // We don't want to display the rate of download in the download item
> > +      // description, because it can get easily truncated.
> 
> This comment reads as "we don't know how to fix this bug so we remove the
> feature", that is untrue (we may indeed just make enough space). It should
> rather explain we want to reduce clutter and have a slim panel design, since
> we already show the remaining time we can avoid rates for each entry.

Fixed.

> 
> I'm starting thinking this difference will be confusing to some users, but
> let's try.

Yeah - switching over is trivial.

> 
> ::: browser/locales/en-US/chrome/browser/downloads/downloads.dtd
> @@ +15,5 @@
> >  <!-- LOCALIZATION NOTE (downloads.width):
> > +     Width of details for a Downloads Panel item (which directly influences the
> > +     width of the Downloads Panel) expressed using a CSS unit. The longest
> > +     labels that should fit in the item width are usually those of in-progress
> > +     downloads and those of blocked downloads.
> 
> Where did go the nice comment you added previously to guess the maximum
> size? We still want that.

Ah, fixed. Also, I've increased the width slightly from 49ch to 51ch. I did a little bit of tuning after I got the 51 character maximum, but I realized that this tuning was based upon a static string. I thought I'd err on the side of caution, and just keep the 51 character width.

> 
> Also the LOCALIZATION NOTE is pointing to the old wrong entity name
> 

Whoops - fixed.


I've also modified the DownloadUtils.jsm tests to test my new function.
Attachment #677458 - Attachment is obsolete: true
Attachment #678765 - Flags: review?(mak77)
Comment on attachment 678765 [details] [diff] [review]
Patch v2

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

::: browser/locales/en-US/chrome/browser/downloads/downloads.dtd
@@ +30,2 @@
>       -->
> +<!ENTITY downloadDetails.width            "51ch">

The string "59 minutes, 59 seconds remaining - 1022 of 1023 KB" is 50 chars, not 51. I may even be fine adding 1 char for safety, but the comment should be correct.

::: toolkit/mozapps/downloads/DownloadUtils.jsm
@@ +107,5 @@
> +    let [transfer, timeLeft, newLast]
> +      = this._deriveTransferRate(aCurrBytes, aMaxBytes, aSpeed, aLastSec);
> +
> +    if (aSpeed == null)
> +      aSpeed = -1;

what about making _deriveTransferRate also return normalizedSpeed as 4th item, so arguments handling is all there?

@@ +134,5 @@
> +   * @return A pair: [download status text, new value of "last seconds"]
> +   */
> +  getDownloadStatusNoRate:
> +  function DU_getDownloadStatusNoRate(aCurrBytes, aMaxBytes, aSpeed,
> +                                      aLastSec) {

this file seems to use bracing on a new line for methods, so please stick to this code style

@@ +160,5 @@
> +   *                    new value of "last seconds"]
> +   */
> +  _deriveTransferRate: function DU__deriveTransferRate(aCurrBytes,
> +                                                       aMaxBytes, aSpeed,
> +                                                       aLastSec) {

ditto on bracing
Attachment #678765 - Flags: review?(mak77) → review+
Good catches all around. Thanks Marco!
Attachment #678765 - Attachment is obsolete: true
Summary: New Download panel cuts off download speed text → Remove per-item download rate clutter
https://hg.mozilla.org/mozilla-central/rev/bd648e7c2656
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Verified as fixed on the latest Nightly - the download rate per second is now removed from each item and is shown only in the tooltip. 

Verified on Windows 7, Ubuntu 12.04 and Mac OS X 10.7:

Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/19.0 Firefox/19.0        
Build ID: 20121111030749
Mozilla/5.0 (X11; Linux i686; rv:19.0) Gecko/19.0 Firefox/19.0        
Build ID: 20121112030753
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:19.0) Gecko/19.0 Firefox/19.0        
Build ID: 20121112030753
Status: RESOLVED → VERIFIED
This is a horrible fix. I was looking at the source for a way to implement per item download speeds only to find out that current behaviour was implemented in order to NOT to show per item download speeds. Kind of looses all of the magic for quick-peek on downloads - if I have to seperately check the tooltips :(
(In reply to Roman Tomjak from comment #89)
> This is a horrible fix. I was looking at the source for a way to implement
> per item download speeds only to find out that current behaviour was
> implemented in order to NOT to show per item download speeds. Kind of looses
> all of the magic for quick-peek on downloads - if I have to seperately check
> the tooltips :(

we will reintroduce the speed once we have a new more compact design for the panel, no worries.
(In reply to Marco Bonardo [:mak] from comment #90)
> we will reintroduce the speed once we have a new more compact design for the
> panel, no worries.

Is there already a bug tracking that?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: