-
Notifications
You must be signed in to change notification settings - Fork 442
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
Allow dropping external files into the notebook #2097
Conversation
Uffizzi Preview |
Also note that the flow is a bit broken if the runtime is not started. We add the file, then we ask to start the runtime, but then we never go back to the process file. Should we ask to start the runtime before we add it? Also, should we allow the file to be added directly to the "files sidebar"? Also, what about elixir and markdown files? Those don't need to be added to the files sidebar, as they can just become regular markdown or code cells. Thoughts? |
I see, though "Insert" generally is about putting something in the notebook content, we insert images, cells. If you insert image as markdown cell, it's not really processing, so I'm not really sure.
The errors are there, but LV keeps the errors hidden until the file is changed on the client. I added event dispatch to simulate input.
Good call.
No strong opinion, the user can always just skip the file action and this way we teach them it's an option?
Honestly, I don't think dropping whole elixir or markdown file into a single cell is particularly useful. |
So "Embed file" is safer? Or maybe something also mentioning cells? as we are creating cells based on files? Or "File tasks" / "File suggestions" / "Cell suggestions from files"?
It is a bit contradictory because they have to choose a location, only to discard it. If supporting drag and drop into the files sidebar is not a big deal, then I would support it for convenience. :) Agreed on the rest. |
"Suggested actions"?
Should we support dropping it anywhere in the notebook, or should we automatically expand sidebar and show an area there? |
Sounds good to me!
Whatever works for you. |
Alright, I went with the additional area: dnd_files.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! One last question: did you make the border of the DND (both in the sidebar and in the notebook) thicker and darker, compared to our usual borders, by design? If not, then we should probably align them. :)
@josevalim yeah, it matches DND border in the other place we already had and it's both stronger and thicker :) |
dnd_external.mp4