Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checks off
Consider unifying TreeNodeVM with the underlying flat item view model.
in#1048
Successor to:
Need to merge previous PR if you want a slightly cleaner diff against main, as this PR builds upon it.
(Or just look at the new commits since that PR in isolation)
This is a prototype which shows an implementation of inlining what was formerly
TreeNodeVM
directly into the ViewModels, for cleanliness. This PR adds the new system for doing so viaIDynamicDataTreeItem<TItem, TKey>
, and implements it for theView Mod Files
view.This PR is purely for feedback/iteration on the idea we had. i.e. a working prototype.
For @Al12rs and anyone else interested.
Notable Differences:
DynamicData tree creation changes from:
To
ViewModels that inherit from
IDynamicDataTreeItem
must expose 2 more properties.Aside from that, no difference in usability from consumer end. The reactiveness works just a-ok, we can access children, access parents. etc.
The
TreeNodeVM
wrapper is no longer needed, the hack of re-broadcastingPropertyChanged
from innerItem
is no longer needed, and code that interacts with the ViewModel no longer needs to have.Item
all over the place. This saves on the amount of code we have to write.Logically speaking, there's no difference in how things operate behind the scenes. The difference is,
Node<TObject,TKey>
now holds a transitive reference toTItem
instead ofTreeNodeVM<TItem, TKey>
via the.Children.Connect()
subscription.