-
-
Notifications
You must be signed in to change notification settings - Fork 362
fix(SelectTree): optimize select item change event #6654
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 (collapsed on small PRs)Reviewer's GuideThis PR refactors SelectTree's state management by replacing public properties with private fields, consolidates and optimizes the item caching logic, prevents redundant selection events, cleans up an unnecessary lifecycle override, and updates the component template binding. Sequence diagram for optimized item selection event triggeringsequenceDiagram
participant User
participant SelectTree
participant TreeViewItem
User->>SelectTree: Selects an item
SelectTree->>TreeViewItem: Check if item is already selected
alt Item is not already selected
SelectTree->>SelectTree: ItemChanged(currentItem)
else Item is already selected
SelectTree-->>User: No event triggered
end
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.
Pull Request Overview
This PR refactors the SelectTree component by converting public properties to private fields and removing the OnInitializedAsync override. The changes improve encapsulation and potentially fix timing issues in the component initialization.
- Convert public properties to private fields with underscore prefix
- Remove OnInitializedAsync override that was causing premature item changes
- Update version number to 9.9.3-beta02
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
SelectTree.razor.cs | Converts properties to private fields, removes OnInitializedAsync, and improves logic in TriggerItemChanged |
SelectTree.razor | Updates template to use the new private field name |
BootstrapBlazor.csproj | Increments version number to beta02 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6654 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 739 739
Lines 31674 31667 -7
Branches 4459 4459
=========================================
- Hits 31674 31667 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #6653
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Improve SelectTree component by optimizing selection change handling, introducing caching for items and expanded items, standardizing private field naming, and cleaning up initialization logic.
Bug Fixes:
Enhancements: