BugFix - Fix Search Of UCTreeView#3720
Conversation
…ems in result. RC: When we do the search, we call the GetChildrenGeneric method of NewTreeViewItemBase. And when the user expands the folder, it again calls GetChildrenGeneric method. This method everytime returns a new list of objects. So if we set any property value to first set of objects. It gets removed when we get the second set of objects while expanding the folder. Fix: Make sure that the GetChildrenGeneric method returns the same set of objects.
WalkthroughThe recent updates to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Outside diff range and nitpick comments (1)
Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (1)
Line range hint
389-450: TheTreeFolderItems_CollectionChangedmethod has been significantly modified to handle adding, removing, and resetting tree items using the_childrenlist. This is a crucial update for managing the tree view items dynamically.
- Ensure that the initialization of
_childrento an empty list is done correctly. The current syntax seems incorrect for C#:- _children = []; + _children = new List<ITreeViewItem>();
The use of
Dispatcher.Invokeis appropriate for UI thread safety. However, consider adding error handling within the dispatcher's invoked methods to manage exceptions that might occur during UI updates.The method now handles different types of collection changes (Add, Remove, Reset) which is a robust design choice for dynamic UI components like tree views.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (4 hunks)
Additional comments not posted (1)
Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (1)
35-35: The addition ofSystem.Linqis appropriate given the use of LINQ methods in the updated methods.
…for each new/old item. So don't handle multiple new/old items in the collection changed method. Only handle the first item.
There was a problem hiding this comment.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs (4 hunks)
Files skipped from review as they are similar to previous changes (1)
- Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs
MeniKadosh1
left a comment
There was a problem hiding this comment.
as discussed, those are risky changes to the ucList behavior, please do proper testing to all scenarios of list tree items change (copy/past, files changes, git changes, solutions shift, etc.)
cb4aaa8
into
Releases/Published-Official-Releases/Official-Release-2024.2
Thank you for your contribution.
Before submitting this PR, please make sure: