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

fix: improve comment node style and support twistier click #2946

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

erha19
Copy link
Member

@erha19 erha19 commented Jul 26, 2023

Types

  • 🐛 Bug Fixes

Background or solution

🤖 Generated by Copilot at 10a3875

  • Add a prop to handle the twistier click event on comment nodes (link, link, link, link, link, link)
  • Rename the renderSearchTree function to renderCommentTree and update its usage in comments-panel.view.tsx (link, link, link, link)
  • Modify the handleClick function in CommentNode to support custom onSelect functions for comment nodes (link)
  • Update the comment node style to prevent text overflow and align it to the left (link, link)

避免自定义节点绑定了 onSelect 后,点击依旧打开错误文件的问题,优化样式及样式名

Changelog

🤖 Generated by Copilot at 10a3875

This pull request improves the functionality and appearance of the comment tree view in the comments package. It adds a new prop and method for handling twistier icon clicks, renames and refactors some components and functions, and fixes some style issues with the comment node elements.

@opensumi opensumi bot added 🐞 bug Something isn't working 💄 style change labels Jul 26, 2023
@opensumi
Copy link
Contributor

opensumi bot commented Jul 26, 2023

ChatGPT Code Review:

修改建议:

  1. 代码中的注释和变量命名是中文的,建议使用英文进行注释和命名。
  2. 在代码中存在一些未使用的变量,建议删除掉这些无用的变量。

代码功能描述:
该代码主要是修复了一个问题,并进行了一些样式和样式名的优化。修复的问题是当自定义节点绑定了onSelect后,在点击时仍然会打开错误文件的问题。优化的样式和样式名方面没有提供具体的细节说明。

@opensumi opensumi bot added the ⚙️ refactor Refactor code label Jul 26, 2023
@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01% ⚠️

Comparison is base (2b1d95b) 57.62% compared to head (10a3875) 57.62%.
Report is 7 commits behind head on v2.26.

Additional details and impacted files
@@            Coverage Diff             @@
##            v2.26    #2946      +/-   ##
==========================================
- Coverage   57.62%   57.62%   -0.01%     
==========================================
  Files        1337     1337              
  Lines       84145    84148       +3     
  Branches    17487    17488       +1     
==========================================
- Hits        48491    48490       -1     
- Misses      32404    32408       +4     
  Partials     3250     3250              
Flag Coverage Δ
jsdom 52.63% <0.00%> (-0.01%) ⬇️
node 16.80% <0.00%> (-0.01%) ⬇️

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

Files Changed Coverage Δ
...es/comments/src/browser/tree/tree-model.service.ts 11.32% <0.00%> (-0.33%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erha19 erha19 merged commit 0e433a4 into v2.26 Jul 27, 2023
15 checks passed
@erha19 erha19 deleted the fix/improve-comment-node-style branch July 27, 2023 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working ⚙️ refactor Refactor code 💄 style change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants