Implement fling on scrollbar
Add velocity to the scroll area when the user lifts up their fingers while dragging it, just like on iOS.
I like this suggestion. The ios native ones feel great because of this.
This is very low priority for me as I am focusing on Compose Desktop/Web right now.
If anyone wants to have a go at it, feel free to do so. If you need more clarifications about it, feel free to reply to this issue.
All related code is in ScrollArea.kt
I think this is behavior is now implemented in CMP 1.8.0, right?
@krizzu how so?
CMP 1.8.0 has a native iOS scroll physics, but I must have misunderstood - we're not talking about just iOS platforms, right?
As far as I understand and tested it, it just tries to mimic the native scroll implementation and it is not related to the scrollbar at all. It is just a custom overscroll effect for iOS.
As far as I understand and tested it, it just tries to mimic the native scroll implementation and it is not related to the scrollbar at all. It is just a custom overscroll effect for iOS.
If you folks are talking about the announcement about iOS being stable, then @HLCaptain is right. The CMP team introduced a Overscroll effect that mimics the bouncy effect of iOS. Unstyled makes use of that API so that you can further customize that effect further (such as which areas should it be applied to).
Regarding the fling on the scrollbar that is a different topic entirely. I want to revisit scrollbars now that iOS hit stable and replace the original implementation with a new one, more fitting for Unstyled now that the lib is becoming more popular in the community.
Make sense, I mistakenly took other implementation as this library's scrollbar, apologies for the confusion 🙏