Skip to content

Conversation

@nakul-py
Copy link
Contributor

@nakul-py nakul-py commented Nov 3, 2025

This PR adds split-file view for diffs.

Screencast.From.2025-11-04.21-06-17.mp4

CC @jtpio @Zsailer

@nakul-py
Copy link
Contributor Author

nakul-py commented Nov 3, 2025

Hey! @jtpio and @Zsailer I need more suggestions from you about working of panes and need of accept-reject buttons in split-file view.
Currently both left and right panes are view only both editors are non-editable i am thinking
to make right pane editable and also the revert changes button per block or lines of code changes like we got in vs code split-file view.

@nakul-py
Copy link
Contributor Author

nakul-py commented Nov 4, 2025

74eb8c0 This commit make right pane editable and syncs edits in the right pane diff editor into the actual JupyterLab file document.

Screencast.From.2025-11-04.16-02-44.mp4

@nakul-py nakul-py marked this pull request as draft November 4, 2025 14:36
@nakul-py
Copy link
Contributor Author

nakul-py commented Nov 4, 2025

I have updated the PR description video.

@nakul-py nakul-py marked this pull request as ready for review November 4, 2025 16:46
Copy link

@brichet brichet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nakul-py for working on this, this is promising.

This is a very quick review, mostly about consistency, according to the screenshot below.

image
  • The filepath can be confusing
    In this case, I provided a fake filepath, and the diff widget opened with the current editor filepath (which is wrong).
    Applying the changes applies them to the current editor, in this case markdown.md instead of anything.txt (as the command suggest).
    We should probably throw an error if the file path is not correct.
    I wonder if we should check that the file content is one of the originalSource or newSource for consistency.

  • Undo / Redo buttons
    AFAIU we can currently only accept or reject all changes. If this is true, I don't think the Undo/Redo buttons are necessary because the widget close after the action.
    I don't know how difficult it is, but it would be wonderful to be able to accept and reject each diff independently. Otherwise these buttons can probably be removed for now.

@brichet
Copy link

brichet commented Nov 13, 2025

I don't know how difficult it is, but it would be wonderful to be able to accept and reject each diff independently.

Just saw #37 that should fix it, thanks 🎉

@nakul-py
Copy link
Contributor Author

The filepath can be confusing
In this case, I provided a fake filepath, and the diff widget opened with the current editor filepath (which is wrong).
Applying the changes applies them to the current editor, in this case markdown.md instead of anything.txt (as the command suggest).

Currently this case is also valid for unified-file-diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants