Rich diff for Metadata Group Tree External changes#13325
Merged
Conversation
Added a dedicated view for visualizing external changes in the Metadata Group Tree within a .bib file. Previously, there was no way to see which groups were added, removed, or changed. Now, the Group Tree appears in the External Changes Resolver dialog with visual highlights indicating what changes were made. Co-authored-by: Diogo Almada <diogo.almada@tecnico.ulisboa.pt>
Collaborator
|
JUnit tests of You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide. |
Member
|
Cool! Love the UI design. Will b take a look at the code later |
Siedlerchr
reviewed
Jun 14, 2025
Member
* upstream/main: (47 commits) Adapt some fetcher tests (JabRef#13370) change template issue number (JabRef#13367) Refine error message in URLUtil::create (JabRef#13337) fix deletion again (JabRef#13369) Only prevent failure in publishing from stopping the workflow (JabRef#13368) Refactor "enableFileAnnotationsTab" to "smartFileAnnotationsTab" and rewrote shouldShow in FileAnnotationTab as requested in JabRef#13279 (JabRef#13338) fix workflow (JabRef#13366) Fixamd64linux (JabRef#13365) Only delete for arm64 (JabRef#13364) New Crowdin updates (JabRef#13363) Bump org.junit.jupiter:junit-jupiter-api in /versions (JabRef#13362) Bump org.apache.logging.log4j:log4j-to-slf4j in /versions (JabRef#13359) Bump com.github.javaparser:javaparser-symbol-solver-core in /versions (JabRef#13361) Bump org.junit.platform:junit-platform-launcher in /versions (JabRef#13360) Bump com.fasterxml.jackson.datatype:jackson-datatype-jsr310 in /versions (JabRef#13358) Gradle build updates (JabRef#13319) Add "Disable GitHub actions" (JabRef#13356) Make jabref host executable on mac and on linux and fix import command line argument (JabRef#13355) Delete .github/workflows/merge-upstream.yml (JabRef#13357) chore(deps): update dependency org.apache.logging.log4j:log4j-to-slf4j to v2.25.0 (JabRef#13353) ...
Comment on lines
+67
to
+68
| // Show both original and new values | ||
| diffContainer.getChildren().add(new Label(diff.originalObject().toString())); |
There was a problem hiding this comment.
Comment is trivial and simply restates what the code does. The code is self-explanatory and doesn't need this comment.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #11221.
We have introduced a dedicated view for visualizing external changes in the Metadata Group Tree, made directly in .bib files.
Previously, users had no visibility or info about which groups were added, removed, or modified when external changes occurred. This made it very difficult to understand the changes.
With this update, the Group Tree is now displayed directly in the External Changes Resolver dialog. Visual highlights, using
org.jabref.gui.mergeentries.DiffHighlighting, indicate differences between the old and new versions. This makes it possible to understand what has changed so that they can decide to accept or reject the changes.Furthermore, to support large or deeply nested group trees, the old and new one are now scrollable independently. This ensures users can explore the full structure on both sides without losing context.
pr_video_demonstration.mp4
Regarding the merging aspect, we spent some time discussing possible approaches, but it turned out to be more complex than we initially expected. Because of that, we decided to focus on delivering a clear and useful visual diff.
While this doesn’t fully address all the points raised in the issue, we believe it represents solid progress. Previously, users had no meaningful insight into what had changed, so this already brings significant value to the external changes workflow.
Tests were not created since this is a visual diff for the user.
Co-authored-by: Diogo Almada diogo.almada@tecnico.ulisboa.pt
Steps to test
The instructions to test are displayed in the video.
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)