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 seek preview thumbnails exceeding UI dimensions #661

Merged
merged 11 commits into from
Dec 20, 2024

Conversation

felix-hoc
Copy link
Contributor

@felix-hoc felix-hoc commented Dec 19, 2024

Description

Fix seek preview thumbnails exceeding the UI dimensions.

Fixes #569

Changes

  • set the seekPreview position inside of the label, and pass the value in px (instead of %)
  • check if the seekprevew label overflows the UI, and if so, limit its movement
  • add a padding around the seekbarlabel wrapper, to keep the thumbnail a certain distance from the UI edges
  • use span element instead of ::after for caret. This was required to "fix" the caret position to the cursor

Note: These changes cause a "Forced Reflow" (layout re-evaluation) when seek preview is active. However, the performance impact seems to be minimal, as only a small part of the layout tree needs to be re-evaluated.

Checklist (for PR submitter and reviewers)

  • CHANGELOG entry

@felix-hoc felix-hoc marked this pull request as ready for review December 20, 2024 09:00
@Andr3wid Andr3wid merged commit ec13139 into develop Dec 20, 2024
3 checks passed
@Andr3wid Andr3wid deleted the feature/PW-16297/prevent-seek-thumbnails-overflow branch December 20, 2024 09:01
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.

overlapping issue with seekbar thumbnails
2 participants