Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File drop highlight #83

Merged
merged 9 commits into from
Jun 15, 2016
Merged

File drop highlight #83

merged 9 commits into from
Jun 15, 2016

Conversation

vincchan
Copy link
Member

@vincchan vincchan commented Jun 13, 2016

Hey @nextcloud/designers

I'm creating this PR to let you know that I'm working on a visual indication for the file-upload by drag&drop and wanted your opinion on the current status. I also updated the File Upload Plugin to 9.12.5 (apps/files/js/jquery.fileupload.js) to support dragleave event.

We have, like many services, the ability to drag and drop a file directly from the filesystem of the OS to the browser to upload it to Nextcloud, though we do not currently intuitively show it in the UI.

This fixes it.

  • Improve UI further based on feedback
  • Adjust CSS to make it work for all sizes
  • Fix jQuery Plugin to make it uploading directly into a folders work again

screen recording 2016-06-13 at 11 16 pm

@vincchan vincchan self-assigned this Jun 13, 2016
@MorrisJobke
Copy link
Member

@vincchan Generally I like this :) Could you also try to include a different indicator if the file is dropped into a subfolder (then only highlight the row. Beside that this rocks 🚀 Thanks!

@MorrisJobke MorrisJobke added this to the Nextcloud 10 milestone Jun 13, 2016
@vincchan
Copy link
Member Author

@MorrisJobke Good point! I just noticed though that by upgrading the jQuery Plugin it does not let you upload files into folders directly anymore. Need to have a look at that.

@mikebabb
Copy link
Member

@vincchan This looks great! Simple, intuitive, exactly as it ought to be. Nice work!

@williambargent
Copy link
Member

I agree with @MorrisJobke it would be great to grab directly into subfolders.
Is there currently the ability to drag file which have been uploaded to move in and out of folders? That would be useful.

@vincchan
Copy link
Member Author

@williambargent The functionality to upload to folders directly is already present, I just broke by the updated jQuery Plugin which I now fixed. I recommend you to open up an issue for your request :)

@jancborchardt
Copy link
Member

Nice @vincchan! You could also change the emptycontent icon to folder-drag-accept. Or when dragged into a subfolder, change that icon.

@vincchan
Copy link
Member Author

@MorrisJobke @jancborchardt thanks for the feedback! It now detect when the user is dragging a file over a directory and changes the thumbnail to folder-drag-accept.svg

screen recording 2016-06-15 at 01 11 am

@williambargent
Copy link
Member

👍

@jancborchardt
Copy link
Member

It now detect when the user is dragging a file over a directory and changes the thumbnail to folder-drag-accept.svg

Very nice! Maybe something for a different pull request, but for completeness sake, can you also make sure this happens for:

  • the empty content icon for an empty folder
  • the folder icons in a folder shared by link
  • the empty content icon for an empty folder shared by link :)

}

.dropping-to-dir .thumbnail {
background-image: url(/nextcloud/core/img/filetypes/folder-drag-accept.svg)!important;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded URL ;) And the file is also missing in this PR ;)

@jancborchardt
Copy link
Member

Please don’t duplicate the file »folder-drag-accept.svg« ;)

Best would be to create a class in core/css/icons.css like so:

.icon-filetype-folder-drag-accept {
    background-image: url('../img/filetypes/folder-drag-accept.svg');
}

Then simply the class can be switched.

@vincchan vincchan added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jun 15, 2016
@vincchan vincchan changed the title [WIP] File drop highlight File drop highlight Jun 15, 2016
@vincchan
Copy link
Member Author

@nextcloud/designers alright PR is ready to review. Thanks for all the feedback!

Here is a demo

@vincchan
Copy link
Member Author

@jancborchardt I'll open up a PR for the empty content icons when I get around to do that :)

@MorrisJobke
Copy link
Member

I tested this and it works really nice :) Thanks for this

Tested in Chrome, Firefox and Safari

@MorrisJobke
Copy link
Member

👍

@MorrisJobke
Copy link
Member

@Mar1u5 Do you want to review this nice feature? :)

@MariusBluem
Copy link
Member

Nice 👍

@MariusBluem MariusBluem merged commit d9be370 into master Jun 15, 2016
@MariusBluem MariusBluem deleted the file-drop-highlight branch June 15, 2016 15:36
@LukasReschke
Copy link
Member

Awesome stuff, @vincchan!!!! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews design Design, UI, UX, etc. enhancement feature: filesystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants