Skip to content
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: improve dirty diff #1978

Merged
merged 12 commits into from
Nov 22, 2022
Merged

feat: improve dirty diff #1978

merged 12 commits into from
Nov 22, 2022

Conversation

Aaaaash
Copy link
Member

@Aaaaash Aaaaash commented Nov 16, 2022

Types

  • 💄 Style Changes

Background or solution

before

  1. diff gutter 位置错误
    image
  2. 无法区分 changetype,所有改动都识别为 modified
  3. dirtyWidget 样式丑
    image

after

  1. 优化 diff guter 渲染的定位和样式,区分 add、delete、modified 三种状态
    image
  2. 优化 dirtyWidget ,根据当前 changeType 展示不同边框颜色,优化默认 icon (使用 vscode-codicon)
    image
    image
    image
  3. 添加关闭 dirtyDiff widget 快捷键 esc
dirty-changes.mp4

Changelog

  • 优化 diff guter 渲染的定位和样式,区分 add、delete、modified 三种状态
  • 化 dirtyWidget 样式,根据当前 changeType 展示不同边框颜色
  • 默认 icon (使用 vscode-codicon)
  • 添加关闭 dirtyDiff widget 快捷键 esc
  • 修复 revertChange 失败的问题

erha19
erha19 previously approved these changes Nov 16, 2022
erha19 added a commit that referenced this pull request Nov 16, 2022
@erha19 erha19 added this to the 2.22 milestone Nov 17, 2022
@Aaaaash Aaaaash changed the title feat: improve dirty diff styles feat: improve dirty diff Nov 17, 2022
@vagusX
Copy link
Contributor

vagusX commented Nov 17, 2022

好看

@codecov
Copy link

codecov bot commented Nov 17, 2022

Codecov Report

Base: 57.43% // Head: 57.44% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (4d77ec1) compared to base (40258f7).
Patch coverage: 82.50% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1978   +/-   ##
=======================================
  Coverage   57.43%   57.44%           
=======================================
  Files        1289     1289           
  Lines       80629    80677   +48     
  Branches    16864    16877   +13     
=======================================
+ Hits        46312    46346   +34     
- Misses      31197    31210   +13     
- Partials     3120     3121    +1     
Flag Coverage Δ
jsdom 52.20% <82.50%> (+<0.01%) ⬆️
node 15.87% <1.25%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/i18n/src/common/en-US.lang.ts 100.00% <ø> (ø)
packages/i18n/src/common/zh-CN.lang.ts 100.00% <ø> (ø)
packages/scm/src/browser/dirty-diff/index.ts 92.68% <55.55%> (-2.23%) ⬇️
...ages/scm/src/browser/dirty-diff/dirty-diff-util.ts 84.21% <72.72%> (-15.79%) ⬇️
...es/scm/src/browser/dirty-diff/dirty-diff-widget.ts 93.10% <84.61%> (-2.86%) ⬇️
...scm/src/browser/dirty-diff/dirty-diff-decorator.ts 100.00% <100.00%> (ø)
...ges/scm/src/browser/dirty-diff/dirty-diff-model.ts 91.95% <100.00%> (+0.24%) ⬆️
packages/scm/src/common/dirty-diff.ts 100.00% <100.00%> (ø)
...rkspace-edit/src/browser/workspace-edit.service.ts 82.68% <100.00%> (ø)
packages/utils/src/buffer.ts 30.81% <0.00%> (-2.33%) ⬇️
... and 4 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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Aaaaash
Copy link
Member Author

Aaaaash commented Nov 17, 2022

/publish

@github-actions
Copy link
Contributor

🎉 PR Next version 2.21.5-next-1668665440.0 publish successful! You can install prerelease version via npm install package@2.21.5-next-1668665440.0 @Aaaaash

2.21.5-next-1668665440.0

/home/runner/work/_temp/_runner_file_commands/step_summary_e9239b43-ad9b-4571-a0b6-36bba8bafba8

@erha19
Copy link
Member

erha19 commented Nov 22, 2022

@Aaaaash 冲突处理一下可以合了

@Aaaaash Aaaaash force-pushed the feat/improve-dirty-diff-styles branch from cfb5f24 to 4d77ec1 Compare November 22, 2022 02:30
Copy link
Member

@Ricbet Ricbet left a comment

Choose a reason for hiding this comment

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

LGTM

@Ricbet Ricbet merged commit 1df4974 into main Nov 22, 2022
@Ricbet Ricbet deleted the feat/improve-dirty-diff-styles branch November 22, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants