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

Write Data Drag & Drop Polish #1897

Merged
merged 11 commits into from
Aug 18, 2017
Merged

Write Data Drag & Drop Polish #1897

merged 11 commits into from
Aug 18, 2017

Conversation

alexpaxton
Copy link
Contributor

@alexpaxton alexpaxton commented Aug 17, 2017

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Rebased/mergable
  • Tests pass
  • Sign CLA (if not already signed)

Connect #1894

The Problem

  • After community PR the interactions surrounding the Drag & Drop file upload became a little strange

The Solution

  • After examining the problem the PR was attempting to fix, I reworked the interactions
  • Invisible drag indicator no longer obscures the upload button
  • Added a graphic to communicate the ability to drag & drop to the user
  • Manual entry no longer obscured
  • User can click entire file upload div to trigger file browser, has a hover state to indicate this
  • User can Cancel after selecting a file which resets the state of the file uploader
  • Drag over state and file upload hover have matching styles, significant visual change so that the user knows at a glance the system is responding

Preview

new-style--file-upload-click
new-style--file-upload-drag

@jaredscheib jaredscheib self-requested a review August 17, 2017 20:49
Copy link
Contributor

@jaredscheib jaredscheib left a comment

Choose a reason for hiding this comment

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

Definitely an improvement, and happy to merge, but some ideas below as well for further possible improvement:

  1. What I'm missing now personally is the nice blue hover effect on file drag and drop, but maybe this is what made the styles clash? I liked having a bit more of a visual indication -- the blue was interesting for this purpose -- but maybe some other kind of (blue) icon could serve that purpose, something that indicates that you've successfully dragged something into the droppable area?

  2. Also, is it possible to animate out (fade) of the drag-over state, like we animate in? Moving the file out of the area makes everything toggle instantly back to initial state, whereas dragging in is an animated fade.

  3. I'd change the copy of the button to Choose a Different File to Upload, as another implies to me that you can upload multiple, whereas this only allows a single file at a time.

alexpaxton and others added 6 commits August 17, 2017 15:04
- Largely mimicking the pattern featured in Dropzone.js (I feel this is
a great pattern for file drag & drop)
- Got rid of the button for uploading, change copy to read “Drop a file
here or click to upload”
- Made entire file upload div clickable
- After a file has been uploaded:
  - Submit button has been moved inside the div
  - Added a “Cancel” button and method to reset the state of the modal
- Hover state of clickable area matches drag-over state
@alexpaxton
Copy link
Contributor Author

Did some research on UI patterns for this sort of interaction, decided that http://www.dropzonejs.com/ has a pretty sweet interaction that is worth mimicking. Probably went down a rabbit hole (that was full of yaks in bikesheds), but was a good exploration.

Ended up simplifying the UI a bunch; the whole file upload <div> is clickable, and there’s a cancel button which resets the state of file upload. I made the hover state and drag-over state match to associate the two

@alexpaxton alexpaxton merged commit 9b4f1ee into master Aug 18, 2017
@alexpaxton alexpaxton deleted the file-drag-polish branch August 18, 2017 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants