kiwix-android
kiwix-android copied to clipboard
jb-compose or jetpack compose GUI
currently kiwix uses XML files to configure its GUI. android offers nowadays to compose and declare a GUI programmatically with jetpack compose: https://developer.android.com/jetpack/compose.
building on this foundation, jb-compose: https://github.com/JetBrains/compose-jb was created, which promises to facilitate desktop applications, and what they call "multiplatform" - i.e. android + desktop. here an example application extended by @arkivanov even for IOS: https://github.com/JetBrains/compose-jb/tree/master/examples/todoapp .
as kiwix is useful on multiple platforms, such a *compose approach might be interesting to follow.
@soloturn Thank you for the Feature request. I have been experimenting with Jetpack compose for the last couple of months. It's so great. By jetpack compose we can write more beautiful and complex screens with less code, we can reduce 30-40% UI boilerplate code and reuse code elsewhere as you mentioned above. We can start with small screens as we did files from java to kotlin, since it is a big improvement it needs to properly review because whole screens will rewrite (UI part not business logic). But currently kiwix-android doesn't have an active maintainer to do this. but in the future, if someone comes I'm more than happy to contribute to this migration ;)
@gouri-panda which screen would you choose to start?
@soloturn Hehe, It totally depends on @kelson42. As I previously pointed out this needs to be closely reviewed.
@gouri-panda just choose one which sounds reasonable to you?
@mhutti1 @abdulwd I would like to get your comments on this before further going on with this idea.
Looks interesting but I haven't used it so don't know the nitty-gritty. We should also check if it's being adopted by other projects/organizations as well & what are the shortcomings/trade-offs of using this framework.
If we plan to move I would choose the help activity because it's the simplest.
@abdulwd Pretty much all big and medium organizations started using jetpack-compose in all their application. They are waiting for a stable version to start shipping on production, which will happen after the end of July. Google rolled out release candidates in the mid of July. So the 1.0 stable may release in a couple of days.
Compose 1.0 stable is out 🎉
Compose is a great thing and must be adopted at some point in time or other. It really depends on the priorities of our app at this time. I agree with @gouri-panda that we lack an active maintainer as the changes will be required to be closely monitored and new tests will also be required to write.
IMO migrating to compose should not be the first priority as of now, as our app is not fast-paced in terms of UI, also we are in a good state of UI now. We should definitely consider setting up a new system (maybe a template branch) for creating new UI screens with compose along with corresponding gradle changes, and in turn migrating the old screens to compose UI.
@soloturn The first thing that we should consider is to create the KiwixTheme duplicating the same from the XML pov. Then creating good (reusable and reducing boilerplate) custom screen classes (functions in compose), which will kickstart creating new compose screens for everyone.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.