Open zadjii-msft opened 1 month ago
Kristen and I were also discussion if extensions just return items and items have a group string or something and the UI does the grouping vs. extensions having to structure their data. Then it could just be
public async Task<IAsyncEnumberable<IListItem>> Getitems()
or something (maybe we need an IAsyncOperation for WinRT), but then the extension author couldyield return
here maybe as results come in and get transposed to the item from the other data model?
(And IListItem
would have a Group
string or identifier)
Doc ref: C# - Iterating with Async Enumerables in C# 8 | Microsoft Learn
This is me reading between the lines from Teams chats I missed.
As currently written (10/21), IListPage.GetItems returns a list of ISections, each Section filled with items.
That, as it turns out, is really dumb and hard to consume. So let's just not.
It's easier to stick another property on IListItem that represents the grouping. Then we can very easily map that property to groups.
/cc @michael-hawker