Skip to content
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

Proposal: allow incremental loading for grouped collections #2685

Open
FrayxRulez opened this issue Jun 16, 2020 · 3 comments
Open

Proposal: allow incremental loading for grouped collections #2685

FrayxRulez opened this issue Jun 16, 2020 · 3 comments
Labels
area-ItemsRepeater feature proposal New feature proposal team-Controls Issue for the Controls team

Comments

@FrayxRulez
Copy link

Proposal: allow incremental loading for grouped collections

Currently CollectionViewSource will ignore ISupportIncrementalLoading interface if the item source is a grouped list. Even implementing the behavior would lead into catastrophic failures at runtime (Not sure if this is still the case, actually, but it was last time I tried).
Developers usually have to end up with (not really optimal) workaround solutions, such as feeding the ListView with a ObservableCollection<object> collection and including group headers directly in it, having to deal with ItemTemplateSelectors, ItemContainerStyleSelectors, and so on, and other stuff, such multiple/single selection handling. This would also end up with a lot of compromises in terms of UI, as in the following example, that are kind of confusing for the users:
image

Summary

ISupportIncrementalLoading interface should be supported by grouped CollectionViewSource and ListView.

Rationale

  • Lists grouped by date and retrieved by a remote endpoint need this.
  • Current possibilities require too many workarounds.
  • Migrating to ItemsRepeater would require too much work in many scenarios (Especially as it doesn't support incremental loading as well).

Scope

Capability Priority
This proposal will allow developers to implement incremental loading in grouped CollectionViewSources Must

Important Notes

Open Questions

@FrayxRulez FrayxRulez added the feature proposal New feature proposal label Jun 16, 2020
@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jun 16, 2020
@StephenLPeters StephenLPeters added area-ItemsRepeater team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Jun 16, 2020
@anawishnoff
Copy link
Contributor

@FrayxRulez, thanks for submitting this. My apologies that it's taken so long to get a reply!

@ranjeshj is there a reason that grouped CollectionViewSources don't allow for incremental loading?

@Difegue
Copy link

Difegue commented Aug 30, 2020

In a similar fashion, CollectionViewSources don't implement IItemsRangeInfo, which is classically used in random access data virtualization.

Both ISupportIncrementalLoading and IItemsRangeInfo are usually the go-tos for data virtualization in ListViews, and they're rather hard to use in grouped collections without workarounds as mentioned.

I stumbled into this problem today, but some digging reveals it's been a pain point with WinRT dev for a while:
https://stackoverflow.com/questions/14186478/how-to-style-groups-of-data-as-they-are-loaded-incrementally-in-winrt
microsoft/Windows-universal-samples#803
https://stackoverflow.com/questions/34705422/does-iitemsrangeinfo-support-collectionviewsource
https://stackoverflow.com/questions/60317701/implement-deferred-item-loading-in-a-grouped-icollectionview

@ranjeshj
Copy link
Contributor

ranjeshj commented Sep 1, 2020

Both ISupportIncrementalLoading and IItemsRangeInfo seem targeted towards flat collections, not collection of collections, so I'm not entirely sure how these map in grouped cases. @MikeHillberg any ideas ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ItemsRepeater feature proposal New feature proposal team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

6 participants