slint icon indicating copy to clipboard operation
slint copied to clipboard

feature: infinite list

Open std-microblock opened this issue 1 year ago • 3 comments

Infinite list is a commonly used component in UI development, but Slint doesn't have any standard support for it (or I looked for the wrong keyword?)

Please add it to standard widgets if possible.

std-microblock avatar Dec 09 '23 09:12 std-microblock

Support for infinite lists is something that I think mostly belongs into a custom model implementation. But the ListView may need to communicate to the model that the end of the current list was reached (or maybe soon before that), so that the model can grow as needed, for example by fetching more data from the network.

tronical avatar Dec 11 '23 10:12 tronical

I presume that the official support of infinity virtual list can be pretty beneficial to the developers' experience, as it's not easy to implement it by the developer itself at far as my investigation. also, it seems that there is no such thing like npm for slint, so even one developer implemented it, it is hard to share it with other developers.

std-microblock avatar Dec 11 '23 12:12 std-microblock

The problem is that I found it difficult to implement virtual list in the current version of slint, especially for infinite list that can scroll both up and down(which is what I'm now attempting to implement) ,as some essential stated of implementing it, like height of items, and current total height is not exposed to the developers. by the way, some essential functionalities for implementing virtual list seem to be missing, like optional instantiation of child components.

std-microblock avatar Dec 11 '23 12:12 std-microblock