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

Added bottom main-tabs feature #9719

Merged
merged 7 commits into from
Jul 18, 2023
Merged

Conversation

Marius1501
Copy link
Contributor

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

  • Added the feature that the main-tabs can be set to the bottom
  • Added a toggle in the apperance-settings for this feature

Before/After Screenshots/Screen Record

Main-Page Appearance-Settings
NewPipe2 – MainFragment java  NewPipe2 app main  25 01 2023 19_29_17 NewPipe2 – MainFragment java  NewPipe2 app main  25 01 2023 19_29_33

Fixes the following issue(s)

Due diligence

@TobiGr TobiGr added feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface labels Jan 25, 2023
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 don't think it looks so good when the mini player is open. Maybe it would be better if you made the tab layout colored like the app background, when it is at the bottom? When at the top, it should still be service-colored.

How does the YouTube app lay things out when the mini player is open?

Other than that, looks simple enough and mostly good to me. Thank you!

@@ -106,6 +110,7 @@ public void onResume() {
} else if (hasTabsChanged) {
setupTabs();
}
updateTabsPosition();
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't you do this only if tab settings were actually changed, to avoid useless recalculations?

app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
@tsiflimagas
Copy link
Contributor

I think what makes it look odd isn't the colour (could be too), but the placement when the player is minimized. Bottom bar should always stay at the bottom, mini player shouldn't move it from there, but go on top of it. Then it would also look uniform with the system navigation bar.

@Stypox
Copy link
Member

Stypox commented Jan 29, 2023

Yeah, that's true. But moving the bottom player to a different position in the UI would be pretty difficult I think.

@SameenAhnaf

This comment was marked as outdated.

@Stypox
Copy link
Member

Stypox commented Feb 7, 2023

Making bottom tabs a permanent change could be a solution.

No, you would still have two nested tab layouts which is not a good idea. Also, this is unrelated to this PR.

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.

Could you briefly try to see if there is a way to put the tab layout below the mini player? If that's not possible don't worry.

@Stypox
Copy link
Member

Stypox commented Feb 7, 2023

Thanks! There are still some comments you didn't solve (also from the previous round of reviewing). Also, please mark comments you have solved as "Resolved", in order for you to keep track of them in an easier way. Also, did you read the review top content?

Could you briefly try to see if there is a way to put the tab layout below the mini player? If that's not possible don't worry.

@Marius1501
Copy link
Contributor Author

@Stypox I tried to put the tab layout below the mini player but it hasn`t worked yet. Maybe you have a hint how to solve the problem?

@MD77MD

This comment was marked as off-topic.

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 two commits fixing up the comment that were not solved yet (i.e. the one about only updating when needed). I also improved the code in updateTabLayoutPosition to make it simpler to grasp. I tested on my device and two emulators (API 22 and API 33) and everything worked as expected. Don't worry about the player position, it's not the best but it would be too difficult to change. Do you think my changes are ok? Thanks again!

@sonarcloud
Copy link

sonarcloud bot commented Feb 26, 2023

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

@ghost

This comment was marked as spam.

@TobiGr TobiGr merged commit 4711370 into TeamNewPipe:dev Jul 18, 2023
This was referenced Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app 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 show tabs in home page on bottom of screen
6 participants