Skip to content

feat(player): 长按迷你播放器平滑定位当前歌曲 - #8

Closed
bileizhen wants to merge 1 commit into
mainfrom
feat/mini-player-locate-song
Closed

bileizhen wants to merge 1 commit into
mainfrom
feat/mini-player-locate-song

Conversation

@bileizhen

Copy link
Copy Markdown
Collaborator

改动

  • 长按底部迷你播放器的封面或歌曲信息约 0.5 秒,列表以 450ms 缓出动画定位当前歌曲,并尽量居中显示。
  • 通过歌曲 ID 匹配列表条目,支持排序后的列表及数字、字符串 ID。
  • 短按继续打开播放页。播放和下一首控件保留原有交互。
  • 移动手指、取消触控、切换页面或播放器重绘时取消待触发的长按,长按完成后拦截合成点击。
  • 当前歌曲不在所浏览列表时显示提示,遵循系统减少动态效果设置。

验证

  • npm ci 和 npm run build 通过。
  • node --check 检查两个修改的 JS 文件通过,git diff --check 通过。
  • 使用正式构建产物、模拟 API 数据和移动端视口进行 Chromium 浏览器验证,覆盖长按定位、短按打开、倒序列表、移动取消、缺失歌曲、下一首控件、真实触控事件、合成点击抑制、pointercancel、重绘取消及减少动态效果。
  • 浏览器无未捕获异常。
  • 构建存在原有的 4 处表情映射重复键警告,依赖审计报告 1 项中等级问题。
  • 尚未进行 Android 真机验证。

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T03:34:50.813246Z 07f67b7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

👋 感谢贡献 CurrentMusic!

@bileizhen,你好!你的拉取请求 #8 已收到(分支 feat/mini-player-locate-song),目标分支 main。

本次改动:3 个文件,+89 / -1

接下来会发生什么

  1. 🔍 检查机器人会跑后端与脚本检查、前端构建、敏感信息扫描,并把结果贴在下面
  2. 🤖 AI 审查机器人会对 diff 做一次初步审查(仅供参考,不代替人工评审)
  3. 👀 维护者会进行人工审查。合并前请确保检查全绿

本仓库的合并规则

  • main 不接受直接推送:所有改动必须经 PR 合入(直接推到 main 会被自动回退并留痕)
  • 请在 PR 描述里写清:做了什么、为什么这么做、影响范围(模板已自动填好)
  • 涉及用户可见行为的改动,请在 CHANGELOG.md 追加变更条目,并同步 web/src/version.js 的版本号
  • 完整版本历史见 CHANGELOG.md(README.md 只保留最近几个版本的摘要)
  • 默认 UI 不得被改动:新增样式必须限定在对应皮肤的作用域下(如 html[data-ui-preset="..."])

期间你可以继续向该分支推送提交,机器人会自动跟进最新改动。祝顺利合并! 🎉

@bileizhen bileizhen closed this Nov 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07f67b7564

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread web/src/player-ui.js
Comment on lines +55 to +57
const row = out && id != null && id !== '' && [...out.querySelectorAll('.cm-song[data-song-id]')]
.find(item => item.dataset.songId === String(id));
if (!row) { toast('当前歌曲不在此列表中'); return; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add song IDs to the profile's recent-song rows

When a user plays a song from a public profile's “最近听过” list and then long-presses the mini player, this lookup always reports that the song is absent, even though its row is displayed. web/src/pages/profile.js renders those playable .cm-song rows through its own songRow template, which only sets data-i; the new data-song-id attribute is added exclusively to the shared songListHTML renderer. Add the same song-ID annotation to the profile renderer so the new locator works for that existing playback flow.

Useful? React with 👍 / 👎.

@bileizhen
bileizhen deleted the feat/mini-player-locate-song branch November 11, 2026 03:38
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.

1 participant