8000 feat(web): replace account up/down buttons with drag-and-drop sorting by InfinityPacer · Pull Request #61 · InfinityPacer/meterleaf · GitHub
[go: up one dir, main page]

Skip to content

feat(web): replace account up/down buttons with drag-and-drop sorting - #61

Merged
InfinityPacer merged 2 commits into
mainfrom
feat/account-drag-sort
Oct 30, 2026
Merged

InfinityPacer merged 2 commits into
mainfrom
feat/account-drag-sort

Conversation

@InfinityPacer
Copy link
Copy Markdown
Owner

问题

总览和手机首页的账户排序只能逐个点上移、下移,账户一多就要点很多次,交互很差。

结果

  • 进入排序后,桌面直接拖动账户行。手机长按约 0.2 秒后拖动,普通滑动不会误触。
  • 每行的拖动手柄支持键盘排序(空格拿起、方向键移动、空格放下),并有中文读屏播报。
  • 上移、下移按钮已移除。排序结果仍保存在原来的偏好里,刷新后保留。已归档或隐藏的账户在保存顺序中原位不动。
  • 拖拽使用 @dnd-kit/core、@dnd-kit/sortable、@dnd-kit/utilities,开启减少动态效果时关闭过渡动画。
  • docs/reporting.md 的排序说明已同步。

验证

  • bun run typecheck 通过。
  • bun test tests 588 个全部通过,新增 reorderAccount 单元测试,覆盖首尾、相邻、跨归档账户和无效 ID。
  • 所改文件 Prettier 检查与 git diff --check 通过。
  • 在 bun run dev:demo 的真实浏览器中验证了以下场景,截图留在本地被忽略的 test-results 中,未附在本说明里:
    • 桌面 1440×1000 鼠标拖拽。
    • 键盘排序及播报。
    • 刷新后顺序保留。
    • 手机 390×844 长按拖拽,快速滑动不触发拖拽。
    • 减少动态效果模式。
  • 进入排序前后行高不跳动,无横向溢出。维护者已在演示页试用并同意合并。

🤖 Generated with Claude Code

InfinityPacer and others added 2 commits October 30, 2026 21:35
8000
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… sort

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@InfinityPacer
InfinityPacer merged commit 9c64f6c into main Oct 30, 2026
2 checks passed
@InfinityPacer
InfinityPacer deleted the feat/account-drag-sort branch October 30, 2026 13:43
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

0