Closed HoussemNasri closed 1 year ago
Can I work on this issue?
Sure, go ahead!
As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at.
Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback.
The deleteFile() method in LinkedFilesEditorViewModel calls delete() method in LinkedFileViewModel.
In the delete() method a new dialog opens every time when delete() method is called to delete a file.
should I move the code of delete() method to deleteFile() method and only use delete() method to delete the file from disk.
This way the the dialog will be called only once.
I don't think moving delete
to deleteFile
will fix the issue. The problem here is that whenever a delete event is detected (e.g. User hits the delete keystroke) we are calling deleteFile
for each selected file thus multiple dialogs show up. What you want to do is to call deleteFile
only once when a delete event occurs.
Also, you don't want to display the same dialog when user tries to delete one file vs multiple files.
Here is an example of what IntelliJ does when user tries to delete a file(s):
One File
Multiple Files
Code Hint Lookup this class and see what happens when a user hits the delete keystroke
Hi @HoussemNasri , I can work on this issue if there are no updates.I think the dialog box gui needs to be moved from LinkedFilesEditorViewModel to LinkedFilesEditor. Also do we want to list file names in case of deletion of multilple files ?
Hi @Ravitwr , I am currently working on this. I am sorry was not able to work on this last week due to some personal reasons.
i want to work on this issue. please assign me this issue. :)
@009-KumarJi Someone already started working on this, there is plenty of other good first issues you can pick from.
Hi, since there hasn't been much activity regarding this issue, can I please be assigned to this issue? I would like to work on this for a uni project.
JabRef 5.10--2023-04-02--1896c99 Windows 10 10.0 amd64 Java 19.0.2 JavaFX 20+19
As far as I can tell, this issue has been fixed in the most recent dev version. Well done! There are some other issues with deleting/adding files, but I will create a new issue for that problem, since I am not sure it is linked to the improvements made here.
Follow up to #8659
When multiple linked items are removed, JabRef will show the "Delete the selected file permanently from disk" dialogue for each item separately. E.g., if the user removes 3 linked items, the dialogue asking whether the respective file should be deleted from disk or should just be removed from entry will be shown 3 times.
This is not the expected behaviour - instead the user would expect to answer this dialogue once for all items that were selected. So if the user selects the option "Remove from entry" from the dialogue, then this should be applied to all linked entries that have been selected for removal (not for each entry separately).
Originally posted by @AEgit
To view the linked files of an entry, follow these steps: