-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Rich diff for Metadata Group Tree External changes #13325
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
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>
jabgui/src/main/java/org/jabref/gui/collab/metedatachange/MetadataChangeDetailsView.java
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/collab/metedatachange/MetadataChangeDetailsView.java
Show resolved
Hide resolved
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. |
Cool! Love the UI design. Will b take a look at the code later |
jabgui/src/main/java/org/jabref/gui/collab/metedatachange/MetadataChangeDetailsView.java
Outdated
Show resolved
Hide resolved
* 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) ...
jabgui/src/main/java/org/jabref/gui/collab/metedatachange/MetadataChangeDetailsView.java
Show resolved
Hide resolved
// Show both original and new values | ||
diffContainer.getChildren().add(new Label(diff.originalObject().toString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment is trivial and simply restates what the code does. The code is self-explanatory and doesn't need this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now its good
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.md
described in a way that is understandable for the average user (if change is visible to the user)