Closed
Bug 830064
Opened 12 years ago
Closed 12 years ago
The new downloads view in the Places Library does not support drag and drop
Categories
(Firefox :: Downloads Panel, defect)
Tracking
()
VERIFIED
FIXED
Firefox 21
People
(Reporter: alice0775, Assigned: asaf)
References
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
21.90 KB,
patch
|
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Build Identifier:
http://hg.mozilla.org/mozilla-central/rev/1761f4a9081c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130112 Firefox/21.0 ID:20130112030947
Drag & drop links into new downloads manager to download files.
Firefox18 can do that.
But Aurora20.0a2 and Nifgtly21,0a1 cannot,
This is regression, I think.
Steps to reproduce.
1. Open any page
2. Open Downloads (Tools > Downloads Ctrl+J)
3. Drag & drop links into the new downloads manager
Actual results:
Not allowed to drop link
Cannot to save
Expected results:
Allowed to drop links and saved to folder
![]() |
Reporter | |
Comment 1•12 years ago
|
||
Err
S/Firefox18 can do that/Firefox17 can do that/
![]() |
Reporter | |
Updated•12 years ago
|
tracking-firefox20:
--- → ?
tracking-firefox21:
--- → ?
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mano
Comment 2•12 years ago
|
||
I don't think this blocks the feature since you can drop links on the button that is always visible in the window.
Surely it's expected that we keep supporting that in the view at some time.
Comment 3•12 years ago
|
||
the view code lives in downloads component and it's easier to track this there for now.
Component: Bookmarks & History → Downloads Panel
Comment 4•12 years ago
|
||
Can we get confirmation if this is indeed a regression and then also what the user impact is here - are we breaking a popular use case?
Keywords: regressionwindow-wanted
![]() |
Reporter | |
Comment 5•12 years ago
|
||
I mean this is feature regression
Steps to reproduce:
1. Open any page
2. Open Downloads (Tools > Downloads Ctrl+J)
3. Drag & drop links into the new downloads manager
Regression window
Fails due to Bug830066:
http://hg.mozilla.org/integration/mozilla-inbound/rev/661960a9cf89
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20121228 Firefox/20.0 ID:20121228014553
Bad(lack of drag&drop feature):
http://hg.mozilla.org/integration/mozilla-inbound/rev/9119f282e0c0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20121228 Firefox/20.0 ID:20121228032951
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=661960a9cf89&tochange=9119f282e0c0
Comment 6•12 years ago
|
||
it's a regression (tracked in Bug830066) for the old manager, a not-yet-implemented functionality for the new manager, I don't think it's a popular use-case, many drag&drop actions are undiscoverable per definition and it's often easier to drag the link to the downloads button, or to alt+click, or to right click and save as, than to drag it across different windows.
Assignee | ||
Updated•12 years ago
|
Keywords: regressionwindow-wanted → regression
Summary: Drag & drop links into new downloads manager to download files → The new downloads view does not support drag and drop
Assignee | ||
Comment 7•12 years ago
|
||
I don't like it much, but it works just as good as the old DM did.
Attachment #702775 -
Flags: review?(mak77)
Comment 8•12 years ago
|
||
Comment on attachment 702775 [details] [diff] [review]
port the old dm functionality
Review of attachment 702775 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/downloads/content/allDownloadsViewOverlay.js
@@ +39,5 @@
> "downloadsCmd_openReferrer", "downloadsCmd_clearDownloads"];
>
> const NOT_AVAILABLE = Number.MAX_VALUE;
>
> +function DownloadURL(aURL, aFileName) {
javadoc, please.
and specify that aFileName is optional
@@ +44,5 @@
> + // For private browsing, try to get document out of the most recent browser
> + // window, or provide our own if there's no browser window.
> + let browserWin = RecentWindow.getMostRecentBrowserWindow();
> + let initiatingDoc = browserWin ? browserWin.document : document;
> + saveURL(aURL, aFileName, null, true, true, undefined, initiatingDoc);
trailing space
off-topic: this saveURL API is totally unreadable! we should modify it to also accept an object as second param!
@@ +699,5 @@
> matchesSearchTerm: function DES_matchesSearchTerm(aTerm) {
> if (!aTerm)
> return true;
> aTerm = aTerm.toLowerCase();
> + return this.getDownloadMetaData().displayName.toLowerCase().indexOf(aTerm) != -1 ||
ha, this time I'm right this should use .contains()!
@@ +704,1 @@
> this.downloadURI.toLowerCase().indexOf(aTerm) != -1;
as well as here
@@ +1491,5 @@
> +
> + onDragStart: function DPV_onDragStart(aEvent) {
> + let selectedItem = this._richlistbox.selectedItem;
> + if (!selectedItem)
> + return;
worth a comment we don't support multiple selection drags (and just fallback to the first selected item, that is what I suppose selectedItem does?)
@@ +1497,5 @@
> + if (!("filePath" in metaData))
> + return;
> + let file = new FileUtils.File(metaData.filePath);
> + if (!file.exists())
> + return;
sigh, we need async dragstart!
@@ +1524,5 @@
> + // redownload already downloaded file.
> + if (dt.mozGetDataAt("application/x-moz-file", 0))
> + return;
> +
> + let url = dt.getData("URL");
I think you can use
let name = {};
let url = Services.droppedLinkHandler.dropLink(aEvent, name);
if (url)
DownloadURL(url, name.value)
Attachment #702775 -
Flags: review?(mak77) → review+
Comment 9•12 years ago
|
||
Comment on attachment 702775 [details] [diff] [review]
port the old dm functionality
Review of attachment 702775 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/downloads/content/allDownloadsViewOverlay.js
@@ +39,5 @@
> "downloadsCmd_openReferrer", "downloadsCmd_clearDownloads"];
>
> const NOT_AVAILABLE = Number.MAX_VALUE;
>
> +function DownloadURL(aURL, aFileName) {
javadoc, please.
and specify that aFileName is optional
@@ +44,5 @@
> + // For private browsing, try to get document out of the most recent browser
> + // window, or provide our own if there's no browser window.
> + let browserWin = RecentWindow.getMostRecentBrowserWindow();
> + let initiatingDoc = browserWin ? browserWin.document : document;
> + saveURL(aURL, aFileName, null, true, true, undefined, initiatingDoc);
trailing space
off-topic: this saveURL API is totally unreadable! we should modify it to also accept an object as second param!
@@ +699,5 @@
> matchesSearchTerm: function DES_matchesSearchTerm(aTerm) {
> if (!aTerm)
> return true;
> aTerm = aTerm.toLowerCase();
> + return this.getDownloadMetaData().displayName.toLowerCase().indexOf(aTerm) != -1 ||
ha, this time I'm right this should use .contains()!
@@ +704,1 @@
> this.downloadURI.toLowerCase().indexOf(aTerm) != -1;
as well as here
@@ +1491,5 @@
> +
> + onDragStart: function DPV_onDragStart(aEvent) {
> + let selectedItem = this._richlistbox.selectedItem;
> + if (!selectedItem)
> + return;
worth a comment we don't support multiple selection drags (and just fallback to the first selected item, that is what I suppose selectedItem does?)
@@ +1497,5 @@
> + if (!("filePath" in metaData))
> + return;
> + let file = new FileUtils.File(metaData.filePath);
> + if (!file.exists())
> + return;
sigh, we need async dragstart!
@@ +1524,5 @@
> + // redownload already downloaded file.
> + if (dt.mozGetDataAt("application/x-moz-file", 0))
> + return;
> +
> + let url = dt.getData("URL");
I think you can use
let name = {};
let url = Services.droppedLinkHandler.dropLink(aEvent, name);
if (url)
DownloadURL(url, name.value)
Assignee | ||
Comment 10•12 years ago
|
||
I also removed the restriction (enforced by a js exception) not to call getDownloadMetaData for inactive shells. We forgot we do that during search.
I'll check this in as soon as inbound reopens.
Attachment #702775 -
Attachment is obsolete: true
Assignee | ||
Comment 12•12 years ago
|
||
Comment 13•12 years ago
|
||
Since this is for the old manager and not a popular use case, not tracking but would consider a nomination for uplift if the fix is low risk.
Comment 14•12 years ago
|
||
(In reply to Lukas Blakk [:lsblakk] from comment #13)
> Since this is for the old manager and not a popular use case, not tracking
> but would consider a nomination for uplift if the fix is low risk.
This is for the new manager!
Assignee | ||
Comment 15•12 years ago
|
||
Comment on attachment 702891 [details] [diff] [review]
add back the name variable
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Downloads panel feature
User impact if declined: missing UI functionality comparing to the old download manager.
Testing completed (on m-c, etc.): tbd, but there are actually no tests for this code area yet.
Risk to taking this patch (and alternatives if risky): limited to the feature.
String or UUID changes made by this patch: none.
Attachment #702891 -
Flags: approval-mozilla-aurora?
Assignee | ||
Updated•12 years ago
|
Summary: The new downloads view does not support drag and drop → The new downloads view in the Places Library does not support drag and drop
Comment 17•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Comment 18•12 years ago
|
||
This also fixes a regression in the Library, so approval is also required for proper functionality.
Updated•12 years ago
|
Blocks: ReleaseDownloadsPane
Updated•12 years ago
|
Attachment #702891 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 19•12 years ago
|
||
We've taken the fix, and this is a regression from the old manager, so might as well track.
Comment 20•12 years ago
|
||
status-firefox20:
--- → fixed
status-firefox21:
--- → fixed
Comment 21•12 years ago
|
||
Verified as fixed on the latest Nightly and Aurora - the new downloads view in Library supports drag and drop.
Verified on Windows 7, Ubuntu 12.04 and Mac OS X 10.8:
Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20130128 Firefox/21.0 Build ID:20130128030943
Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20130128 Firefox/20.0 Build ID:20130128042018
Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20130128 Firefox/21.0 Build ID:20130128030943
Mozilla/5.0 (X11; Linux i686; rv:20.0) Gecko/20130123 Firefox/20.0 Build ID:20130128042018
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20130128 Firefox/21.0 Build ID:20130128030943
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20130128 Firefox/20.0 Build ID:20130128042018
You need to log in
before you can comment on or make changes to this bug.
Description
•