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

Add Scroll to top feature in comments view #11654

Closed
wants to merge 3 commits into from

Conversation

katalllen
Copy link

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

  • addition of "scroll to top button"
  • when clicked takes user to the top of the comments section

Before/After Screenshots/Screen Record

  • Before:
    before

  • After:
    newPipeAfter

Fixes the following issue(s)

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 the size/small PRs with less than 50 changed lines label Oct 27, 2024
@TobiGr
Copy link
Contributor

TobiGr commented Oct 27, 2024

Thank you for your PR. Due to the influx of new PRs review might take some time. Please let me know if you are an ANU student for internal statistics and because I am writing my master thesis about open source contributions as part of learning computer science and computer science education at university.

@ShareASmile ShareASmile added feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface comments Anything to do with comments and comment replies under videos/audios labels Oct 27, 2024
@ShareASmile ShareASmile changed the title Scroll to top of comments Add Scroll to top feature in comments view Oct 27, 2024
@katalllen
Copy link
Author

Hi @TobiGr, thank you so much for your quick reply. Yes I am an ANU student, I hope your thesis goes well :)

@Jean-BaptisteC
Copy link

I prefer a fab with top arrow icon :)
https://m2.material.io/components/buttons-floating-action-button

Copy link

@itsaky itsaky left a comment

Choose a reason for hiding this comment

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

A FloatingActionButton with an upward-facing arrow icon would be a better choice for this purpose. Also, the button could be hidden if the scroll position is already at the top of the list.

android:layout_alignParentBottom="true"
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:onClick="onClick"
Copy link

Choose a reason for hiding this comment

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

The onClick attribute is redundant since you're using setOnClickListener to listen for click events.

@@ -28,6 +29,7 @@ public class CommentsFragment extends BaseListInfoFragment<CommentsInfoItem, Com
private final CompositeDisposable disposables = new CompositeDisposable();

private TextView emptyStateDesc;
private Button scrollToTopButton;
Copy link

Choose a reason for hiding this comment

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

The scrollToTopButton is not referenced anywhere other than the initViews method. You should remove the field and make it a local variable instead.

Copy link

sonarqubecloud bot commented Nov 2, 2024

@Stypox
Copy link
Member

Stypox commented Nov 12, 2024

NewPipe is currently in maintenance mode and is not accepting PRs for new features, as explained on top of the README, especially niche features like this one. The refactor branch contains a scrollbar which is equivalent to having a "scroll to top" button, you can download an APK from here: https://github.com/TeamNewPipe/NewPipe-refactor-nightly. Thank you anyway for your contribution!

@Stypox Stypox closed this Nov 12, 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 feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface size/small PRs with less than 50 changed lines
Projects
No open projects
Status: Rejected
Development

Successfully merging this pull request may close these issues.

Scroll to top feature in comments view
6 participants