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 option to display channel groups as list instead of grid #9207

Merged
merged 23 commits into from
Oct 27, 2022

Conversation

cern1710
Copy link
Contributor

@cern1710 cern1710 commented Oct 26, 2022

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

  • Created a list view for channel groups in the subscriptions page
  • Added a toggle button to toggle between the original card view to the newly added one
  • Unlike sort, toggle button will exist at all times
  • The newly formatted buttons conforms to the same logic as the ones previously. All existing buttons work as intended as they should and will automatically update the ones on the other display format when toggled
  • Retains a separate toggle button

Before/After Screenshots/Screen Record

Fixes the Following issue:

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.

Due diligence

@cern1710 cern1710 changed the title Add option to display channel groups as list instead of grid (Fully working alternative to #9204) Add option to display channel groups as list instead of grid (Fully working) Oct 26, 2022
@Stypox
Copy link
Member

Stypox commented Oct 26, 2022

Why did you create two PRs? Which one should be merged, this one or #9204? Once you create a PR you can easily just push more commits to it, there is no need to create a new PR each time we ask you to make changes

@cern1710
Copy link
Contributor Author

cern1710 commented Oct 26, 2022

@Stypox this one,. sorry for the confusion.

I panicked because of a deadline

@cern1710 cern1710 changed the title Add option to display channel groups as list instead of grid (Fully working) Add option to display channel groups as list instead of grid Oct 26, 2022
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

I pushed a commit that fixes a couple of implementation and logic issues. Some of the code not written by you (but that was there before this PR) had some problems that needed to be solved for this PR to work well. I also changed some of your code after some things around it changed: an important change is that I moved the list view state handling to the view model (which is the usual thing to do in Android). Take a look at the code in the commit for more information.

Please revert the changes to 5.json and FeedGroupEntity.kt. I don't know where those came from. Then I can re-review the code and this can be merged. Thank you for this neat and needed feature!

Here is a testing APK: app-debug.zip

@TobiGr TobiGr added the GUI Issue is related to the graphical user interface label Oct 26, 2022
@opusforlife2
Copy link
Collaborator

opusforlife2 commented Oct 26, 2022

While we're at it, I think the New button should be at the top.

Edit: Cosmetic issue: there is flickering in between switching states. If it can't be avoided, maybe an animation to smooth it out?

@cern1710 cern1710 requested a review from Stypox October 27, 2022 09:06
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

@opusforlife2 done. I'm merging this if no issues arise in this APK (please test!): app-debug.zip

@cern1710
Copy link
Contributor Author

cern1710 commented Oct 27, 2022

@Stypox Hi, I just ran through the APK and found an issue where the subscribers list would slide from its original position to the bottom everytime someone goes to another page and goes back to subscribers.

@Stypox
Copy link
Member

Stypox commented Oct 27, 2022

If you want to try to fix it go ahead, otherwise I will probably take care of it later or in the following days

@Stypox Stypox force-pushed the list-view-alt-alt-implementation branch from 9d76f96 to ea875c5 Compare October 27, 2022 15:25
@opusforlife2
Copy link
Collaborator

Looks great! One last thing: can the tap area of the layout change button be increased? I'm seeing some hits and misses trying to tap it. It's close enough to the edge of the screen that my phone cover is interfering somewhat.

@Stypox
Copy link
Member

Stypox commented Oct 27, 2022

@opusforlife2 done

Hi, I just ran through the APK and found an issue where the subscribers list would slide from its original position to the bottom everytime someone goes to another page and goes back to subscribers.

@cern1710 btw, I could not reproduce. Could you provide more precise reproduction instruction, or a video?

@opusforlife2
Copy link
Collaborator

done

Perfect! The button can be easily tapped now.

@cern1710
Copy link
Contributor Author

@opusforlife2 done

Hi, I just ran through the APK and found an issue where the subscribers list would slide from its original position to the bottom everytime someone goes to another page and goes back to subscribers.

@cern1710 btw, I could not reproduce. Could you provide more precise reproduction instruction, or a video?

  1. Add a few channel groups.
  2. Click on one of them.
  3. Press the back button.

The subscription page (along with its channels) will fall down from the top, which has probably something to do with the animations? Perhaps this can be solved by another PR

@opusforlife2
Copy link
Collaborator

Oh. I got it. The exact same thing happens when you toggle from list layout to grid. The Subscriptions section moves down in a slow animation, which makes it overlay other stuff for a noticeable duration.

@sonarcloud
Copy link

sonarcloud bot commented Oct 27, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

I tried to mess around with the animations, but I could not find a way to make everything work correctly. So yeah, let's stick with this implementation. Thanks!

@Stypox Stypox merged commit 3cef7f3 into TeamNewPipe:dev Oct 27, 2022
@cern1710 cern1710 deleted the list-view-alt-alt-implementation branch October 27, 2022 22:54
@cern1710 cern1710 restored the list-view-alt-alt-implementation branch October 27, 2022 22:57
@SameenAhnaf
Copy link
Collaborator

@cern1710 Thanks for the PR! It also solved #8913.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issue is related to the graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to display channel groups as list instead of grid
5 participants