feat: 歌单拖拽排序功能#966
Conversation
提取 useDragSort composable 统一拖拽逻辑,支持 handle 和 longpress 两种触发模式。 播放列表使用手柄拖拽,收藏/歌单页面使用长按拖拽,支持本地歌单和在线歌单的排序持久化。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
消除重复的 touches/mouse 坐标判断,使用 e.cancelable 替代 e.type 检查。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求引入了歌单歌曲的拖拽排序功能,极大地提升了用户管理播放列表的灵活性和便捷性。通过将复杂的拖拽逻辑抽象为一个可复用的 composable,不仅简化了代码,还确保了在不同列表组件中行为的一致性。现在用户可以直观地重新排列他们的歌曲,并且这些更改会得到妥善的保存,无论是对于在线还是本地歌单。 Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
本次 PR 实现了歌单的拖拽排序功能,这是一个非常实用的特性。代码实现质量很高,特别是将复杂的拖拽逻辑抽象为 useDragSort 这个 composable,极大地提高了代码的可维护性和复用性。在 SongPlayList 组件中,原有的拖拽逻辑被新 composable 替代,使得组件代码更加简洁。同时,在 liked 和 playlist 视图中也集成了此功能,并对在线和本地歌单的排序持久化做了区分处理,考虑得很周全。乐观更新的 UI 策略以及失败回滚的逻辑也值得称赞。我只发现了一个小的样式语法问题,除此之外,整体实现非常出色。
Summary
useDragSortcomposable,统一拖拽排序逻辑,支持 handle(手柄)和 longpress(长按)两种触发模式/song/order/updateAPI)和本地歌单的排序持久化