Merge View Implementation

There have been a number of feature requests for a side-by-side merge view similar to the one in version 5. It’d be nice if we had something like that for 6.x.

But this isn’t a trivial thing to build and maintain, so I’ve decided that if I’m going to implement it I’d like to be paid for that work. I’m in contact with companies willing to contribute 1000€ 3000€, but I did some planning and estimate that the basic implementation would be more of a 4000€ job. So I’m looking for additional companies that are interested in this feature.

This is what would be in scope:

  • A component that creates two editors, and efficiently maintains a diff between their content as it changes
  • Marking of that diff as deletions in one document and insertions in the other
  • Organize lines with changes into chunks and highlighted the entire chunk
  • Insert spacers below the smaller side of chunks to make the editor heights align
  • Optionally sync scrolling between the editors, with a UI toggle element
  • Optionally show merge buttons for moving changes from one editor into the other
  • Optionally collapse long ranges of unchanged text and show a control to expand them

Not in scope are 3-way merges and spacer-less scroll synchronization, which the old implementation did support. If someone has a need for those we can talk about including them.

Also not in scope is screen reader accessibility because I have not been able to come up with an approach that would make such an interface pleasant to use on a screen reader. If someone has ideas or knows of other products that do this well, I’d love to hear about it and we can consider adding it to the scope.

If your company might be interested in helping out here, please reply in this thread or send me an email.

1 Like

I’m the founder of the company in question (Boot.dev) - we’d be pumped if anyone wants to join us in sponsoring this :slight_smile:

Hi @marijn, this sounds like a nice thing to have. We’ll happily contribute 1000€ as well.

Great. I have another company also talking about chipping in 1000€, bringing us to 3000 out of 4000€.

Something I should have clarified in advance: this package would be distributed and maintained just like the other editor packages, under an MIT license.

3 Likes

Update: We’ve found enough sponsors. Work on this is starting—I’ll post updates in this thread when there’s something to show.

Another update: A first implementation of this exists. Take a look at the code and a demo, and let me know how it looks.