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

Display files from referenced crossref in entry table (HighCrit version) #9717

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

HighCrit
Copy link

@HighCrit HighCrit commented Mar 31, 2023

Fixes #7731.

Now display attached files from referenced crossref entry in the entry table. By providing a getFiles method in BibEntry that takes in a database. From which referenced crossref files are fetched.

Known Bugs:

  • Adding a crossref will not update the cell
  • Adding a file to a crossrefing entry does not update the files if it already had a file from a crossrefed entry.
  • Removing a crossref will not update the cell
  • Changing the citation key of the crossrefed entry will not update the cell
  • Removing a crossrefed entry will not update the cell

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@Siedlerchr
Copy link
Member

I like the idea, I wonder if there is a possibility to visually indicate this somehow that this is a crossRef file coming from a a parent/linked entry.
Maybe you have some ideas how to display this

@HighCrit
Copy link
Author

HighCrit commented Apr 7, 2023

I like the idea, I wonder if there is a possibility to visually indicate this somehow that this is a crossRef file coming from a a parent/linked entry. Maybe you have some ideas how to display this

I think we can use the mdi2f-file-link-outline icon. However, we have found ourselves quite stuck on the currently known bugs. To fix them we believe we need to observe the entire table for file changes, but struggle on how to do this properly.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Sponsor Member

k3KAW8Pnf7mkmdSMPHz27 commented Apr 12, 2023

Hello @HighCrit @bsVermeiden, thank you for taking a look at this issue!

It was, unfortunately, quite a while since I looked at JabRef's source code, and I don't currently understand,

we need to observe the entire table for file changes

What is the entire table? The main table or the bib entry table? As long as it isn't the first one, it might be ok to listen to changes to the whole table.

"P.S.", love that there are already tests 🥳

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Sponsor Member

k3KAW8Pnf7mkmdSMPHz27 commented Apr 12, 2023

Is it areas 1, 2, or both that we are concerned about? Or is that a question that still must be answered/clarified?

image

@HighCrit
Copy link
Author

Hey @k3KAW8Pnf7mkmdSMPHz27, thank you for taking a look.

What is the entire table? The main table or the bib entry table? As long as it isn't the first one, it might be ok to listen to changes to the whole table.

We now believe that we only need to observe the changes in the entry itself. Namely, changes in crossref field and files field. However, we cannot seem to figure this out.

Is it areas 1, 2, or both that we are concerned about? Or is that a question that still must be answered/clarified?

It concerns area 1. We figured, since the other fields are also not propegated in area 2 for crossrefed values that only area 1 is desired.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Sponsor Member

k3KAW8Pnf7mkmdSMPHz27 commented Apr 13, 2023

It concerns area 1.

I believe at least part of it was looked at in #7754. I'll see if I can re-acquaint myself with #7754 soonish as well, perhaps there is something you can use from it in your PR, either through cherry-picking commits, merging the branch into this one, or the ideas discussed in it. I'll get back to you on this one.


We figured, since the other fields are also not propegated in area 2 for crossrefed values

I honestly don't know. It might be worth thinking about having grayed out/default text, e.g., from Google search
image
Anyway, in that case, area 2 shouldn't be looked at in this PR; it will make it way too large.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Sponsor Member

Sorry that I haven't gotten back to you earlier; I've had some issues I've had to deal with and haven't had enough time for open-source :/

For now, I've merged main into #7754 so that it is up to date. It can update some fields (but not the file field).

If you have specific questions I am usually able to answer quite quickly.

@ThiloteE ThiloteE changed the title Display files from referenced crossref in entry table Display files from referenced crossref in entry table (HighCrit version) Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display attached files in refererenced crossref entry
5 participants