Intent to Implement: CollectionView and SelectionManager in Dart for ObservableList
I'm getting into some non-trivial infrastructure and I wanted to put the word out.
The story:
- The Observe package exposes
ObservableList<E>, which works with Model Driven Views (mdv) to enable dynamic lists in your UI. This is all wrapped up with Polymer. - I'd be nice to have a generic way to sort and filter an input list.
CollectionView<E>wraps anObservableList<E>with filter and sort properties. Changes to the source list or the properties cause theCollectionView, which is a readonly implementation ofObservableListto update accordingly. SelectionManager<E>also wraps anObservableList<E>. It appears asObservableList<Selectable<E>>.Selectablehas two properties:E get valueandbool get isSelected. It handles the semi-gnarly process of managing selection (single-selection to start with, then multi-selection at some point--hopefully).
These are core infrastructure pieces that, frankly, I miss from .NET/WPF.
I'm not ready to share code yet, but I wanted to give folks a heads-up.
Ideally, these types of concepts would be once (or rarely), tested like crazy, and used everywhere.
I may try to get them into the Observe package at some point, once they are baked.
If anyone has suggestions, feedback, other implementations, or interest, please let me know.
