jabref icon indicating copy to clipboard operation
jabref copied to clipboard

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

Open HighCrit opened this issue 2 years ago • 7 comments

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

  • [x] Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • [x] Tests created for changes (if applicable)
  • [x] 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.

HighCrit avatar Mar 31 '23 09:03 HighCrit

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

Siedlerchr avatar Apr 04 '23 17:04 Siedlerchr

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.

HighCrit avatar Apr 07 '23 07:04 HighCrit

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 :partying_face:

k3KAW8Pnf7mkmdSMPHz27 avatar Apr 12 '23 23:04 k3KAW8Pnf7mkmdSMPHz27

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

image

k3KAW8Pnf7mkmdSMPHz27 avatar Apr 12 '23 23:04 k3KAW8Pnf7mkmdSMPHz27

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.

HighCrit avatar Apr 13 '23 08:04 HighCrit

It concerns area 1.

I believe at least part of it was looked at in https://github.com/JabRef/jabref/pull/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 avatar Apr 13 '23 15:04 k3KAW8Pnf7mkmdSMPHz27

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 https://github.com/JabRef/jabref/pull/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.

k3KAW8Pnf7mkmdSMPHz27 avatar May 02 '23 22:05 k3KAW8Pnf7mkmdSMPHz27