Skip to content

Feat/play detail page ux#547

Open
maotoumao wants to merge 2 commits intodevfrom
feat/play-detail-page-ux
Open

Feat/play detail page ux#547
maotoumao wants to merge 2 commits intodevfrom
feat/play-detail-page-ux

Conversation

@maotoumao
Copy link
Owner

image

@safe1ine
Copy link

safe1ine commented Feb 6, 2026

@MonkeyCode-AI review 一下

@MonkeyCode-AI
Copy link

MonkeyCode-AI 正在分析任务...

Copy link

@MonkeyCode-AI MonkeyCode-AI left a comment

Choose a reason for hiding this comment

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

我是 MonkeyCode AI 编程助手,你可以在 GitHub 仓库的 PR 中 at @MonkeyCode-AI 来呼唤我。

任务执行细节请参考: https://monkeycode-ai.com/tasks/public?id=9c475573-122c-4e2e-ba07-87ffba05019b

代码审查结果

整体是一次较大的播放详情页交互重构(PagerView 分页 + 顶部 Tab + 信息区下沉),结构更清晰,但存在若干可用性/国际化/健壮性问题需要修正。

✨ 代码亮点

  • 将“切换歌词/封面”的点击手势改为 PagerView 分页,交互更直观且可扩展
  • 将音质选择从 operations 中抽离到信息区(MusicInfo),职责更清晰
  • 横竖屏逻辑在 Content 中集中处理(横屏单页、竖屏分页),结构更易维护
🚨 Critical ⚠️ Warning 💡 Suggestion
1 1 0

activeOpacity={0.8}
onPress={() => onTabChange(0)}
style={styles.tabItem}>
<Text style={[styles.tabText, pageIndex === 0 && styles.activeTabText]}>歌曲</Text>

Choose a reason for hiding this comment

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

Caution

🚨 顶部 Tab 文案硬编码为中文,破坏国际化

NavBar 中 Tab 文案直接写死为“歌曲/歌词”。项目其他位置已在使用 i18n(如 MusicInfo/lyric),此处硬编码会导致非中文语言环境显示错误,也不利于后续维护。

建议: 使用 i18n.t() 或统一的文案常量替换硬编码字符串,并保持与其它页面一致的翻译 key 命名。

Suggested change
<Text style={[styles.tabText, pageIndex === 0 && styles.activeTabText]}>歌曲</Text>
<Text style={[styles.tabText, pageIndex === 0 && styles.activeTabText]}>{i18n.t("musicDetail.tab.song")}</Text>

const orientation = useOrientation();

useEffect(() => {
offset.value = withTiming(pageIndex * rpx(140));

Choose a reason for hiding this comment

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

Warning

⚠️ 下划线位移使用固定 rpx(140) 与样式耦合,易在改动/适配时错位

offset.value = withTiming(pageIndex * rpx(140)) 依赖于 tabItem 宽度(120) + divider 宽度(20) 的隐式组合。当前 underlineContainer.width=260、tabItem.width=120、divider.width=20 都是硬编码,一旦设计调整或字体/布局变化,underline 的位置会不准确。

建议: 将 tabWidth、dividerWidth、underlineWidth/offset 计算集中为常量(或从样式常量派生),并用 (tabWidth + dividerWidth) * pageIndex 来计算;同时把 underline 的居中逻辑从 marginLeft 固定值改为通过 translateX 计算(或使用容器居中)。

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