Skip to content

feat(ui): swap panels within the same canvas - #95

Merged
nmrtist merged 3 commits into
nmrtist:mainfrom
Limdongcheng:codex/panel-swap
Sep 6, 2026
Merged

feat(ui): swap panels within the same canvas#95
nmrtist merged 3 commits into
nmrtist:mainfrom
Limdongcheng:codex/panel-swap

Conversation

@Limdongcheng

@Limdongcheng Limdongcheng commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Dragging a single Panel onto another visible, unlocked Panel on the same canvas exchanges their occupied slots on release. Both slots are highlighted during the drag. Panel identities, contents and metadata stay together, and contents scale when slot sizes differ. The exchange is one undoable action; plot rendering refreshes on apply, undo and redo.

The gesture also works when the first movement past the drag threshold and release occur in the same frame. Multi-Panel moves and cross-canvas tiling retain their existing behavior. The English and Simplified Chinese layout guides describe the gesture.

Validation

  • cargo pr-check passed at 9ccecb6, including formatting, source size, dependency policy, both default frontends, Clippy and the reference-backend test suite.
  • npm run build in docs/ passed (77 pages).
  • Native mouse-event regression tests cover movement and release in one frame and in separate frames, including undo/redo. Other regressions cover multiple contents, unequal sizes and ineligible targets.
  • Combined with PR feat(ui): create a canvas after dragging a panel clear for 0.5 seconds #96 without merge conflicts; the combined cargo pr-check and documentation build passed at 23065db.
  • Visual QA covered swap preview, release and undo at 1100 x 700 (dark) and 900 x 600 (light), including combined use with detachment.
  • Independent code review checked repository contribution rules, UI rules, action behavior and regression coverage.
  • Installing the unchanged documentation dependencies reported 8 npm audit findings (1 moderate, 7 high). Neither this PR nor PR feat(ui): create a canvas after dragging a panel clear for 0.5 seconds #96 changes dependency manifests or lockfiles.

UI display logic

This is a Panel-local direct manipulation gesture. It adds no Ribbon, menu, shortcut, or background-triggered layout action, so no command-catalog registration is needed. The English and Simplified Chinese manuals are updated.

@nmrtist
nmrtist merged commit 1fae5e1 into nmrtist:main Sep 6, 2026
11 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants