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

Enable the option to disable drag and drop via url query paramenter #27

Open
CS76 opened this issue Jun 11, 2022 · 8 comments
Open

Enable the option to disable drag and drop via url query paramenter #27

CS76 opened this issue Jun 11, 2022 · 8 comments
Assignees

Comments

@CS76
Copy link
Member

CS76 commented Jun 11, 2022

Can we disable drag and drop or file choose option on the nmrium via URL query parameter like the following
https://nmriumdev.nmrxiv.org?standalone=true

File import should work normally in other panels like molecules etc.

@hamed-musallam
Copy link
Collaborator

@CS76

We can capture the drag and drop event at the level of the wrapper to prevent the drag and drop file but we can not prevent the file chooser from the menu unless we handle it at the level of the NMRium.

what is the goal of this issue?

@CS76
Copy link
Member Author

CS76 commented Jun 12, 2022

When data is deposited (within a repository), submitters and other repository users would like to analyse the spectra using NMRium, within the scope of that particular study/experiment. In that web view, the context is to load the spectra (from repository storage), let the user analyse the spectral data, and save the changes.

Allowing the user to drag and drop new files will cause discrepancies in the data (spectra will no longer match the original machine output as the user dragged and dropped new files and continued editing).

To avoid this, we would like to disable drag and drop and let the user load the data from the storage (programmatically), edit, analyse manually and save the changes automatically.

@CS76
Copy link
Member Author

CS76 commented Jun 12, 2022

NMRium issue: cheminfo/nmrium#1582

@hamed-musallam
Copy link
Collaborator

@CS76

you will allow only to edit the spectrum, does that means we have also to prevent deleting the spectra?

@CS76
Copy link
Member Author

CS76 commented Jun 13, 2022

Yes, we would like to disallow users to delete the spectra. If the user wants to replace the spectra they need to upload the new spectra or delete the experiment as such.

@NishaSharma14 NishaSharma14 moved this to 📝Backlog nmrXiv-app & nmrium-react-wrapper in nmrXiv Jun 22, 2022
@NishaSharma14
Copy link
Collaborator

Related to #29

@NRayya
Copy link
Collaborator

NRayya commented Dec 16, 2022

Currently, (in nmrXiv dev), when the user drags a file to the NMRium view, a message appears saying "drop your files here", then a loading symbol appears, then nothing happens. Although the intended function works fine, I think it is viewed wrongly to the user and it might be confusing
screen-capture.webm

What do you think @CS76 , @hamed-musallam

@NRayya
Copy link
Collaborator

NRayya commented Jan 4, 2023

Related to cheminfo/nmrium#1582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📝Backlog nmrXiv-app & nmrium-react-wrapper
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants