parse-community / parse-dashboard

A dashboard for managing Parse Server
https://parseplatform.org
Other
3.75k stars 1.39k forks source link

File upload with drag & drop #2143

Open mtrezza opened 2 years ago

mtrezza commented 2 years ago

New Feature / Enhancement Checklist

Current Limitation

Uploading a file in the data browser is only possible by opening a file picker dialog. That can be cumbersome, because one has to navigate to the file also if the file is already accessible in a finder window.

Feature / Enhancement Description

Allow to upload a file by dragging it into the file field in the data browser.

Example Use Case

n/a

Alternatives / Workarounds

n/a

parse-github-assistant[bot] commented 2 years ago

Thanks for opening this issue!

patelmilanun commented 1 year ago

what would be the best way to implement it. I have 2 ideas in mind.

  1. On double click of file input field there will be a dialog from there user can choose a file or drop the file there.
  2. On double click of file input field we continue the flow we have but also if user has dragged some file he can move his cursor to that field with the file dragged and simply drop it there.
mtrezza commented 1 year ago

On double click of file input field there will be a dialog from there user can choose a file or drop the file there.

Not sure this works, the file picker is a modal dialog from the browser, so how would you allow to drop a file?

On double click of file input field we continue the flow we have but also if user has dragged some file he can move his cursor to that field with the file dragged and simply drop it there.

That sounds more probable. The control should detect a drop as well as a click and behave accordingly.

patelmilanun commented 1 year ago

Oh I think u got my 1st point wrong. I'm talking about providing a custom upload dialog with option to drag and drop as well as select a file so its 2 click process. I have attached the screenshot of what I'm thinking.

But this approach requires to create a custom dialog and for that we need an UI which aligns with the current design. So what are your thoughts on this?

image

mtrezza commented 1 year ago

Thanks for the screenshots, got it. I think the issue with the dialog is that it requires double the work to upload a file, two clicks instead of 1 click (when not using drop-drop). For someone who is using that workflow a lot the dialog makes it more cumbersome. That's my only concern.

Palakash27 commented 1 year ago

Screenshot 2023-04-15 at 3 28 18 AM

So what do you suggest? The user should be able to upload the file directly from the data browser via drag OR double-click ??

mtrezza commented 1 year ago

Well, the feature request is to add drop/drop functionality. The easiest way to do that is to just drop a file in the cell in the data browser. If the cell already has a file I think there should be a dialog to confirm that the file will be overwritten.

The question is whether adding this functionality requires to add a whole new modal dialog. Even though the dialog looks nice and may be the "formally" more correct UI, it requires to navigate an additional modal dialog to upload a file, instead of just the double-click.

patelmilanun commented 1 year ago

So, I think the drop to cell with confirmation for overwrite would be a better choice in terms of not disturbing much of an existing flow and thus we can select that approach for now.

mtrezza commented 1 year ago

Yes, and it should take less work to implement I guess than a new modal dialog.

I also think that at some point in the future we way rework the whole dashboard from the ground up with a more modern framework that allows touch interfaces, etc.

Palakash27 commented 1 year ago

Awesome. I'll start to work on it if no one is working on the same.

mtrezza commented 1 year ago

Sure, go for it!