Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #975 +/- ##
==========================================
+ Coverage 82.61% 82.71% +0.10%
==========================================
Files 48 48
Lines 2968 2980 +12
==========================================
+ Hits 2452 2465 +13
+ Misses 516 515 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
elios-fullphysio
force-pushed
the
fix/chapter-label-inside-bar
branch
from
October 22, 2026 16:01
c981c84 to
7c28cdb
Compare
The chapter label was centered on the pointer with no clamp and no width limit, so near either end of the bar half of it fell outside the player and any rounded clip around the player cut it off; long titles overflowed the player too. Measure the label, clamp its left edge to [0, barWidth - labelWidth] so it stops flush with the edges while the pointer slides under it (YouTube behaviour), and cap its width at the bar width so long titles ellipsize inside the player. Same code path for hover and drag, and for the three skins.
elios-fullphysio
force-pushed
the
fix/chapter-label-inside-bar
branch
from
October 22, 2026 16:17
7c28cdb to
d2469ba
Compare
diegotori
added a commit
that referenced
this pull request
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
With
ChewieController.chaptersset, the label shown above the progress bar while hovering or scrubbing (<chapter title> · <time>) is centered on the pointer with no clamp and no width limit. Two visible problems:ClipRRectwith rounded corners is the usual case) cuts it off, so the beginning or the end of the title is missing exactly where the user points.Change
_buildChapterLabelnow measures the label with aTextPainter(same style and text scaler as the renderedText), caps its width at the bar width, and clamps its left edge to[0, barWidth − labelWidth]. In the middle of the bar nothing changes: the label stays centered on the pointer. Near an edge it stops flush with the bar while the pointer keeps sliding under it, which is how YouTube handles its chapter tooltip. Long titles ellipsize inside the bar instead of overflowing.Hover and drag share the path, so Material, desktop and Cupertino controls all get the behaviour.
Tests
chapter label stays inside the bar at both ends: hover at the first pixel, the last pixel and the center of the bar; the pill never crosses the bar's edges and is still centered on the pointer in the middle.a long chapter title is capped to the bar width.Full suite passes (280 tests).