JabRef / jabref

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

Show diff in entry preview when conflicts are resolved #9534

Open koppor opened 1 year ago

koppor commented 1 year ago
  1. Entry is modified externally
  2. JabRef shows "modified" notification image
  3. "Review changes" brings up "External Changes Resolver" image

Following issues:

I would like to see the additions marked in green, the deletions marked in red

Similar as we have in the Merge Dialog

image

It would be nice if this was possible in the preview. If not, maybe the "Merge Entries" dialog can be displayed -- showing the rows with differences only!

HoussemNasri commented 1 year ago

It's already possible to see diffs in the three-way-merge dialog. Just click "merge..."

Siedlerchr commented 1 year ago

For the moment I would suggest we first implement the second one. The first one seems a bit more complicated.

HoussemNasri commented 1 year ago

Maybe we should add an option to "show only different fields" in this header to the three-way-merge dialog. And enable the option by default when the dialog is opened from the external change resolver.

koppor commented 1 year ago

I think, I had following case in mind: JabRef notifies me that the library was changed externally. I think: WTF and want to get back to work as fast as possible. Thus, I open the dialog and want quickly to see the changes. Thus, I don't want to click an additional button opening another dialog 😇

The second point, the user-button-configurable "Show only those fields that differ in the merge dialog" is good! 👍

Siedlerchr commented 1 year ago

In principle the showing only the changed rows works. Only problem as I set them with "managed" the style or column constraints are not reapplied...

Refs https://github.com/JabRef/jabref/pull/9533/files#diff-fe83eaf6bb2edc0cfce71bdaf73c8997794d0016ac3540da82e7bfe5884a340eR167-R190

Bildschirm­foto 2023-01-06 um 20 21 54 Bildschirm­foto 2023-01-06 um 20 22 01
HoussemNasri commented 1 year ago

Got it working by removing and adding nodes from the GridPane, but the code is so ugly...

Siedlerchr commented 1 year ago

Remaning issue: Show diff in preview

koppor commented 1 year ago

Another example:

image

image

When taking a closer look, date was added with trash content. Hard to see.

koppor commented 1 year ago

I still have to learn that I have to click "Merge..." 😅