W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2011

[whatwg] Drag-and-drop folders/files support with directory structure using DirectoryEntry

From: Glenn Maynard <glenn@zewt.org>
Date: Thu, 17 Nov 2011 15:28:44 -0500
Message-ID: <CABirCh8K0=MYJQG32O6B9vrZx98EGvAaJdeKd_7G86Bc66W-Pg@mail.gmail.com>
On Thu, Nov 17, 2011 at 1:18 PM, Jonas Sicking <jonas at sicking.cc> wrote:

> I'm still not convinced that providing an API which provides
> asynchronous traversal of the files is going to lead to a better user
> experience. In all scenarios that I can think of, the page which
> received the drop is going to want to traverse the whole directory
> tree anyway.


I gave lots of examples.  Those and a few more: accessing Subversion and
Git repositories (you may only care about a few specific files within
.svn/.git, and not at all about the working copy surrounding them); general
file browsers; skipping subdirectories you know you're not interested in
(eg. .svn in a source code analysis tool); queueing tasks (begin uploading
asynchronously when the user drags in a directory; the user can drag in
more directories immediately without waiting).

So much effort has been made to move towards fully asynchronous UI that
making this synchronous would be a major loss, and this also leads very
nicely towards a read-write interface.

I think there's an even bigger problem with doing traversal in advance.
You can't wait until the drag completes (eg. the mouse is released) before
performing the traversal; it needs to be complete before the first
dragstart event can be fired, to fill in DataTransfer.  Even if the
traversal is lazy, any code which triggers the traversal will force the
user to sit there holding down the mouse button, waiting for it to complete.

-- 
Glenn Maynard
Received on Thursday, 17 November 2011 12:28:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:09 UTC