Skip to content

Keep user set textTrack margins - #190

Merged
MattiasBuelens merged 3 commits into
mainfrom
bugfix/text-track-margins
Sep 16, 2026
Merged

MattiasBuelens merged 3 commits into
mainfrom
bugfix/text-track-margins

Conversation

@ceyhun-o

Copy link
Copy Markdown
Contributor

Previously, the UI directly overwrote textTrackStyle.marginTop and textTrackStyle.marginBottom whenever the controls were shown or hidden. As a result, margins configured by the user were lost during control-bar transitions.

This change tracks user-defined margins separately from the temporary margins applied by the UI. While controls are visible, the effective margin is the larger of:

  • The margin configured by the user.
  • The space required to prevent cues from overlapping the visible UI controls.

When the controls are hidden, the user-defined margins are restored.

No new public API is introduced.

ceyhun-o and others added 3 commits September 16, 2026 08:58
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ceyhun-o ceyhun-o added the enhancement New feature or request label Sep 16, 2026
@changeset-bot

changeset-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e78971

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@theoplayer/web-ui Patch
@theoplayer/react-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@MattiasBuelens
MattiasBuelens merged commit 56c506f into main Sep 16, 2026
1 check passed
@MattiasBuelens
MattiasBuelens deleted the bugfix/text-track-margins branch September 16, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants