JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.66k stars 2.59k forks source link

feature request: book front cover feature #10120

Open ghost opened 1 year ago

ghost commented 1 year ago

I would like to request a feature so we can use an image as cover image of a book, which is then shown in JabRef when we click the book entry. This would be an optional feature (enable/disable the cover viewer).

A "cover" folder (chosen by the user) should be used then to select the cover image for each book and JabRef find the images in this folder.

I don't know if this easy or possible to make in combination with the bibtex format.

ThiloteE commented 1 year ago

jabref still has issues with managing multiple entries that are part of the same book, volume or series. See issues related to "crossref". If a cover feature were to be implemented eventually, it would be neat to at least implement it in a way that related entries can "share" the cover.

Siedlerchr commented 7 months ago

Some ideas are also disussed in the forum thread how other programs can do this: https://discourse.jabref.org/t/display-cover-images-for-books/3647

thanhnguyen123-dev commented 1 month ago

Hi,

Our group is doing an assignment at our university, which is contributing to an Open-Source project. We are considering this issue to work on, so I am wondering if this issue is good to go and if we can be assigned to work on this issue. Looking forward to hearing a response. Many thanks.

github-actions[bot] commented 1 month ago

Welcome to the vibrant world of open-source development with JabRef!

Newcomers, we're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

thanhnguyen123-dev commented 1 month ago

@koppor, thank you for assigning me this issue. Our team will tackle it, and we will try to make a PR soon.

damgam0288 commented 1 month ago

Hi, I'm working with @thanhnguyen123-dev on this and would like to clarify:

Thank you :)

koppor commented 1 month ago
* Can we show the book cover as a SplitPane next to the MainTable, or is there a better preferred location?

Make it configurable. If options are too hard, choose the first option:

  1. Show it inside the main table column - similar to https://github.com/mnowiasz/qisit/blob/develop/docs/Gourmet.md#reduced-set-of-windows
  2. Show it as additional tab in the entry editor - similar to the preview tab\ Image\ Image
  3. Show it in a side pane - as requested at https://discourse.jabref.org/t/display-cover-images-for-books/3647/7?u=koppor. However, this could be need more work, because also preview should be integrated etc. -- If you manage to get https://github.com/andy-goryachev/FxDock running, you could start to make a "Paper information panel" dockable.

This is list is my priority. Number 2 should be the easiest to implement.

* Besides the cover image, should we display anything else?

No.

It is stored in the file field:

* Will users choose the cover, or does JabRef need to find it automatically?
* We're aiming to use the same cover image for citations referencing the same book but couldn't find the crossref issue mentioned [above](https://github.com/JabRef/jabref/issues/10120#issuecomment-2093140042).

That link points to a long forum post. I cannot find "crossref" there. - The post by Thilo (https://github.com/JabRef/jabref/issues/10120#issuecomment-1656840360) talks about crossref. No worries for that. In the first iteration, you will use org.jabref.model.entry.BibEntry#getFiles

You can alternatively use org.jabref.model.entry.BibEntry#getResolvedFieldOrAlias(org.jabref.model.entry.field.Field, org.jabref.model.database.BibDatabase) (with StandardField.FILE as parameter) - adn then parse the result using FileFieldParser.parse(...) to get a list of files (and filter further)

Siedlerchr commented 1 month ago

We already have an OpenLibrary fetcher, so in the first step I would expand that to fetch book covers as well. We should not overwhel the poor guys server See for an example this code https://gist.github.com/jamesflores/85e9777d5ca076b2d29312a31754003e#file-worker-js-L21

ThiloteE commented 1 month ago

We already have too many tabs and explicitly having to click on the tab to show the picture is a little odd. So option 2 is from a user perspective not the best. I was thinking of yet another option:

  1. Integrate it into the existing "entry-preview" tab (if that's technically possible).

Oh and by the way, Calibre (python based app to organize ebooks) went for the option of a sidepane/splitpane, so that could serve as inspiration, if you go that route. See https://calibre-ebook.com/demo#screenshots.

damgam0288 commented 1 month ago

Thanks for the detailed feedback everyone.

In our experimentation, we came up with this: Image

It's a resizable SplitPaneholding the MainTableand BookCover. Thoughts?

Alternatively, we can try making a separate SidePaneon the right-hand side, just for the book cover.

  1. Integrate it into the existing "entry-preview" tab (if that's technically possible).

Happy to give this a try too :)

koppor commented 1 month ago

Alternatively, we can try making a separate SidePaneon the right-hand side, just for the book cover.

I have no real knowledge on the pros and cons of SplitPane and SidePane. Can you outline consequences? Reason: Mostly reviewers are in other context and one an guide them when sharinging insights of your thoughts. The MADR template is one tool to make that more structured.

My only wish would be: Please integrate the entry preview on the right (and remove the tab in the entry editor and the split view in the entry editor) - Similar to https://discourse.jabref.org/t/display-cover-images-for-books/3647/3?u=koppor (oh, this is the Calibre hint ^^)

Reason for this wish: one has books and papers in the library and papers don't have an image...


If this is too much work, just leave as is and submit a pull request. - The fetching of images and handling the file field is important to get implemented.

calixtus commented 1 month ago

Im not so convinced of an extra sidepane for a book cover. We now have a very simple layout. "Groups - table - entry editor". Adding just another panel would be irritating. Maybe the book cover can be integrated into the the Web view in the previewpanel?

koppor commented 1 month ago

Im not so convinced of an extra sidepane for a book cover. We now have a very simple layout. "Groups - table - entry editor". Adding just another panel would be irritating. Maybe the book cover can be integrated into the the Web view in the previewpanel?

Some users rotate their screen for JabRef only! Last paragraph at https://discourse.jabref.org/t/option-to-position-editor-as-a-vertical-panel/4080/3.

OK for me to integrate in preview panel. Handling moving that panel to somewhere else will be done at a follow up.

damgam0288 commented 1 month ago

I have no real knowledge on the pros and cons of SplitPane and SidePane. Can you outline consequences?

The only issue with the was I had trouble finding a way to communicate mouse clicks from the MainTable to a BookCover inside the SidePane. In contrast, it was very easy to update the BookCover based on mouse clicks using an extra SplitPane.

On the other hand, using the SplitPane limits the view of the MainTable, which may annoy users wanting to see all columns at one glance, so putting it in PreviewPanel in the EntryEditor below might work better.

We can experiment with a right-hand SidePane, but just to clarify, do we agree it won't disrupt the layout and make the GUI too crowded, as mentioned by calixtus?

My colleague @thanhnguyen123-dev is working on the code to improve the SplitPane at the moment and might make a PR soon. Meanwhile, I'm happy to explore using a PreviewPanel as suggested.

Thank-you!

calixtus commented 1 month ago

We can experiment with a right-hand SidePane, but just to clarify, do we agree it won't disrupt the layout and make the GUI too crowded, as mentioned by calixtus?

Who agrees? Who is 'we all'??? 😆 Let's decide in the next dev call.

calixtus commented 1 month ago

Please keep in mind: JabRef ist primarily made for academic purposes. Nobody cares about the book cover in academics and it is rarely available in scientific online catalogues. If so, one can always attach full text PDF.

Book covers are primarily used for popular fiction. For that purpose, I agree, we should display it somewhere, best in preview IMHO. But please do not make the feature as blinking and flashing and prominent as possible, just because you can. Thats like HTML 1.0 in the 1990s.

koppor commented 1 month ago

The only issue with the was I had trouble finding a way to communicate mouse clicks from the MainTable to a BookCover inside the SidePane. In contrast, it was very easy to update the BookCover based on mouse clicks using an extra SplitPane.

Maybe, I don't understand the basics. How does a SidePane look like? How does a SplitPane look like? Isn't it appearing as same to the user?

koppor commented 1 month ago

Book covers are primarily used for popular fiction. For that purpose, I agree, we should display it somewhere, best in preview IMHO. But please do not make the feature as blinking and flashing and prominent as possible, just because you can.

In other words: For the current users, it whould not be a WTF moment when starting JabRef. One usage scenario for JabRef is a group of researchers managing 20.000 references and sharing the knowledge there. They mostly share adcademic papers and no books. Thus, they do not need this feature at all.

Therefore, the propsal was made to include the book cover in the entry preview: This then works for both users not having any books and users managing books only.

koppor commented 1 month ago

decision: include it into preview panel to have it similar to BibDesk

image_2024_10_20T10_14_44_580Z-1.png

damgam0288 commented 1 month ago

How does a SidePane look like? How does a SplitPane look like? Isn't it appearing as same to the user?

They are very similar yes, but resizing the SplitPane affects the MainTable alone, while resizing the SidePane affects both the MainTable and EntryEditor:

SplitPane

SidePane

damgam0288 commented 1 month ago

Therefore, the propsal was made to include the book cover in the entry preview: This then works for both users not having any books and users managing books only.

Sounds good. We'll work on incorporating into Entry Preview.

koppor commented 1 month ago

They are very similar yes, but resizing the SplitPane affects the MainTable alone, while resizing the SidePane affects both the MainTable and EntryEditor:

Thank for that. Now, I understand. -- Can you please create an ADR (in the directory) https://github.com/JabRef/jabref/tree/main/docs/decisions listing the three (four?) options (including your screenshots) and state that we decided for the preview panel?

koppor commented 1 month ago

Test book: https://www.amazon.de/REST-Design-Rulebook-Mark-Masse/dp/1449310508