Skip to content

feat(work-panel): 支持拖拽调整右侧工作面板标签页顺序 - #959

Merged
vastsa merged 2 commits into
vastsa:mainfrom
catDforD:feat/work-panel-tab-reorder
Sep 23, 2026
Merged

vastsa merged 2 commits into
vastsa:mainfrom
catDforD:feat/work-panel-tab-reorder

Conversation

@catDforD

Copy link
Copy Markdown
Contributor

动机

右侧工作面板可以同时打开多个标签页,但原有标签顺序固定,无法按照用户的工作流程调整。

当标签较多时,部分标签会被横向滚动隐藏,用户也无法通过拖拽将标签移动到目标位置。

Closes #957

改动点

  • 支持按住标签页拖拽调整顺序。
  • 根据目标标签的左右半区决定插入到其前面或后面。
  • 拖拽过程中显示插入位置指示器。
  • 指针靠近标签条边缘时自动横向滚动,以便访问隐藏标签。
  • 调整顺序后保持当前激活标签页不变。
  • 支持使用 Alt+ArrowLeft 和 Alt+ArrowRight 调整聚焦标签页。
  • 保留原有的标签激活、关闭和中键关闭行为。
  • 增加相关测试,并同步更新中英文交互规范和 E2E 测试计划。
  • 未引入新的依赖。

运行截图或测试结果

截图

QQ_1790163765379 QQ_1790163779031

验证步骤

  1. 打开右侧工作面板,并打开多个标签页使标签条发生横向溢出。
  2. 拖拽标签到另一个标签的左侧或右侧,确认插入指示器和最终顺序正确。
  3. 将标签拖到标签条左右边缘并保持,确认隐藏标签自动滚动到可见范围。
  4. 确认调整顺序后当前激活标签页保持不变。
  5. 聚焦标签页后使用 Alt+ArrowLeft 或 Alt+ArrowRight 调整顺序。

自动化检查:

  • pnpm --filter @pi-desktop/desktop test:2696 个测试,2692 通过,4 个跳过
  • pnpm --filter @pi-desktop/desktop typecheck:通过
  • pnpm build:js:通过
  • pnpm lint:通过
  • pnpm docs:check:通过

检查清单

catDforD and others added 2 commits September 23, 2026 23:58
Allow users to reorder work panel tabs with pointer or keyboard while preserving the active tab. Auto-scroll the overflow strip during edge drags so off-screen tabs remain reachable, and cover the behavior in tests and interaction specs.
@vastsa
vastsa force-pushed the feat/work-panel-tab-reorder branch from a73ae2d to 0556f4c Compare September 23, 2026 16:03
@vastsa
vastsa merged commit 9926e3b into vastsa:main Sep 23, 2026
4 checks passed
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.

[Feature] 支持拖拽调整右侧工作面板标签页顺序

2 participants