Skip to content

Fix Long Audio/Dubs text label puses UI Controls on Player Off Screen in Portrait mode. #12699

Merged
TobiGr merged 2 commits intoTeamNewPipe:devfrom
Zer0tier:issue#12499
Oct 14, 2025
Merged

Fix Long Audio/Dubs text label puses UI Controls on Player Off Screen in Portrait mode. #12699
TobiGr merged 2 commits intoTeamNewPipe:devfrom
Zer0tier:issue#12499

Conversation

@Ljn0626
Copy link
Copy Markdown
Contributor

@Ljn0626 Ljn0626 commented Oct 11, 2025

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

Constrain audioTrackTextView width (maxWidth="110dp") and single line + ellipsize="end" + scrollHorizontally="true", so it never wraps or steals too much space.

Before/After Screenshots/Screen Record

  • Before: With long English/Spanish labels, the More options button could be pushed off-screen
3b1144a61388ff6c1bd9799c790d77b4 bcc59b3d652669fb7cdc6a1da62c89ef
  • After: Right-side controls remain visible; the audio track label stays on a single line with ellipsis
image image

Fixes the following issue(s)

Relies on the following changes

  • android:singleLine="true"
    android:ellipsize="end"
    android:scrollHorizontally="true"
    android:maxWidth="110dp"

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 11, 2025
@TobiGr TobiGr added bug Issue is related to a bug GUI Issue is related to the graphical user interface player Issues related to any player (main, popup and background) labels Oct 11, 2025
@TobiGr
Copy link
Copy Markdown
Contributor

TobiGr commented Oct 11, 2025

Thank you for the PR.
Setting a max width might not be the best approach to solve this problem as demonstrated on different screen sizes below:

small screen medium / large screen
The arrow button to expand the menu is barely on screen There is plenty of room left which could be used to show more information about the selected audio track
grafik grafik

An alternative could be to set the layout_width to zero and sepcify a layout_weight.

@Ljn0626
Copy link
Copy Markdown
Contributor Author

Ljn0626 commented Oct 12, 2025

I think now it works. The results are as follows:
d7df1f2fdde8e400640ee7b50268ecd9
633510ce65195ff9b1dfef1d9e077f09

@TobiGr
Copy link
Copy Markdown
Contributor

TobiGr commented Oct 12, 2025

Thank you. Just squash your last two commits and set a helpful commit message and after that we are good to go!

@Ljn0626
Copy link
Copy Markdown
Contributor Author

Ljn0626 commented Oct 13, 2025

Done — I’ve squashed the last two commits into one.

@TobiGr
Copy link
Copy Markdown
Contributor

TobiGr commented Oct 13, 2025

Thanks. Please take a look at your commit message again.
The first line should be descritptive and tell the reader what was changed in the commit, e.g. [player] Fixed long audio track label pushing controls off screen. The next line can contain more detail information why the change was made or how it is implented. You squashed your commits - which is good - but this also means that you need to take a look at the commit message again. In that commit you neither "Replace marginRight with marginEnd to support RTL" nor "use layout_weight instead of maxWidth" - maxWidth does not occur in the code changes at all.

- audioTrackTextView: layout_width=0dp + layout_weight=1
- Make it singleLine with ellipsize="end"
- When not fullscreen, hide metadataView so an empty weighted container doesn’t reserve space
- Result: controls stay visible on small screens; longer labels can use space on larger screens
@Ljn0626
Copy link
Copy Markdown
Contributor Author

Ljn0626 commented Oct 14, 2025

Thanks, and sorry for the confusion. I removed the bullets that weren’t reflected in the final diff and amended the message to accurately describe the changes (weight-based layout for audioTrackTextView, singleLine+ellipsis, and hiding metadataView when not fullscreen).

Copy link
Copy Markdown
Contributor

@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

@TobiGr TobiGr enabled auto-merge October 14, 2025 11:18
@TobiGr TobiGr merged commit 09e4bea into TeamNewPipe:dev Oct 14, 2025
5 checks passed
@litetex
Copy link
Copy Markdown
Member

litetex commented Oct 15, 2025

Hey I think this PR broke the player (if not in full screen):

It looks like all other items are now no longer correctly aligned to the right side...

grafik

@Stypox
Copy link
Copy Markdown
Member

Stypox commented Oct 16, 2025

@Ljn0626 could you open another PR to fix the problem reported by @litetex? Thanks in advance :-)

@Ljn0626
Copy link
Copy Markdown
Contributor Author

Ljn0626 commented Oct 16, 2025

Thanks for the report — you’re right, my previous change inadvertently hid metadataView, which removed its weight from the row and broke the right-end alignment in non-fullscreen. Sorry for the regression — fix incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug GUI Issue is related to the graphical user interface player Issues related to any player (main, popup and background) size/small PRs with less than 50 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long Audio/Dubs text label pushes UI Controls on Player Off Screen in Portrait mode.

4 participants