Skip to content

feat(ui): create a canvas after dragging a panel clear for 0.5 seconds - #96

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

feat(ui): create a canvas after dragging a panel clear for 0.5 seconds#96
nmrtist merged 4 commits into
nmrtist:mainfrom
Limdongcheng:codex/panel-detach

Conversation

@Limdongcheng

@Limdongcheng Limdongcheng commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Dragging a single Panel completely clear of every canvas for 0.5 seconds arms canvas creation. A progress bar transitions to a green outline and a Release to create canvas prompt. Releasing moves the entire Panel into a new canvas fitted to its physical dimensions at the drop position, including the board origin. Its contents, labels, note, internal layout and internal content groups are retained. The source canvas remains in place.

Returning any part of the Panel to a canvas or leaving the board resets the dwell. Resizes and multiple-Panel drags do not arm creation; Escape cancels. Creation and transfer undo together, restoring the source canvas and its active dataset context. Cross-canvas tiling takes precedence over detachment. Both language versions of the layout guide are updated.

Validation

  • cargo pr-check passed at fdc60d0, including formatting, source size, dependency policy, both default frontends, Clippy and the reference-backend test suite.
  • npm run build in docs/ passed (77 pages).
  • Regression tests cover the exact 0.5-second threshold, early release, partial overlap, other canvases, pointer loss, returning on release, cancellation, empty Panels, metadata, multiple contents and undo/redo.
  • Added regressions verify active dataset restoration with a real synthetic NMR plot, explicit origin placement next to another canvas, and unchanged automatic placement for ordinary canvas insertion.
  • Combined with PR feat(ui): swap panels within the same canvas #95 without merge conflicts; the combined cargo pr-check and documentation build passed at 23065db.
  • Visual QA covered dwell progress, ready feedback, release, multi-content transfer and undo at 1100 x 700 (dark) and 900 x 600 (light). Resulting projects were saved and reopened to verify Panel preservation.
  • 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): swap panels within the same canvas #95 changes dependency manifests or lockfiles.

UI display logic

This is a Panel-local direct manipulation gesture. The timer changes only the drag preview; a new canvas is created only by the user's release. It adds no Ribbon, menu or shortcut action, so no command-catalog registration is needed. The English and Simplified Chinese manuals are updated.

@nmrtist
nmrtist merged commit 944c931 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