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

Add drag and drop file uploads #19086

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add drag and drop file uploads #19086

wants to merge 1 commit into from

Conversation

lukeheath
Copy link
Member

@lukeheath lukeheath commented May 16, 2024

@noahtalerman I had a little time to add drag-and-drop uploads to the UI today. Check out https://www.loom.com/share/ea8e0fa9cefa4a9d8c2d4c1c504a742e for a demo.

It's only applied to one file upload box, but if you think this is worthwhile, I will update the others and put in a proper story for processing.

@lukeheath lukeheath requested a review from a team as a code owner May 16, 2024 20:37
@lukeheath lukeheath marked this pull request as draft May 16, 2024 20:37
Copy link
Contributor

@jacobshandling jacobshandling left a comment

Choose a reason for hiding this comment

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

Awesome, looks and works great! Just a stray log and one question – when I drag a script to the uploader, it uploads immediately. Do we want some sort of confirmation before going ahead with the upload?


function RenderDragDrop() {
const handleChange = (files: FileList) => {
console.log("files: ", files);
Copy link
Contributor

Choose a reason for hiding this comment

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

stray log

@noahtalerman
Copy link
Member

@lukeheath love it! Looks great.

Definitely create a story w/ the ~dogfood label. I think throw it on the :product board. Can skip feature fest.

What happens when you drag multiple valid files in their? What multiple files with one invalid file?

I think we can dig into these during drafting.

Heads up that the Loom is only capturing your Chrome windows. So we can't see the "drag file from Finder" interaction in the vid.

@lukeheath
Copy link
Member Author

@noahtalerman Cool! I created a story here, assigned to you, and placed in the "Prioritized" column on the drafting board: #19128

As for file uploads, currently, the UI only supports single file uploads, but it wouldn't be difficult to support multiple files (in both file picker and drag and drop) if we want.

@noahtalerman
Copy link
Member

the UI only supports single file uploads, but it wouldn't be difficult to support multiple files (in both file picker and drag and drop) if we want.

@lukeheath got it.

Hey @marko-lisica, @mike-j-thomas, @rachaelshaw, heads up we filed a story (#19128) to add drag-and-drop.

Question: If we also add support for multiple file upload, what do we expect to happen if I drag 3 valid files and 1 invalid file. Do the 3 get uploaded? Do I see success message? Error message?

I'm sure there are patterns we can borrow from other apps.

@mike-j-thomas
Copy link
Member

@noahtalerman, (I wasn't sure whether to post this here or in the story (#19128). It's been some time since I've done a drag-and-drop, but I expect it would be something like this:

drag-and-drop-multiple-files-1
drag-and-drop-multiple-files-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants