Skip to content

fix: 修复视频详情返回与评论、点赞手势冲突 / Fix video detail gesture conflicts - #40

Merged
BPTPW merged 6 commits into
BPTPW:mainfrom
NZJ-Jimmy:codex/video-detail-back-gesture
Nov 4, 2026
Merged

BPTPW merged 6 commits into
BPTPW:mainfrom
NZJ-Jimmy:codex/video-detail-back-gesture

Conversation

@NZJ-Jimmy

Copy link
Copy Markdown

中文

问题与修复

视频详情页的 tab 拖动、纵向滚动和原生返回手势相互竞争,导致右滑返回需要精准的水平起手。点赞按钮使用零距离拖动模拟长按,也可能拦截滑动并在松手时误触点赞。

  • 使用 UIKit 方向判定的 pan 手势处理简介/评论切换:简介左滑进入评论,评论右滑回简介,简介右滑交给原生返回。
  • 在接收触摸时排除左侧 32pt 边缘区域,并移除 tab 手势对边缘返回的不必要失败等待,保留 iOS 26 内容区域返回的协调。
  • 点赞改为原生长按识别,普通点击独立处理;长按 0.5 秒后开始 1.4 秒三连蓄力,移动或取消时停止蓄力,左右边缘起手不触发三连。
  • 修正连续三连和页面退出时的状态清理。
  • 增加仅 Debug 可用、无需网络的手势测试入口,以及模拟器 UI 回归测试和未签名 IPA 构建流程。

验证

GitHub Actions 在提交 d7084d02aba76891808a049e71f6659a1cec5228 上通过,Xcode 26.6:

  • 3 项模拟器 UI 测试通过,0 失败:边缘返回;简介/评论双向切换及内容区返回;纵向滚动不切换 tab。
  • Release 归档和未签名 IPA 打包成功。测试包下载(产物保留 14 天,需签名安装)。
  • 自动测试使用实际分页组件和原生导航配置;完整视频页面及点赞长按的真机手感仍需验证。

AI 辅助声明

本 PR 使用 OpenAI Codex 进行 AI 辅助排查、代码修改、UI 测试编写和 PR 文案整理。相关验证结果来自 GitHub Actions 的实际运行。

English

Problem and changes

Video detail tab paging competed with vertical scrolling and native back navigation, making back swipes sensitive to their initial direction. The like button also used a zero-distance drag to simulate a hold, which could intercept swipes and trigger a like on release.

  • Replace tab dragging with a directional UIKit pan: swipe left from the intro to comments, swipe right from comments to the intro, and let native back navigation handle rightward pans on the intro.
  • Exclude the leading 32pt at touch receipt and remove the unnecessary failure dependency on edge-pop, while coordinating with iOS 26 content-pop.
  • Use a native long-press recognizer for triple engagement and handle taps separately. Keep the 0.5-second hold followed by 1.4 seconds of charging; cancel charging on movement or cancellation, and exclude holds starting at either screen edge.
  • Reset repeated-hold and disappearance state correctly.
  • Add a Debug-only, network-free gesture test surface, simulator UI regression tests, and an unsigned IPA build workflow.

Validation

GitHub Actions passed for commit d7084d02aba76891808a049e71f6659a1cec5228 using Xcode 26.6:

  • 3 simulator UI tests passed with 0 failures: edge back; bidirectional tab paging and content back; vertical scrolling without switching tabs.
  • Release archive and unsigned IPA packaging succeeded. Download the test IPA (14-day artifact retention; signing required).
  • Automated tests exercise the production pager and native navigation configuration. Full video-page behavior and like-button hold interactions still need device validation.

AI assistance disclosure

This PR was developed with OpenAI Codex assistance for investigation, implementation, UI test authoring, and PR documentation. The validation results above come from actual GitHub Actions runs.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 09:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@BPTPW

BPTPW commented Nov 4, 2026

Copy link
Copy Markdown
Owner

感谢您的贡献!很抱歉之前没有及时看到这条消息,现在已经合并到主分支

@BPTPW
BPTPW merged commit fd42e33 into BPTPW:main Nov 4, 2026
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.

3 participants