Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate comment fragments to Jetpack Compose #11060

Open
wants to merge 51 commits into
base: refactor
Choose a base branch
from

Conversation

Isira-Seneviratne
Copy link
Member

@Isira-Seneviratne Isira-Seneviratne commented May 12, 2024

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Update the Compose dependencies to their latest versions.
  • Add the Compose library for Coil to handle image loading.
  • Add the LazyColumnScrollbar library to display scrollbars in Compose.
  • Migrate the comments to use Jetpack Compose and replace the comment replies fragment with a bottom sheet dialog.
  • Handle loading the comments and comment replies using the Paging library and a view model.

Before/After Screenshots/Screen Record

  • Before:

Screenshot_20240621-161715
Comments

Screenshot_20240621-183000
Comment replies

  • After:

Screenshot_20240621-161728
Comments

Screenshot_20240623-110556
Screenshot_20240623-110604
Comment replies

  • Recording
Screen_recording_20240708_162549.mp4

Relies on the following changes

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added size/medium PRs with less than 250 changed lines size/large PRs with less than 750 changed lines and removed size/medium PRs with less than 250 changed lines labels May 12, 2024
@Isira-Seneviratne Isira-Seneviratne changed the base branch from dev to refactor May 17, 2024 03:55
@Isira-Seneviratne Isira-Seneviratne force-pushed the Comments-Compose branch 2 times, most recently from c77ea74 to c106fb0 Compare May 17, 2024 04:02
@Isira-Seneviratne Isira-Seneviratne marked this pull request as ready for review May 17, 2024 04:48
@github-actions github-actions bot added size/giant PRs with more than 750 changed lines and removed size/large PRs with less than 750 changed lines labels Jun 18, 2024
@Isira-Seneviratne Isira-Seneviratne force-pushed the Comments-Compose branch 5 times, most recently from c834fd0 to 8ee1817 Compare June 19, 2024 12:30
@Isira-Seneviratne Isira-Seneviratne changed the title Convert comment replies views to Jetpack Compose Migrate comment fragments to Jetpack Compose Jun 21, 2024
@Isira-Seneviratne Isira-Seneviratne force-pushed the Comments-Compose branch 3 times, most recently from 31f1fcf to e973ce1 Compare July 3, 2024 13:28
@Isira-Seneviratne Isira-Seneviratne force-pushed the Comments-Compose branch 5 times, most recently from bace455 to 10dd571 Compare July 28, 2024 02:49
Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the effort. Looks overall good to me. Very good UI and UX changes that make the app feel modern 👍

The light theme looks like this:

Quick look, not a final review because I am currently lacking spare time

@TobiGr TobiGr added GUI Issue is related to the graphical user interface comments Anything to do with comments and comment replies under videos/audios labels Aug 28, 2024
@Isira-Seneviratne
Copy link
Member Author

Thank you for the effort. Looks overall good to me. Very good UI and UX changes that make the app feel modern 👍

The light theme looks like this:

Quick look, not a final review because I am currently lacking spare time

Fixed the issue, it was due to a recent change.

@tsiflimagas
Copy link
Contributor

Hi, thank you so much for your work, it's terrific! Since your rewriting this part, do you think it would be a good chance to tackle #7191? Support in extractor has been added if I'm not wrong. Also, perhaps an m3 coloured scroll handle would blend in better. I would comment on a few more stuff, but they're things that were there before the migration (replies count on the bottom sheet header, copy on long press), so I guess you'll add them back eventually.

@TobiGr
Copy link
Member

TobiGr commented Aug 28, 2024

@tsiflimagas we are happy about every reviewer, so if you have any comments on the PR leave them here😉

@Isira-Seneviratne
Copy link
Member Author

Hi, thank you so much for your work, it's terrific! Since your rewriting this part, do you think it would be a good chance to tackle #7191? Support in extractor has been added if I'm not wrong.

As far as I can tell, it hasn't been implemented yet, seeing as that issue is still open.

Also, perhaps an m3 coloured scroll handle would blend in better.

I'm using a third-party library for the scrollbars, since first-party support is yet to be implemented.

@tsiflimagas
Copy link
Contributor

we are happy about every reviewer, so if you have any comments on the PR leave them here😉

Thank you!

As far as I can tell, it hasn't been implemented yet, seeing as that issue is still open.

The issue is open on the app side, since it hasn't been implemented in the app. If I'm not wrong this PR has added the necessary support in the extractor.

I'm using a third-party library for the scrollbars, since first-party support is yet to be implemented.

By looking at the library's repo, it seemed to me that it offers the ability to edit scrollbars colour thus set it to an adaptive one, but maybe I got it wrong.

Also, it seems that none of the migrated fragments follows the black night theme. Perhaps it is planned to revamp app theming, or would it make sense to make these fragments follow app's theme as they it before?

@Isira-Seneviratne
Copy link
Member Author

we are happy about every reviewer, so if you have any comments on the PR leave them here😉

Thank you!

As far as I can tell, it hasn't been implemented yet, seeing as that issue is still open.

The issue is open on the app side, since it hasn't been implemented in the app. If I'm not wrong this PR has added the necessary support in the extractor.

Thanks, I missed that one.

I'm using a third-party library for the scrollbars, since first-party support is yet to be implemented.

By looking at the library's repo, it seemed to me that it offers the ability to edit scrollbars colour thus set it to an adaptive one, but maybe I got it wrong.

Yeah, it's possible to change the scrollbar colour. How does red (the primary colour) sound?

Also, it seems that none of the migrated fragments follows the black night theme. Perhaps it is planned to revamp app theming, or would it make sense to make these fragments follow app's theme as they it before?

Yeah, the black theme will need to be implemented.

@tsiflimagas
Copy link
Contributor

How does red (the primary colour) sound?

It's good I guess. The app hasn't been migrated to material You anyway, so it looks fitting. But you may choose what you find better, as the author of the PR.

@TeamNewPipe TeamNewPipe deleted a comment from sonarcloud bot Sep 8, 2024
Copy link

sonarcloud bot commented Sep 11, 2024

@ShareASmile ShareASmile added the rewrite Issues and PRs related to rewrite label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comments Anything to do with comments and comment replies under videos/audios GUI Issue is related to the graphical user interface rewrite Issues and PRs related to rewrite size/giant PRs with more than 750 changed lines
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Introduce Jetpack Compose for NewPipe UI
4 participants