-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement 3-way prototyping code #1960
Conversation
0cae96a
to
94af516
Compare
260e36d
to
103d0fc
Compare
7e96779
to
9c8f2a7
Compare
/publish |
🎉 PR Next version 2.21.7-next-1671431067.0 publish successful! You can install prerelease version via
/home/runner/work/_temp/_runner_file_commands/step_summary_85530c8c-e64e-4c39-8ccc-8378386a6015 |
d7bbb6b
to
927ea61
Compare
/publish |
🎉 PR Next version 2.21.9-next-1671443150.0 publish successful! You can install prerelease version via
/home/runner/work/_temp/_runner_file_commands/step_summary_66c11b2b-7e60-4b90-84de-25e56174a20d |
🎉 PR Next version 2.21.9-next-1671443227.0 publish successful! You can install prerelease version via
/home/runner/work/_temp/_runner_file_commands/step_summary_03a80a0f-9718-4eae-a35c-8c084cd6a347 |
Codecov ReportBase: 57.76% // Head: 57.78% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1960 +/- ##
==========================================
+ Coverage 57.76% 57.78% +0.01%
==========================================
Files 1291 1313 +22
Lines 81585 82990 +1405
Branches 16993 17254 +261
==========================================
+ Hits 47129 47952 +823
- Misses 31333 31847 +514
- Partials 3123 3191 +68
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
1695654
to
b55c7d2
Compare
/publish |
🎉 PR Next version 2.21.10-next-1671534118.0 publish successful! You can install prerelease version via
/home/runner/work/_temp/_runner_file_commands/step_summary_d4c6e20f-b36f-4128-b582-42767ac5dbd6 |
ed64f96
to
2060248
Compare
* feat: implement conflict actions operations * feat: implement conflict actions operations * refactor: decorations type * fix: conflict-actions * chore: improve code * refactor: document mapping * chore: rename type * chore: add note
* feat: implement conflict ignore actions operations * chore: remove useless file
* feat: implement dashed line render * chore: improve code
* fix: render dashed in accept current conflict * feat: implement editing result view code update range mapping * fix: result editor view update decorations
* refactor: conflict actions * feat: result view editor conflict action render * chore: add revoke icon * feat: implement revoke actions * fix: delta edits
* refactor: diff line range render * feat: improve diff merge range render * chore: improve code
* feat: implement accept combination render * feat: implement accept combination actions * chore: improve mark complete code * chore: improve code
* fix: turn direction status * fix: range touch condition * chore: improve actions update render & fix revoke actions * feat: implement append action render & fix mapping data * chore: rename sameRange symbol * style: improve append icon * feat: implement accept append action * chore: remove console
* fix: merge editor options * fix: merge editor options Co-authored-by: qingyi.xjh <qingyi.xjh@antgroup.com>
* fix: accept combination apply edits error * chore: improve code
* feat: implement title head & fix scroll & keep view state * feat: implement apply action * fix: time machine record * docs: apply button i18n * chore: improve code
7e9e1d5
to
a74e87f
Compare
@@ -102,7 +102,7 @@ console.log(a);`, | |||
let paste = await editorMenu?.menuItemByName('Paste'); | |||
await paste?.click(); | |||
await app.page.waitForTimeout(200); | |||
expect(await editor.numberOfLines()).toBe(2); | |||
expect(await editor.numberOfLines()).toBe(5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的修改是有问题的,测试居然能过 ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不是,原来这里的测试为 2 才有问题,因为新增加了 diff merge editor 编辑器类型,有 3 个 monaco editor,且这 3 个编辑器已经在 dom 上渲染了,所以多了 3 个
这个功能怎么开启呀? |
需要安装 git 1.68.1 以上的版本,然后开启配置项 |
@miserylee 1.68.0 和 1.69.0 这个配置项的名称不太一样,不过结尾都是 mergeEditor,可以自己看一下,如果插件市场没有插件,可以自己基于 https://github.com/eclipse-theia/vscode-builtin-extensions 这个工程去构建。 |
Types
Background or solution
Kapture.2022-12-19.at.13.57.39.mp4
3-way merge editor 代码原型设计
测试使用: 在命令面板调用 _open.mergeeditor 命令
设计
这里不建议直接使用 monaco 的 diffEditor ,首先 diffEditor 是 origin 和 modify 的比较,并同时展示出来。
而 3-way merge editor 的 diff 比较分别是
incoming 和 base
、current 和 base
,其中 base 是不展示的,然后中间展示的result editor 的 diff 结果是与 incoming 和 current 的合集所以这里我们其实可以参考 monaco diffEditor 的源码,自己做好 git diff 的 计算,然后自己去绘制 diff 的 decorations
Changelog