qri-io / 2017-frontend

qri electron & web frontend
https://qri.io
MIT License
23 stars 7 forks source link

drag a file onto edit panels to populate #439

Open b5 opened 5 years ago

b5 commented 5 years ago

Dragging files over Qri to add them seems like a great way to get data into Qri quickly. I see a few routes to doing this. For now I think we should only support dropping files when on an edit screen, and I can see it going one of two ways:

  1. Use the current editor panel (body/dataset/viz, etc) to determine what the intent of the drag-in is. For example, if someone drags a file called dataset.json onto the meta
  2. Whenever a user drops a file over the editor, present a modal asking them what to do with is, possibly taking a guess at there they want it based on the file name and contents.

Should/can we use the /unpack endpoint to handle some of this?