jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Show a progress indicator when dragging and dropping PDF files to JabRef

Open claell opened this issue 3 years ago • 16 comments
trafficstars

Is your suggestion for improvement related to a problem? Please describe. When I drag a PDF document into JabRef, it often takes time for it to process it. I also have experienced exceptions for that operation.

Describe the solution you'd like In general, I like to see some indicator that something is going on in the background (especially when dragging more than one file to the window).

Additional context I think that Citavi has this (might not be ideal, either, but at least it is there).

claell avatar May 01 '22 19:05 claell

@Siedlerchr another useful label for this is probably ui.

claell avatar May 09 '22 10:05 claell

Apparently, there is already a UI element for background tasks. Possibly, that can be extended. grafik

claell avatar May 09 '22 10:05 claell

Hi , I'm a new contributor — could you please give me a permission so I can view and modify the code ?

Yu0404531 avatar Oct 23 '22 13:10 Yu0404531

Ues “Jabref/logic/pdg/search/indexing/indexingTaskManager “ UI to Display “Jabref/gui/util ”TableRowFactory process bar. It this way ok?

Yu0404531 avatar Oct 29 '22 08:10 Yu0404531

Could I be assigned this task?

Ravitwr avatar Jan 19 '23 04:01 Ravitwr

@Ravitwr thanks for your enthusiasm and commitment to JabRef. I have seen that you asked to be assigned to multiple issues. Just give a word, if you think you will not manage to work on or fix all of them, then I will unassign you. That way other people will know, the issue is "free to take"

ThiloteE avatar Jan 19 '23 11:01 ThiloteE

Hi @claell , I tried dragging and dropping some files (30+) at the same. The process was almost instantaneous. Are there any specific files which causes problem.

Ravitwr avatar Jan 19 '23 20:01 Ravitwr

@Ravitwr Thanks for looking into this. I don't know specific files right now, let me check.

claell avatar Jan 21 '23 16:01 claell

The behavior seems to have improved from 5.7 to 5.9. I still had 5.7 installed and there, if I saw it correctly, the GUI was frozen after dropping something there. After updating to 5.9 later, the GUI is no longer frozen, and potentially, also the addition of the entry is faster (might just be subjective).

claell avatar Jan 21 '23 16:01 claell

Just tested again with a larger bunch of over thirty book PDFs. There, it really takes a long time (still not finished, in fact). Each entry takes from few seconds to maybe even half a minute to be added subsequently. The books sometimes have several hundred pages.

claell avatar Jan 21 '23 16:01 claell

Let me know if you need more specific details in order to be able to reproduce.

claell avatar Jan 21 '23 16:01 claell

@claell Thanks for the input. Earlier I was trying to enter the files which didn't had the metadata therefore it was much faster. I am able to reproduce the problem with some other files. Will try to add the progress indicator.

Ravitwr avatar Jan 23 '23 18:01 Ravitwr

Pre-condition to reproduce is to enable online-processing of PDFs:

Ensure that using GROBID is enabled:

image

koppor avatar Apr 08 '24 21:04 koppor

Implementation hint:

  • One needs to create a Callable (e.g, () -> someMethod())
  • This is then wrapped using BackgroundTask: BackgroundTask.wrap(callable)
  • I assume, this issue is about importing, then public ImportEntriesDialog(BibDatabaseContext database, BackgroundTask<ParserResult> task) { can be used.

koppor avatar Apr 08 '24 21:04 koppor