pinnwand icon indicating copy to clipboard operation
pinnwand copied to clipboard

Move the drag and drop functionality into the textarea

Open millefalcon opened this issue 1 year ago • 6 comments

Hi folks, I was wondering if we can move the new awesome drag and drop file functionality into the text area. I was thinking something similar like in the image shown, but please let me know if I need to expand on this more.

image

Thanks

millefalcon avatar Jul 16 '23 05:07 millefalcon

@supakeen @ryantam626 Please let me know what you folks think

millefalcon avatar Jul 16 '23 06:07 millefalcon

I think it's a good idea, there's just a few things to consider:

  1. Does dropping a file on an input allow multi-file (and if so, what happens?).
  2. What to do if there's already content in the input?

supakeen avatar Jul 16 '23 08:07 supakeen

Oh, I didn't realize about multi-file. But I guess for,

  1. Does dropping a file on an input allow multi-file (and if so, what happens?).

We can add the subsequent files creating new parts/file sections.

  1. What to do if there's already content in the input?

I'm thinking, we can do a dialog prompt asking the user, if they really mean to paste over the text.

Now, I'm wondering what should happen let's say, if

  1. there are 2 file sections, and now we are trying to drag and drop 2 files over the first file section. Should the new files be added before the already existing second file ?
  2. What if the text is only added in the new(second or after that) file section, as in the first file part has no text for some reason, and the user tried to drag and drop 10 or more files(accidentally?) ? Now since, there're no text in that area, there won't be any dialog prompt, but can this be solved by adding a prompt for drag and dropping onto a textarea where there exists subsequent file sections with text in them ?

I realize the feature request got complicated real fast 😓

millefalcon avatar Jul 16 '23 09:07 millefalcon

I don't have strong feelings about this.

One comment: if we proceed with this, we will probably still need a button (or a link) somewhere for opening file upload dialog for accessibility reasons, since not everyone is able to drag and drop files. And we will need to consider UX from that angle as well.

ryantam626 avatar Jul 17 '23 13:07 ryantam626

Yea, I'd do it in 'both' kind of way.

supakeen avatar Jul 17 '23 13:07 supakeen

Oh yes, definitely both flows :+1:

millefalcon avatar Jul 17 '23 13:07 millefalcon