-
-
Notifications
You must be signed in to change notification settings - Fork 364
refactor(TreeView): redesign TreeView dom structure #4696
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
Conversation
Reviewer's Guide by SourceryThis PR redesigns the TreeView component's DOM structure by flattening the nested ul/li hierarchy into a simpler div-based layout. The changes improve the component's structure while maintaining existing functionality through updated selectors and styling. Updated class diagram for TreeView componentclassDiagram
class TreeView {
+bool IsDisabled
+bool CanExpandWhenDisabled
+List~TreeViewItem~ Rows
+RenderFragment~TreeViewItem~ RenderTreeRow
+string? GetContentClassString(TreeViewItem item)
+bool CanTriggerClickNode(TreeViewItem item)
+Task OnClick(TreeViewItem item)
}
class TreeViewItem {
+bool IsDisabled
+bool HasChildren
+List~TreeViewItem~ Items
+TreeViewItem Parent
}
TreeView o-- TreeViewItem
note for TreeView "Redesigned DOM structure with div-based layout"
Updated class diagram for CSS changes in TreeViewclassDiagram
class TreeViewCSS {
+--bb-tree-padding
+--bb-tree-margin
+--bb-tree-padding-left
+--bb-tree-item-margin
+--bb-tree-icon-width
+--bb-tree-check-margin
+--bb-tree-disabled-opacity
+--bb-tree-item-active-color
+--bb-tree-item-active-bg
+--bb-tree-item-hover-bg
}
note for TreeViewCSS "Updated CSS variables and structure for TreeView"
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ArgoZhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please add documentation about the DOM structure changes and migration notes for users who may have custom CSS targeting the old ul/li structure.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4696 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 620 620
Lines 27388 27378 -10
Branches 3926 3923 -3
=========================================
- Hits 27388 27378 -10 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
redesign TreeView dom structure
Summary of the changes (Less than 80 chars)
简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号
Description
fixes #4695
Regression?
[If yes, specify the version the behavior has regressed from]
[是否影响老版本]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Redesign the TreeView component's DOM structure to enhance its layout and styling, and update the corresponding unit tests to reflect these changes.
Enhancements:
Tests: