BrightspaceUILabs / file-uploader

Polymer-based web component for D2L file uploader
Apache License 2.0
4 stars 6 forks source link

Drop zone should be outlined area instead of entire document #43

Open zwilson2 opened 7 years ago

zwilson2 commented 7 years ago

I would like the option to be able to make the outlined drop zone the only area the file can be dropped rather than the entire page.

dbatiste commented 7 years ago

I think the "file drop" capability could be factored into a behavior that can be attached to any HTML element. I think this would better enable what you are describing, and many other use cases.

dlockhart commented 7 years ago

@nicolebezaire, do you know why this originally was built to have the entire window be the drop zone? Would switching it to just be the outlined area be a problem, or do we need to introduce an configurable option?

ianmclean2011 commented 7 years ago

@dlockhart I believe this was originally built to have the entire window be the drop zone because that's the functionality that we wanted for the import question dialog, and so it was built that way for our team's use of it. It would probably be a good idea though for there to be an option allowing the user to decide whether they want that or not.

nicolebezaire commented 7 years ago

@dlockhart -- I think this would make best sense as an option to support cases where there might be more than one uploader on the page. The concept of supporting a drop anywhere on the page is primarily about ease of use (why force the precision of hitting a drop target when dragging a file onscreen demonstrates a clear intention?) This is also becoming a bit of a pattern on the web where sites like imgur and Dropbox support a file drop anywhere on the page for upload.