scribe-org / Scribe-Android

Android app with keyboards for language learners
GNU General Public License v3.0
41 stars 40 forks source link

Migrate Fragments in ViewPager to Jetpack Compose #150

Open angrezichatterbox opened 1 month ago

angrezichatterbox commented 1 month ago

Terms

Description

We need to migrate the existing Fragments in the ViewPager2 (SettingsFragment, AboutFragment, and MainFragment) to Jetpack Compose. Additionally, the navigation bar and ViewPager2 host must be updated to align with the new Compose implementation. This migration will enhance performance and maintainability by utilizing the declarative UI approach of Compose.

More details of the migration can be found at the following link:

CodeLabs for Jetpack Compose from XML

Migration Strategy

Contribution

I would love to work on this and am happy to assist anyone fix this issue.

realjoni17 commented 1 month ago

hi i want to contribute to this

angrezichatterbox commented 1 month ago

Yes, feel free to work on this issue. In case of queries feel free to ask them here :) Thanks

andrewtavis commented 1 month ago

Looking forward to the contribution, @realjoni17!

angrezichatterbox commented 1 week ago

Hi @realjoni17, just checking in—are you still working on this issue? If you need any help, please don’t hesitate to reach out. We’re here to support you!

andrewtavis commented 3 days ago

Hey @realjoni17 👋 We would like to get to this issue soon, so hope it's ok that @angrezichatterbox takes over :) Please let us know if you'd like to work on another issue!

andrewtavis commented 3 days ago

CC @Jag-Marcel for collaboration with @angrezichatterbox on this issue :)

angrezichatterbox commented 3 days ago

I will explore the two key aspects discussed during the sync: the ability of ViewPager to handle both Compose and XML simultaneously. If feasible, we can create individual pages as separate issues. I will write down further steps here after I find more about that.

angrezichatterbox commented 3 days ago

We can definitely make it work with both fragments and Compose in ViewPager2. I’ll start by creating the base PR to update the main activity, set the content view to Compose, and get the gesture controls working between the two (Fragment and Compose).

Then, @Jag-Marcel, we can split the work on the Settings and About pages. If you want, feel free to grab one or both—I’m happy to split the work.

To get started with Compose, the About page might be a good entry point, since it’s primarily about creating the UI elements and working with a RecyclerView. The Settings page, on the other hand, could be a bit trickier, especially with handling dark and light modes.

Once the pages are migrated, we can look into switching from ViewPager2 to a Compose-native pager (like HorizontalPager) for a cleaner, more Compose-friendly approach.

Should I make a separate issue for these? or it could be done one by one considering the same issue? @andrewtavis

andrewtavis commented 3 days ago

I think separate issues makes sense, @angrezichatterbox! Please ping @Jag-Marcel in the one you'd envision for him :) Maybe once those issues are made we can close this one.