Skip to content

fix(video): 缩略图锚定可见进度轨道,间距约减半(#1953 复测) - #1966

Merged
lqtdys merged 1 commit into
mainfrom
fix/1953-thumb-track-anchor
Dec 2, 2026
Merged

lqtdys merged 1 commit into
mainfrom
fix/1953-thumb-track-anchor

Conversation

@lqtdys

@lqtdys lqtdys commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

问题(#1953 复测残留)

用户复测:缩略图与进度条时间去重已好(#1962/#1964 有效);缩略图与进度条的间距有点高,调低点。

根因(像素级取证)

  • 弹层定位 bottom = cr.bottom - rect.top + 8,rect 量的是 .art-progress 外壳:上内边距 10px + 6px 控件行 + 5px 下内边距,3px 可见轨道(.art-control-progress-inner)居中其中 → 外壳顶比轨道顶高 ~11.5px。
  • 弹层底边实际悬在可见线上方 ~19.5px(再叠 16px 阴影晕开)。fix(video): 缩略图去除与进度时间气泡重复的内置时间行(#1953) #1962 之前由时间行占位遮掩,删行后空隙裸露。用户截图行剖面:弹层底边到控件条带 63 物理 px ≈ 31 CSS px(2x retina),与推算吻合。

修法

锚点从外壳顶改到可见轨道顶(.art-control-progress-inner)+ 9px(清 16px 指示圆点上探 6.5px 后留 2.5px 余量)→ 间距约减半且不遮挡圆点。外壳无水平内边距,left/ratio 沿用同一 rect,行为不变。

测试

  • e2e/video-controls.spec.ts 新增「缩略图底边贴近可见进度轨道」:断言轨道顶 − 弹层底边 ∈ (0, 12],旧实现 ~19.5 必失败。
  • 既有 thumb 测试的 gap 基准同步从外壳改为轨道(意图不变:紧贴进度条上侧;按外壳量会把悬空误判为贴合)。
  • 本地:npx tsc --noEmit ✓、npx vitest run 2499 ✓、npx playwright test e2e/video-fit.spec.ts e2e/video-controls.spec.ts e2e/video-compact.spec.ts 24 ✓

风险

低——只改悬停弹层定位基准,无平台特有差异点。

fixes #1953

根因:弹层定位量的是 .art-progress 外壳顶(含 10px 上内边距 + 6px 控件行 + 5px 下内边距,3px 可见轨道居中其中,外壳顶比轨道顶高 ~11.5px),弹层底边悬在可见线上方 ~19.5px;#1962 删时间行前由时间行占位遮掩,删行后裸露。锚点改为可见轨道 .art-control-progress-inner 顶 +9px(清 16px 指示圆点上探 6.5px 后留 2.5px),间距约减半且不遮挡圆点。既有 thumb 测试的 gap 基准同步改轨道(否则与修复自相矛盾),另新增贴近轨道用例。fixes #1953
@lqtdys
lqtdys merged commit 5eaecfe into main Dec 2, 2026
4 checks passed
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] 进度条悬停缩略图为纯黑块(无画面,真机)

1 participant