NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Rewrite Issue 1: The Jetpack Compose Migration

Open opusforlife2 opened this issue 1 year ago • 18 comments

Feature description

Newpipe is intended to be migrated completely to Jetpack Compose. This is a meta issue to coordinate efforts and keep everyone informed.

Why do you want this feature?

See https://github.com/TeamNewPipe/NewPipe/discussions/10118.

Additional information

@snaik20 @uragiristereo @imashnake0 @lm41 @YongJunLim @AaronRietschlin @sandy-8925 @PrimoDev23 @EricDriussi @rahul-gill @Profpatsch @Chinaqth @acrodemocide @fuzzblob @XilinJia @GGindin @davidasunmo @chriss2401

You've been bulk-pinged because you volunteered at some point or other to help with the rewrite. Well, Newpipe is intending to avoid obscurity and obsolescence by clawing its way into the modern Android world, and now we've finally gotten to a state where you can help.

This is issue number 1 for tracking the rewrite efforts. More to follow. Let us know if you're willing and currently able to participate.

If anyone is already a Jetpack Compose expert/veteran here, please let us know about that too. Not everyone on the team is familiar with it.

Also, here's a bit of guidance from @Stypox on this: Guidelines.pdf

opusforlife2 avatar Jun 21 '24 23:06 opusforlife2

Ideally, we need small, incremental, no-brainer PRs so that nothing breaks as far as possible. Also so that reviewing and merging them is dead simple.

opusforlife2 avatar Jun 21 '24 23:06 opusforlife2

I have a solid understanding of Jetpack Compose and have begun migrating the settings pages to Compose. However, I've recently been occupied with other tasks and haven't been able to submit new PRs. I expect to be available in 1-2 weeks and will strive to contribute regularly.

If anyone is interested in helping with the settings redesign, I would greatly appreciate it. I can review contributions and take ownership of the settings module.

HatakeKakashri avatar Jun 22 '24 02:06 HatakeKakashri

Settings really is the first thing that needs to be overhauled. I'm glad you're working on it.

opusforlife2 avatar Jun 23 '24 00:06 opusforlife2

I'll add some compose specific points to keep in mind when writing new code and reviewing compose related pull requests:

  • compose is still a little behind in performance so we should make sure in code reviews to identify anything that'll contribute to performance betterment or degradation.
  • We should adopt a bottom-up approach, beginning with the foundational styling code, followed by the development of individual components, and culminating in the integration of these components into the screens. This method ensures that initial pull requests are self-contained and minimize breakage. In reviews, we'll be able to identify performance issues etc. We'll be able to use current styling info this way
  • we need to make sure somehow that new components works under different screen size, font size, screen zoom etc. configurations.

On refactor branch, currently, there's only rudimentary styling handling.

I'm good with layouts so I'll be able to help with basic styling code and making layout that'll work with different screen sizes properly

rahul-gill avatar Jun 23 '24 08:06 rahul-gill

@snaik20 I'd be happy to assist and have experience with Jetpack Compose as well as XML. Please let me know how I can contribute.

TheLogicals avatar Jun 24 '24 05:06 TheLogicals

@snaik20 I'd be happy to assist and have experience with Jetpack Compose as well as XML. Please let me know how I can contribute.

You could start adding PRs for https://github.com/TeamNewPipe/NewPipe/issues/9587. I have added the Jetpack compose setup and some initial work for debug page. So you could build on that and add me as reviewer for your PRs. Note that the compose work is currently added in refactor branch. So you need to use it as base for your PRs.

HatakeKakashri avatar Jun 24 '24 06:06 HatakeKakashri

@TheLogicals Would you like to be added to the volunteer list?

opusforlife2 avatar Jun 25 '24 02:06 opusforlife2

Hi Team,

I am a relative newbie to android development, mostly made simple apps with compose XML. I am familiar with the basics of mvvm, coroutines, flows, clean architecture in android, compose, hilt etc. I have interned as an android developer for 6 months.

I was hoping to join the community and start contributing.

Do you guys have a discord or slack? the matrix link on the website doesn't seem to work. Where do I get access to community discussion and get started contributing.

Please help and thanks 🙏🙏

xidsyed avatar Jul 17 '24 12:07 xidsyed

the matrix link on the website doesn't seem to work

Thanks for the heads up! The website link is outdated. Please use the one in the Readme.

Edit: I see you've already joined the room. Marking as resolved.

opusforlife2 avatar Jul 17 '24 21:07 opusforlife2

Do you think a shared screen implementation like https://github.com/florisboard/florisboard/blob/master/app/src/main/kotlin/dev/patrickgold/florisboard/lib/compose/FlorisScreen.kt would be a good idea and a good starting point? It is used like this

lm41 avatar Jul 22 '24 10:07 lm41

@snaik20 I'd be happy to assist and have experience with Jetpack Compose as well as XML. Please let me know how I can contribute.

You could start adding PRs for #9587. I have added the Jetpack compose setup and some initial work for debug page. So you could build on that and add me as reviewer for your PRs. Note that the compose work is currently added in refactor branch. So you need to use it as base for your PRs.

Hi @snaik20 I want to help with #9587 but I see @Stypox closed #10850 here https://github.com/TeamNewPipe/NewPipe/pull/10849#issuecomment-2026125123 how do I get started, I'm new to opensource projects and I'm a bit lost

braiso-22 avatar Jul 31 '24 20:07 braiso-22

You could follow the plan here https://github.com/TeamNewPipe/NewPipe/pull/10849#discussion_r1518673800. I'm working on settings page redesign but haven't got time recently to add to it.

@snaik20 I'd be happy to assist and have experience with Jetpack Compose as well as XML. Please let me know how I can contribute.

You could start adding PRs for #9587. I have added the Jetpack compose setup and some initial work for debug page. So you could build on that and add me as reviewer for your PRs. Note that the compose work is currently added in refactor branch. So you need to use it as base for your PRs.

Hi @snaik20 I want to help with #9587 but I see @Stypox closed #10850 here https://github.com/TeamNewPipe/NewPipe/pull/10849#issuecomment-2026125123 how do I get started, I'm new to opensource projects and I'm a bit lost

HatakeKakashri avatar Aug 04 '24 10:08 HatakeKakashri

Ok, I'm going to start redoing the history and cache settings screen, looks simple to me

braiso-22 avatar Aug 04 '24 10:08 braiso-22

Ok, I'm going to start redoing the history and cache settings screen, looks simple to me

Thanks, I will help you out with reviews. Note that existing changes are in refactor branch, so base your changes on top of that

HatakeKakashri avatar Aug 04 '24 11:08 HatakeKakashri

Hi, I've created some draft code for settings screen in compose. This is the code This file shows a simple example of how we might use the compose components made. This is a little preview:

Screen_recording_20240811_233655.webm

If this seems fine, I'll write concrete code for the current settings layout but there's another issue of new settings layout, so what should be done.

rahul-gill avatar Aug 11 '24 18:08 rahul-gill

Hi, I would love to contribute.

Not sure if this was asked before, but is there a list / plan for devs to claim ownership of a subcomponent before submitting PR(e.g. comment fragment, playlist fragment)? So a new dev can check the list and claim one of the remaining work, avoiding duplicated effect.

cc @opusforlife2 @snaik20 for insight

toliuweijing avatar Aug 12 '24 07:08 toliuweijing

@rahul-gill There's already a PR for the issue you linked. You could check that out first.

@toliuweijing There's no such generalised checklist. For now, you could comment here that you're taking up a specific component to make sure someone hasn't already started working on it.

opusforlife2 avatar Aug 13 '24 12:08 opusforlife2

I responded to a similar issue that I was tagged in, but I thought I would respond here as well. The short answer is that I love this app and so have been wanting to volunteer some of my free time to help. Most of my experience is as a full stack web engineer, but I'm mildly familiar with Android and have been learning about JetPack Compose. As such, most of my focus has been on reviewing pull requests and testing the APK from the build on my Android as part of that review process.

I'll report back any questions or concerns I have on code changes in the review as well as the result of testing the APK on my Android. I may try my hand at picking up an issue for converting some of the code into JetPack compose (or I might even pick up an issue that fixes a bug and make the conversion as part of that process).

acrodemocide avatar Aug 24 '24 00:08 acrodemocide