theia icon indicating copy to clipboard operation
theia copied to clipboard

3-way merge editor

Open airaketa opened this issue 2 years ago • 8 comments

Hello, I wonder if there are any plans to implement 3 way merge editor in Theia?

One of the approaches would be to integrate 3-way merge editor from VS Code but I'm not sure how hard it would be - it is part of a vscode.git plugin which, as far as I understand, will overlap with own implementation (git package in Theia). I also tried to superficially test it by installing vscode.git plugin but it seems to not function. Pull request introducing 3-way merge editor for VS Code is located here: https://github.com/microsoft/vscode/pull/150391

Feature Description:

3-way merge editor (one can take VS Code 3-way merge editor as a reference)

airaketa avatar Jun 27 '23 14:06 airaketa

@airaketa there are no plans as of yet to include the 3 way merge editor in the framework so if interested you can certainly contribute :+1: There are changes required in the framework to get the feature to work as the changes are not all local to the git builtin.

For additional information, the @theia/git extension precedes support for the vscode.git builtin for the framework, if interested in using vscode.git then you can drop @theia/git entirely in your application, they should be consumed exclusively.

vince-fugnitto avatar Jun 27 '23 15:06 vince-fugnitto

Hi, @vince-fugnitto, I'm @Ricbet, the core developer of opensumi. The 3-way merge editor feature has been implemented in our opensumi framework. However, unlike the mode in vscode, it uses a three-panel layout with left, center, and right columns to resolve conflicts. like:

image

It was inspired by visual studio, but we based it on the monaco editor. I'm not sure if the official team or users of Theia would accept this type of interaction. If they do accept it, I would be happy to implement a similar 3-way merge editor in Theia.

Here is the functionality implemented in opensumi, you can refer to it: Related issue: https://github.com/opensumi/core/issues/1930 Related pull request: https://github.com/opensumi/core/pull/1960

Ricbet avatar Aug 25 '23 09:08 Ricbet

@Ricbet thank you for reaching out!

The 3-way merge editor would definitely be a very nice contribution to the framework, especially given how the vscode.git permits the option through the git.mergeEditor preference. Please feel free to submit a pull-request!

vince-fugnitto avatar Aug 29 '23 18:08 vince-fugnitto

Hi, just wanted to check what is the current state of this issue? I could start working on it, if help is still wanted.

pisv avatar Jul 23 '24 08:07 pisv

@pisv I don't think anyone else is working on this right now. Feel free to pick it up :)

msujew avatar Jul 23 '24 08:07 msujew

OK :) I will pick it up, then. Thank you for so prompt reply!

pisv avatar Jul 23 '24 09:07 pisv

Just a note that I have been working on porting the 3-way merge editor from VS Code to Theia for quite some time. If all goes well, I hope to contribute it in this quater. It is going to be huge 🤦

pisv avatar Apr 23 '25 12:04 pisv

So, it happened, at last :-) Please have a look at #15701.

pisv avatar Jun 02 '25 18:06 pisv