Skip to content

feat(editor): decompose and nudge components, delete anchors - #482

Merged
kostyafarber merged 1 commit into
mainfrom
feat/component-anchor-editing
Oct 1, 2026
Merged

kostyafarber merged 1 commit into
mainfrom
feat/component-anchor-editing

Conversation

@kostyafarber

Copy link
Copy Markdown
Collaborator

Summary

  • Decompose Components: new command in the Glyph menu and the canvas context menu. The context-menu item is shown only when the selection is entirely components. Uses the existing Rust decompose intent through Editor.decomposeSelection().
  • Nudge components: arrow keys move selected components with the standard 1/10/100 increments, reusing the component drag edit.
  • Delete anchors: Delete, Backspace, and Edit → Delete remove anchor-only selections. Mixed point-and-anchor selections still refuse, as before.
  • Each edit applies to every source selected for editing as one undo step. With one source selected, only the active source changes. Deleting and decomposing components share one helper in Editor.

Issue

Refs #395 — fills gaps left by component authoring; no issue tracks these three directly.

Testing

  • pnpm check passed (lint, typecheck, browser check, dead code, full vitest suite).
  • New tests: component nudge with undo (SelectNudge.test.ts), decompose through the renderer command with undo plus refusal on non-component selections (ComponentEditing.test.ts), anchor deletion with undo (Deletion.test.ts).
  • Multi-source behavior is covered by the shared target resolution already tested for component deletion; there is no new multi-source test for these three edits.
  • Not yet checked by hand in the running app. E2E not run locally; left to PR CI.

- Add Glyph → Decompose Components and a context-menu item shown only
  when the selection is decomposable.
- Move selected components with the arrow keys using the standard nudge
  increments.
- Delete selected anchors with Delete, Backspace, and the menu.

Each edit applies to every source selected for editing as one undo step.
@kostyafarber kostyafarber added the release: nightly Run a Nightly build after this pull request merges label Oct 1, 2026
@kostyafarber
kostyafarber added this pull request to the merge queue Oct 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 1, 2026
@kostyafarber
kostyafarber added this pull request to the merge queue Oct 1, 2026
Merged via the queue into main with commit 2f2b7c7 Oct 1, 2026
58 of 60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: nightly Run a Nightly build after this pull request merges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant