Skip to content

Multi File Diff Editor #179000

Closed
Closed

Description

Explore creating a custom editor that would show a list of diff editor widget.

Activity

  1. added
    scm
    on Apr 3, 2023
  2. added
    feature-request
    on Apr 3, 2023
  3. 7rulnik commented on Apr 11, 2023

    @7rulnik

    Ladislau Szomoru (@lszomoru) do I understand it correctly that basically, it's a one-long list of diffs like in GitHub PRs?

  4. changed the title [-]Workbench - diff list custom editor[/-] [+]Support opening a set of changes using a changes editor[/+] on May 3, 2023
  5. jacekkopecky commented on Aug 6, 2023

    @jacekkopecky
    Contributor

    Ladislau Szomoru (@lszomoru) do you mean something similar to my extension Whole Diff ?

  6. hediet commented on Aug 10, 2023

    @hediet
    Member

    I think this feature consists of two different problems:

    • Have a custom editor that has IMultiDocumentDiffEditorModel as model (might need Benjamin Pasero (@bpasero)'s help):
      interface IMultiDocumentDiffEditorModel {
        diffs: LazyPromise<IDiffEntry>[];
        onDidChange: Event;
      }
      // The lazy promise allows lazy-loading (only load a the original/modified files when they are in view) and streaming (show the diff of the first file already while the other files are loading).
      // This might be very useful for reviewing github PRs on github.dev.
      interface LazyPromise<T> {
         request(): Promise<T>;
         value: T | undefined;
         onDidChange: Event;
      }
      // invariant: assert(original || modified);
      interface IDiffEntry {
         original: ITextModel | undefined; // undefined if the file was created.
         modified: ITextModel | undefined; // undefined if the file was deleted.
      }
      • There should be a command to open a multi diff editor with a model that represents all changed files. This model should fire an event when the list of changed files changes.
      • There could be an implementation of IMultiDocumentDiffEditorModel that is mapped to a folder, then extensions could easily invoke this editor
    • Make the diff editors virtual (Henning Dieterichs (@hediet))
      • Both the contents of each diff editor as well as the diff editors itself should be virtual
      • See here for how virtualization could be achieved.
  7. Igorgro commented on Aug 10, 2023

    @Igorgro

    Henning Dieterichs (@hediet) what do you think about extension mentioned above?

  8. hediet commented on Aug 10, 2023

    @hediet
    Member

    Igor Mahov (@Igorgro) I didn't try it, but it looks like a decent alternative. It seems to create a patch file that you can then view using a different extension. The feature request described in this issue goes much further, as we want to use our diff algorithm and the monaco editor to render the changes. We also want to allow users to modify/revert changes, which is not possible with the patch file approach.

  9. jacekkopecky commented on Aug 10, 2023

    @jacekkopecky
    Contributor

    Agreed with Henning Dieterichs (@hediet) – my extension is useful but similar-but-richer native functionality would be preferred.

  10. changed the title [-]Support opening a set of changes using a changes editor[/-] [+]Multi File Diff Editor[/+] on Aug 25, 2023
  11. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Nov 9, 2023
  12. eamodio commented on Nov 28, 2023

    @eamodio
    Contributor

    Henning Dieterichs (@hediet) Loving where this is going so far, but I've noticed some issue, but also would love to see additions/changes to the new vscode.changes command. How should I best report those? I didn't see a specific issue for the vscode.changes command.

  13. hediet commented on Nov 28, 2023

    @hediet
    Member

    The vscode.changes command is experimental and subject to change. Feel free to create individual issues! But we cannot commit on stable API yet.

  14. locked and limited conversation to collaborators on Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestinsiders-releasedon-testplanscm

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions