Closed Bug 223895 Opened 21 years ago Closed 17 years ago

Completed downloads should include size and TLD instead of "Done"

Categories

(Toolkit :: Downloads API, enhancement, P2)

enhancement

Tracking

()

VERIFIED FIXED
mozilla1.9beta2

People

(Reporter: planet36, Assigned: Mardak)

References

Details

(Whiteboard: [has patch][has reviews])

Attachments

(3 files, 11 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031027 Firebird/0.7+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031027 Firebird/0.7+ After a download is completed, observe the Status message. It should display something like: "Download complete (elapsed time was {elapsed-time})" There is redundant information. For example, we already know that the download is complete because of: the window title bar (displays 100%), the progress bar (displays 100%), and the Time Left message (displays 00:00). The Status message should give different information like: "{download-size} completed at {transfer-rate}" This new message displays (important) information which is not currently present in a completed download dialog box: the total size of the download, and the effective transfer rate of the download. By displaying the download size and the download transfer rate, the download box would be more informative. Because the Status message is the only thing being changed, this should not result in a large code modification. hopefully :) Reproducible: Always Steps to Reproduce: 1. Download a file (without the download side bar, so you get a download box) 2. Wait for the download to complete 3. Observe the information in the "Status" message Actual Results: The Status message displays: "Download complete (elapsed time was {elapsed-time})" Example: "Download complete (elapsed time was 00:24)" Expected Results: The Status message should display instead: "{download-size} completed at {transfer-rate}" Example: "6136KB completed at 256 KB/sec" I'll attach some pics of a completed download dialog box (current and suggested).
Attached image completed download dialog box - current (obsolete) —
This is a pic of how the download dialog box looks when the download is completed.
This is a modified pic of how the download dialog box would look when the download is completed. The only difference is the Status message.
I don't mind the redundant information, but the window is resized because of the addition of this text. If your mouse is on the left side of either [Launch File] or [Show File Location], you mouse will no longer be on that button after the download is completed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: download dialog box can be more informative after download is complete → completed downlad message should include size and speed instead of elapsed time
Summary: completed downlad message should include size and speed instead of elapsed time → completed download message should include size and speed instead of elapsed time
Assignee: blake → bugs
taking qa
QA Contact: aebrahim
*** Bug 288385 has been marked as a duplicate of this bug. ***
QA Contact: ali → download.manager
Assignee: bugs → nobody
Depends on: 388517
Assignee: nobody → sdwilsh
I might be able to get back to this, but if someone else wants to take it, please do!
Assignee: comrade693+bmo → nobody
The message shown for completed downloads will probably be in the form of "<size> in <time>" per mockups in http://wiki.mozilla.org/User:Dmose:Fx-Docs:DownloadManager/User_Interface#Iteration_2
Attached patch v1 (obsolete) — Splinter Review
Instead of saying just "Done".. New string doneStatus=#1 #2 in #3 #4 #1 size; #2 size unit; #3 time; #4 time unit examples: 1.1 MB in 33 seconds; 111 KB in 3.3 minutes We need to store the end time in the richlist download item, so new param for createDownload.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #279513 - Flags: ui-review?(beltzner)
Attachment #279513 - Flags: review?(comrade693+bmo)
Attached image screenshot of v1 (obsolete) —
Attachment #279514 - Flags: ui-review?(beltzner)
Patch needs bug 394798 to track the start time, bug 394516 for the time calculations (days, hours, minutes, seconds) [which in turn depends on bug 394263 for refactoring up updating the status].
Depends on: 394516, 394798
There wasn't an up-to-date screenshot of what the download manager looks like now, so here's a screenshot without the stack of patches applied. sdwilsh: good to know that the schema downgrade code is working perfectly ;) $ hg qseries DownloadProgressListener.cleanup.patch trackProgress.patch fixPaused.patch queued.isdone.patch better.time.patch setStart.patch done.sizeTime.patch
Attachment #134289 - Attachment is obsolete: true
Attachment #134290 - Attachment is obsolete: true
OS: Windows XP → All
Hardware: PC → All
Summary: completed download message should include size and speed instead of elapsed time → Completed downloads should include size and elapsed time instead of "Done"
Version: unspecified → Trunk
Comment on attachment 279513 [details] [diff] [review] v1 r=sdwilsh
Attachment #279513 - Flags: ui-review?(mconnor)
Attachment #279513 - Flags: ui-review?(beltzner)
Attachment #279513 - Flags: review?(comrade693+bmo)
Attachment #279513 - Flags: review+
Comment on attachment 279514 [details] screenshot of v1 patch v1 will need to be refreshed (gQuery -> gBaseQuery)
Attachment #279514 - Flags: ui-review?(beltzner) → ui-review?(mconnor)
Attached patch v1.1 (obsolete) — Splinter Review
Updating the patch now so that I don't forget later. :( mconnor can set the ui-r on the screenshot (and this as well if he wants..)
Attachment #279513 - Attachment is obsolete: true
Attachment #279513 - Flags: ui-review?(mconnor)
Attached patch v1.2 (obsolete) — Splinter Review
unbitrot spacing and code motion from bug 394263
Attachment #279557 - Attachment is obsolete: true
Comment on attachment 279514 [details] screenshot of v1 switching to faaborg ui-r? per bug 394516 comment #12
Attachment #279514 - Flags: ui-review?(mconnor) → ui-review?(faaborg)
Comment on attachment 279514 [details] screenshot of v1 Switching ui-r to Madhava, who is taking over download manager design work.
Attachment #279514 - Flags: ui-review?(faaborg) → ui-review?(madhava)
Attached image screenshot of v2 (obsolete) —
Not sure if this should be split off into another bug or just update this patch and rerequest reviews/approvals.. Unknown size = imported download data from previous versions where we didn't track file sizes quick downloads = "about a second" (anything less than 1.5 seconds).. I originally went with "less than a second", but that wasn't quite accurate with 1.4 seconds being less than a second....
Attachment #281484 - Flags: ui-review?(madhava)
(In reply to comment #19) > Created an attachment (id=281484) [details] > screenshot of v2 Please note that in the mockups the text is gray which makes the window look considerably less heavy.
madhava: Is this okay as an incremental step towards bug 397655? This bug will put in the size and transfer time. Another bug can be opened for the ETLD+1 part.
Blocks: 397655
Flags: blocking-firefox3?
Whiteboard: ui-wanted
The design calls for "size - TLD" but not elapsed time. That information should be stored, however, so that it can be revealed by a detailed inspection of the download information (by an extension, or in the Places Manager, or whatever). Morphing and blocking in support of bug 397665.
Flags: blocking-firefox3? → blocking-firefox3+
Summary: Completed downloads should include size and elapsed time instead of "Done" → Completed downloads should include size and TLD instead of "Done"
Whiteboard: ui-wanted
Target Milestone: --- → Firefox 3 M10
Depends on eTLD service instead of better time. Design will be based on attachment 283251 [details] from bug 397655.
Depends on: 368989
No longer depends on: 394516
Attachment #279514 - Flags: ui-review?(madhava)
Attachment #281484 - Flags: ui-review?(madhava)
Attached image screenshot of v2 (obsolete) —
Attachment #279514 - Attachment is obsolete: true
Attachment #281484 - Attachment is obsolete: true
Attached patch v2 (obsolete) — Splinter Review
Use TLD instead of time. The extra switch/case is for later (the other states).
Attachment #280439 - Attachment is obsolete: true
Attachment #285588 - Flags: review?(comrade693+bmo)
Depends on: 400530
Attached patch v3 (obsolete) — Splinter Review
The beltzner part got moved into bug 400530, so this patch focuses on this bug. Changed it to use URIs instead of regex text parsing.. hopefully avoiding security issues ;) Added explicit port adding which was automatically there before with the regex. But now it's able to support unusual URIs like about:blank.
Attachment #285588 - Attachment is obsolete: true
Attachment #285594 - Flags: review?(comrade693+bmo)
Attachment #285588 - Flags: review?(comrade693+bmo)
Attached image screenshot of v3
Attachment #285586 - Attachment is obsolete: true
Comment on attachment 285594 [details] [diff] [review] v3 >@@ -810,6 +816,55 @@ function updateStatus(aItem, aDownload) > } > > break; >+ case Ci.nsIDownloadManager.DOWNLOAD_FINISHED: >+ let (stateSize) { >+ switch (state) { this doesn't make much sense at all - we are already switching on the state - why are you doing it again? >+ let uri = ioService.newURI(getReferrerOrSource(aItem), null, null); let's use Components.Constructor here like we do for nsLocalFile (nsURI or something)
Attachment #285594 - Flags: review?(comrade693+bmo) → review-
(In reply to comment #28) > >+ case Ci.nsIDownloadManager.DOWNLOAD_FINISHED: > >+ let (stateSize) { > >+ switch (state) { > this doesn't make much sense at all - we are already switching on the state - > why are you doing it again? It's so that when I do case FAILED: case BLOCKED: case CANCELED:, I can put the correct text there and for FINISHED use the download size. All of them show the TLD. I can do something fancier if you want if you want to avoid the double switch. > >+ let uri = ioService.newURI(getReferrerOrSource(aItem), null, null); > let's use Components.Constructor here like we do for nsLocalFile (nsURI or > something) Hrm? How so?
> > >+ let uri = ioService.newURI(getReferrerOrSource(aItem), null, null); > > let's use Components.Constructor here like we do for nsLocalFile (nsURI or > > something) > Hrm? How so? You sure there's something like that for services? The IOService will figure out what type of URI it is.. and nsIURI says.. An object of this interface must be created in the following way: ioService.newURI(uri, charset, baseuri);
(In reply to comment #30) > You sure there's something like that for services? The IOService will figure > out what type of URI it is.. and nsIURI says.. Oh bother - it only works for createInstance, and I knew that... Disregard that remakr!
Depends on: 400616
Attached patch v3.1 (obsolete) — Splinter Review
How about this instead of the extra switch? See next bug for the other states..
Attachment #285594 - Attachment is obsolete: true
Attachment #285671 - Flags: review?(comrade693+bmo)
Blocks: 400617
Attachment #285671 - Flags: review?(dwitte)
Comment on attachment 285671 [details] [diff] [review] v3.1 OK, this makes a lot more sense when looking at the other bug too... r=sdwilsh
Attachment #285671 - Flags: review?(comrade693+bmo) → review+
dwitte is changing the eTLD api, so you may want to modify your patch accordingly.
eTLD api is revised, patch ahead.
Comment on attachment 285671 [details] [diff] [review] v3.1 >+ try { >+ // This might fail if it's an IP address or doesn't have >1 parts >+ eTLD = eTLDService.getBaseDomain(uri, 1); with the revised interface, you'll need to remove the |, 1|. also, naming the var |eTLD| is a little confusing since it's not necessarily the eTLD - how about calling it displayHost or somesuch? also, the string from getBaseDomain will be always utf8 at present, irrespective of the idn whitelist. this may or may not jibe well for display (esp since you're using asciiHost as the fallback... why not just the regular host, btw?). not sure if you want to do anything about that, just pointing it out... i'll hopefully fix that behavior in a followup bug. >+ } catch (e) { >+ // Default to the host name >+ eTLD = uri.asciiHost; >+ } r=me.
Attachment #285671 - Flags: review?(dwitte) → review+
Attached patch v3.2Splinter Review
(In reply to comment #36) > (From update of attachment 285671 [details] [diff] [review]) > >+ eTLD = eTLDService.getBaseDomain(uri, 1); > with the revised interface, you'll need to remove the |, 1| Removed. > |eTLD| is a little confusing since it's not necessarily the eTLD Yeah... -> displayHost ;) > also, the string from getBaseDomain will be always utf8 at present, > >+ eTLD = uri.asciiHost; Switched to .host to be consistent with eTLD service. Also, I suppose to note, the whole statlus line will crop right. approval1.9? and not M9? for now per mconnor's comments in bug 400616 comment #4: "defer for now, if we get to a decision point real soon on what UI changes to make for M9 we may reconsider this."
Attachment #285671 - Attachment is obsolete: true
Attachment #286144 - Flags: approval1.9?
Comment on attachment 286144 [details] [diff] [review] v3.2 a=drivers for after M9
Attachment #286144 - Flags: approval1.9? → approval1.9+
Whiteboard: [has patch][has reviews]
Priority: -- → P2
stephend: Do we have a litmus for this? "check that a completed download says something other than Done... hopefully size and TLD ;)" Checking in toolkit/locales/en-US/chrome/mozapps/downloads/downloads.dtd; /cvsroot/mozilla/toolkit/locales/en-US/chrome/mozapps/downloads/downloads.dtd,v <-- downloads.dtd new revision: 1.14; previous revision: 1.13 done Checking in toolkit/locales/en-US/chrome/mozapps/downloads/downloads.properties; /cvsroot/mozilla/toolkit/locales/en-US/chrome/mozapps/downloads/downloads.properties,v <-- downloads.properties new revision: 1.11; previous revision: 1.10 done Checking in toolkit/mozapps/downloads/content/download.xml; /cvsroot/mozilla/toolkit/mozapps/downloads/content/download.xml,v <-- download.xml new revision: 1.38; previous revision: 1.37 done Checking in toolkit/mozapps/downloads/content/downloads.js; /cvsroot/mozilla/toolkit/mozapps/downloads/content/downloads.js,v <-- downloads.js new revision: 1.99; previous revision: 1.98 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-litmus?
Resolution: --- → FIXED
(In reply to comment #39) > stephend: Do we have a litmus for this? "check that a completed download says > something other than Done... hopefully size and TLD ;)" Not yet, but we will, soon; in the meantime, verified FIXED using: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b2pre) Gecko/2007111204 Minefield/3.0b2pre
Status: RESOLVED → VERIFIED
https://litmus.mozilla.org/show_test.cgi?id=4855 in-litmus+ (I didn't really specify the testcases for size-rounding behavior, but I think it's not that big of a deal.)
Flags: in-litmus? → in-litmus+
Blocks: 408640
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: