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: debug breakpoint file items supports enable/disable switch #2611

Merged
merged 3 commits into from
Apr 27, 2023

Conversation

Ricbet
Copy link
Member

@Ricbet Ricbet commented Apr 19, 2023

Types

  • 🎉 New Features

Background or solution

🤖 Generated by Copilot at 7a8151b

  • Add optional renderLabel property to IBasicTreeData interface (link)
  • Add getter methods renderLabel to BasicCompositeTreeNode and BasicTreeNode classes (link, link)
  • Define renderLabel function to return renderLabel property of node (link)
  • Modify JSX element to render custom label or default label (link)
  • Implement custom label component for breakpoint file tree node (link, link, link)
    • Add renderLabel property to breakpoint file tree node using BreakpointFileItem component (link)
    • Define BreakpointFileItem component to render checkbox, icon, and label text (link)
    • Use DebugBreakpointsService to toggle enablement of breakpoints in file (link)
    • Add style rule for .debug_breakpoints_file_item class (link)

Kapture 2023-04-19 at 15 42 24

Changelog

🤖 Generated by Copilot at 7a8151b

This pull request enhances the recycle tree component and the debug breakpoints view by adding support for custom labels for tree nodes. It defines a renderLabel property for the tree data and a BreakpointFileItem component for the breakpoint file nodes. It also adds some style rules for the custom label component.

@Ricbet Ricbet self-assigned this Apr 19, 2023
@opensumi opensumi bot added the 🎨 feature feature required label Apr 19, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 19, 2023

ChatGPT Code Review:

生成的 CodeReview 如下:

这个 PR 主要是为调试视图中的断点文件项添加了开关功能以及支持自定义标签的能力,以下是我的几点建议:

  1. 在使用 useCallback 时需要明确传入依赖项,可以使用 ESLint 进行静态分析防止引入不必要的依赖项;
  2. 代码中的注释要求英文语法,格式要统一;
  3. 在 renderLabel 中可以添加默认值,以避免出现 undefined;
  4. 建议在文件中添加 JSDoc 注释来描述函数和接口及其参数和返回值等。

提交信息规范参考:[feat(debug): add support for custom labels and enable/disable switch on breakpoint file items]

@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Patch coverage has no change and project coverage change: +40.86 🎉

Comparison is base (f0d708f) 16.78% compared to head (0e5b44c) 57.64%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2611       +/-   ##
===========================================
+ Coverage   16.78%   57.64%   +40.86%     
===========================================
  Files        1327     1327               
  Lines       83631    83635        +4     
  Branches    17418    17418               
===========================================
+ Hits        14034    48212    +34178     
+ Misses      63581    32184    -31397     
+ Partials     6016     3239     -2777     
Flag Coverage Δ
jsdom 52.65% <0.00%> (?)
node 16.78% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...ponents/src/recycle-tree/basic/tree-node.define.ts 8.00% <0.00%> (-0.70%) ⬇️
...ackages/components/src/recycle-tree/basic/types.ts 100.00% <ø> (ø)

... and 816 files with indirect coverage changes

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Ricbet Ricbet force-pushed the feat/support-breakpoints-file-enabled branch from 528da1a to 0e5b44c Compare April 26, 2023 03:31
@Ricbet Ricbet merged commit db033f1 into main Apr 27, 2023
@Ricbet Ricbet deleted the feat/support-breakpoints-file-enabled branch April 27, 2023 06:53
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.

2 participants