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

Dropping a PDF on an entry should be consistent #121

Closed
koppor opened this issue Aug 23, 2015 · 15 comments
Closed

Dropping a PDF on an entry should be consistent #121

koppor opened this issue Aug 23, 2015 · 15 comments
Assignees
Labels

Comments

@koppor
Copy link
Member

koppor commented Aug 23, 2015

When one wants to attach a PDF to an entry and move the PDF to the local data base folder, this is only possible by dropping the PDF into the preview pane or the "File" field (in the tab "General"). Then, the dialog "link to file" (call it "link dialog") is shown. When one drops the PDF onto the entry in the table, another dialog ("Import Metadata from PDF", call it "import dialog") is shown.

The import dialog offers "only attach PDF", which is one option of the link dialog. Thus, the options offered at the import dialog are incomplete. Therefore, the options of the link dialog should be included in the import dialog, too.

@koppor
Copy link
Member Author

koppor commented Mar 9, 2017

drop on table

drop on table

drop on preview

drop-on-preview

@tobiasdiez
Copy link
Member

I always found it confusing that I can't simply drag and drop a pdf file to the main table in order to import it (I think dropping on the tab header works). What do you think about:

  • drop on table: always import as new entry
  • drop on preview or entry editor: link

@koppor
Copy link
Member Author

koppor commented Mar 27, 2017

drop on table

grafik

drop on preview

grafik

grafik

@koppor
Copy link
Member Author

koppor commented Feb 6, 2018

Idea: from JabCon:

When creating a new entry, JabRef should parse the PDF using both the PDF Content importer and the XMP. Then, using the merge entries dialog, the resulting BibTeX entry should be offered. Only if conflicts. If no conflicts, just create the entry with the information.

User should not be asked, sensible defaults. - Use should use cleanup.

@Siedlerchr
Copy link
Member

Although we talked at this during JabCon, I have problems remembering all decisions:
But I think we should show that dialog for MainTable + Preview
Only if the files is dropped to the File Listview under General it should be linked to the entry without further notice

@tobiasdiez
Copy link
Member

The decision was as far as I remember:

  • Drop on maintable -> new entry (show merge dialog if information from xmp and PDF content are different)
  • Drop on maintable with Shift held-> link file to target entry
  • Drop on preview/entry editor -> link file

To distinguish the first two different drop behaviors for the maintable, the process there should be visual feedback, i.e., display "add as new entry" vs "link file" under the cursor java code.

@koppor
Copy link
Member Author

koppor commented Feb 24, 2018

I have following forces:

  • Be consistent with Windows shortcuts, where Alt is link and Shift is move
  • Being able to easily move files from the Downloads-Directory to the file directory

Thus, I propose to refine @tobiasdiez proposal (#121 (comment)) with

  • Drop on maintable -> new entry (show merge dialog if information from xmp and PDF content are different)
  • Drop on maintable with Alt held: link file to target entry
  • Drop on maintable with Shift held: move the file to file directory and link file to target entry
  • Drop on preview/entry editor: link file to target entry
  • Drop on preview/entry editor with Alt held: link file to target entry
  • Drop on preview/entry editor with Shift held: rename to filename pattern, move the file to file directory and link file to target entry

Thereby, I accept that:

  • I have to push the "Cleanup button" afterwards to rename the file to the "correct" filename

@tobiasdiez
Copy link
Member

What about always move and rename the file if you hold the shift key?

@koppor
Copy link
Member Author

koppor commented Feb 24, 2018

Yeah, sounds great: Updated the comment

@Siedlerchr
Copy link
Member

Unfortunately this is a bit problematic. I can't really detect if the drag and drop is coming from external if a key is pressed. I tried to use a combination with a KeyEventFilter but that does not work reliable,.

@tobiasdiez
Copy link
Member

tobiasdiez commented Feb 28, 2018

These modifiers are handled by javafx automatically and are available through getTransferMode. The different tarnsfer modes are MOVE (no modifier), COPY (Ctrl) and LINK (Shift + Ctrl). The modifiers in brackets might no be correct (and may actually vary by OS).

@Siedlerchr
Copy link
Member

Yeah, thanks for the hint! I absolutely did not know that these TranserModes represent the
modifier/drag & drop combination. I must admit, I also did not know about the alt/shift keys for drag and drop in Windows.

@Siedlerchr
Copy link
Member

Siedlerchr commented Aug 29, 2018

Fixed in #3765
Thank you for reporting this issue. We think, that is already fixed in our development version and consequently the change will be included in the next release.

We would like to ask you to use a development build from https://builds.jabref.org/master and report back if it works for you. Please remember to make a backup of your library before trying-out this version.

@Siedlerchr
Copy link
Member

Dropping on entry editor is now handle in #4408

@koppor
Copy link
Member Author

koppor commented Mar 5, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants