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

Fix second to last tooltip overflowing due to our wide player controls #6528

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

absidue
Copy link
Member

@absidue absidue commented Jan 7, 2025

Fix second to last tooltip overflowing due to our wide player controls

Pull Request Type

  • Bugfix

Related issue

Description

Fixes the second to last player tooltip overflowing.

Screenshots

tooltip

Testing

Open a video and decide if it looks better.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: eec8c7f

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 7, 2025 21:56
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 7, 2025
@kommunarr
Copy link
Collaborator

kommunarr commented Jan 7, 2025

issue: Looks like 3rd and 4th may need it too in some locales (tested in Russian):

Screenshot_20250107_160100
Screenshot_20250107_160440

@absidue
Copy link
Member Author

absidue commented Jan 7, 2025

Unironically probably easier just to revert our CSS overrides, than adding language specific offsets (the amount of offset needed for Russian is probably going to look horrible for English and other locales with much smaller labels), but I know that everyone else hates shaka-player's default UI for some reason, so I guess that is not an option.

@kommunarr
Copy link
Collaborator

kommunarr commented Jan 7, 2025

One other potential alternative is to calculate an inline-end padding for the label based on its width and position. white-space: wrap may also suffice for 3 and 4.

@absidue
Copy link
Member Author

absidue commented Jan 7, 2025

If that can be done purely in CSS sure. Keep in mind that the player can be lots of different sizes and on mobile we keep the normal layout (as squashing buttons right into the corners of a touchscreen makes them a lot harder to tap on, was a valid complaint with our old video.js player).

@efb4f5ff-1298-471a-8973-3d47447115dc

tbh im all for reverting the overwrites if we have to patch the player all the time

@kommunarr
Copy link
Collaborator

kommunarr commented Jan 8, 2025

This might have been missed as I added it as an edit, but white-space: wrap appears to suffice as a solution for the 3rd and 4th elements. I don't think this particular issue will recur from any future downstream changes once we address it, I'd imagine.

I also did a bit of testing with stuff like direction: rtl to try to get the titles to expand to the left rather than the right, but I wasn't able to get it to work here, so I think this should be fine.

@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Jan 9, 2025
@absidue
Copy link
Member Author

absidue commented Jan 11, 2025

white-space: wrap unfortunately doesn't work for me in full screen, it's okay in normal mode but in full screen it goes back to it's original single line display.

Copy link
Collaborator

@kommunarr kommunarr left a comment

Choose a reason for hiding this comment

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

Given that the 3rd and 4th are only a problem in some locales, and that this is the last major item for our next major version, I'm willing to go ahead with this as its own fix for the 2nd to last tooltip.

@kommunarr kommunarr added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Jan 14, 2025
@FreeTubeBot FreeTubeBot merged commit 394b083 into FreeTubeApp:development Jan 19, 2025
21 of 23 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 19, 2025
@absidue absidue deleted the tooltip-overflow branch January 20, 2025 06:35
SuperAKWA pushed a commit to SuperAKWA/FreeTube that referenced this pull request Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Player: Tooltips get cut off with long text
5 participants