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

Remove file drag drop 😟 #1780

Merged
merged 1 commit into from
Jan 4, 2022
Merged

Remove file drag drop 😟 #1780

merged 1 commit into from
Jan 4, 2022

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Dec 22, 2021

Reverts #707

It has not been working well for a long time, and there is no clear path to make it work well.

Small problems:

Larger problems, also see #950

  1. Where do we store the file? Right now we create a directory for the notebook assets, but this makes reproducibility tricky. Renaming and relocating was difficult. If we were a cloud service like nextjournal.com, then we could store files online and solve all of these problems, but for a local notebook it is more difficult.
  2. The generated code imports a package, but if you import the same file type twice, then the package is simply imported twice, triggering a MultipleDefinitionsError. See File drag-and-drop functionality - put imports into separate Pluto cell #1275
  3. Dropping a file into a cell did not make much sense, except when dragging an image into markdown, but that did not work.

Possible solutions are:

  1. Embed a DataSets.toml in the notebook file (just like Project and Manifest) and use a base64 driver to store files directly in the notebook file. (Or become a cloud service.)
  2. Insert the package import in another cell if it does not exist yet.
  3. Smarter UI, maybe a centralized "files" panel with all uploaded files, and some inline CM widget to reference them.

We can always revisit this, and revert this PR to continue working on the feature.

Fix #1275 fix #1684 fix #950

@github-actions
Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="remove-file-drag-drop")
julia> using Pluto

@j-fu
Copy link
Contributor

j-fu commented Dec 22, 2021

Yeah, now I can move cells in chrome. Tanks!

@fonsp fonsp linked an issue Dec 22, 2021 that may be closed by this pull request
@fonsp fonsp marked this pull request as ready for review December 22, 2021 23:48
@pankgeorg pankgeorg merged commit 210a0e0 into main Jan 4, 2022
@pankgeorg pankgeorg deleted the remove-file-drag-drop branch January 4, 2022 20:33
@fonsp fonsp mentioned this pull request Feb 23, 2022
8 tasks
@fonsp fonsp linked an issue Mar 25, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants