Open ghost opened 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.
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
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.
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! 🚀
@koppor, thank you for assigning me this issue. Our team will tackle it, and we will try to make a PR soon.
Hi, I'm working with @thanhnguyen123-dev on this and would like to clarify:
Thank you :)
* 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:
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:
Use gif
, jpg,
png`. - Store the picture extenstions as enum
In case there are multiple images, use the one with description cover
. If there is no cover
description, use the first image.
* Will users choose the cover, or does JabRef need to find it automatically?
org.jabref.gui.externalfiles.DownloadFullTextAction#addLinkedFileFromURL
. (It calls org.jabref.gui.fieldeditors.LinkedFileViewModel#download
which is also perfect for your needs). Maybe rename the file later to have - cover
at the end of the filename.* 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)
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
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:
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.
Thanks for the detailed feedback everyone.
In our experimentation, we came up with this:
It's a resizable SplitPane
holding the MainTable
and BookCover
. Thoughts?
Alternatively, we can try making a separate SidePane
on the right-hand side, just for the book cover.
- Integrate it into the existing "entry-preview" tab (if that's technically possible).
Happy to give this a try too :)
Alternatively, we can try making a separate
SidePane
on 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.
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?
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.
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!
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.
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.
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?
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.
decision: include it into preview panel to have it similar to BibDesk
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:
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.
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?
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.