feat: support drag-and-drop pairing of renamed files in webdiff#396
Merged
jrfaller merged 1 commit intoGumTreeDiff:mainfrom Mar 6, 2026
Merged
feat: support drag-and-drop pairing of renamed files in webdiff#396jrfaller merged 1 commit intoGumTreeDiff:mainfrom
jrfaller merged 1 commit intoGumTreeDiff:mainfrom
Conversation
…ements GumTreeDiff#335. Signed-off-by: JonahSussman <sussmanjonah@gmail.com>
Member
|
Hi! Thanks a lot for the PR. The patch looks good to me. I will see what the pipeline says! Cheers. |
Contributor
Author
|
@jrfaller No problem, glad I could help out! |
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.
Implements #335.
When comparing directories, renamed files appear as separate "deleted" and "added" entries with no way to compare them. This PR adds drag-and-drop support in the webdiff directory list view so users can manually pair renamed files for comparison.
Before
Renamed files (
OldName.java->NewName.java) show up as unrelated deleted/added entries:After
Drag a file from the Deleted section onto a file in the Added section (or vice versa) to pair them. Paired files appear in the Modified section as
OldName.java -> NewName.javawith all diff viewers available, plus an "unpair" button to reverse the operation:Clicking any diff viewer on the paired entry works as expected:
Changes
DirectoryComparator- AddedpairFiles()andunpairFiles()methodsWebDiff- AddedPOST /pair-filesandPOST /unpair-filesendpointsDirectoryDiffView- Drag-and-drop attributes on deleted/added rows, rename display (old → new), unpair button; also fixed added files being relativized against the wrong root directorydragdrop.js(new) - Client-side HTML5 drag-and-drop handlingTestDirectoryComparator- Added tests for pair/unpair logic and invalid argument handling