Scribe-Android icon indicating copy to clipboard operation
Scribe-Android copied to clipboard

Migrate Fragments in ViewPager to Jetpack Compose

Open angrezichatterbox opened this issue 1 year ago • 3 comments

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.

angrezichatterbox avatar Sep 23 '24 19:09 angrezichatterbox

hi i want to contribute to this

realjoni17 avatar Oct 02 '24 16:10 realjoni17

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

angrezichatterbox avatar Oct 02 '24 16:10 angrezichatterbox

Looking forward to the contribution, @realjoni17!

andrewtavis avatar Oct 02 '24 22:10 andrewtavis

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!

angrezichatterbox avatar Nov 11 '24 06:11 angrezichatterbox

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 avatar Nov 16 '24 15:11 andrewtavis

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

andrewtavis avatar Nov 16 '24 15:11 andrewtavis

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 avatar Nov 16 '24 16:11 angrezichatterbox

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

angrezichatterbox avatar Nov 17 '24 06:11 angrezichatterbox

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.

andrewtavis avatar Nov 17 '24 09:11 andrewtavis

This issue can be resolved once we complete #256.

angrezichatterbox avatar Dec 06 '24 13:12 angrezichatterbox

Closed by #281

angrezichatterbox avatar Jan 02 '25 11:01 angrezichatterbox

Thanks for the amazing work and the persistence to bring it all in, @Saifuddin53! Really some amazing work 😊

andrewtavis avatar Jan 02 '25 11:01 andrewtavis

My pleasure @andrewtavis ☺️

Saifuddin53 avatar Jan 02 '25 11:01 Saifuddin53