pushpalroy / JetLime

A Kotlin Multiplatform library to display a timeline view in Android. 🍋
https://jetlime.pushpalroy.com
MIT License
431 stars 25 forks source link

Make API scalable and more fexible #18

Closed pushpalroy closed 7 months ago

pushpalroy commented 8 months ago

The current implementation of JetLime is a bad API design! 😞 The library is good for simple use cases but fails to cater to more complex ones.

Why?

The library provides a composable JetLimeView and all the other aspects like items, config, etc can only be passed by objects. This restricts control over the item composables. For example, adding a click listener to individual items is currently impossible. The only possible way is to pass a click listener via the Modifier of the content Composable which is a parameter of the JetLimeItem class. But this makes the content clickable, not the entire item.

Solution

A more robust solution is needed and this API should be redesigned to fit every use case! 🙌🏻