openpencil/packages/core/tests/editor
Danila Poyarkov 69dbc36a7e
fix: match Figma when dragging, drawing, duplicating, and pasting (#894)
* fix: match Figma when dragging, drawing, duplicating, and pasting

Checked against Figma desktop 126 with real pointer input. A dragged layer
lands in the topmost unlocked frame, section, component, or instance under
the cursor, following rotation and clipping, and leaves its frame as soon as
the cursor does; groups, boolean operations, component sets, and locked
frames never take a drop, and a layer stays in its group unless it lands on
another frame. Space keeps parents, Shift locks an axis, and Control drops
into auto layout as an absolute-positioned layer. Locked layers stay put.

New shapes go into the frame under the start point, frames and sections take
in the unlocked siblings they fully cover, duplicates land in place (top-level
frames to the right), and paste keeps the copied position, centering an axis
that does not fit the selected frame.

* fix: match Figma for drag edge cases with components, groups, and auto layout

A second round of checks against Figma desktop 126, replaying the same
pointer input in both editors. A component set takes back only its own
variants, and components never go into other components. Groups and
booleans refit their children after a move or nudge, and a group whose
last layer leaves is removed. Pressing inside a selected frame, group, or
component set drags it instead of the layer under the cursor.

Auto layout children dragged out land where they are dropped, drawing
inside auto layout adds to the end of the flow, and wrapped frames insert
on the line under the cursor. Duplicates keep their names, and a main
component duplicates as an instance with Cmd+D or Alt-drag; a multi-layer
duplicate stays in place, and a lone frame in a section counts as
top-level.

* fix(core): refuse new shapes in the locked part of an instance

createShape redirected a refused parent through acceptingParent while keeping coordinates in the original parent's space, and still inserted the layer when the slot claim failed. It now takes the given parent, claims a slot when needed, and throws when the parent refuses children; drawing skips such parents before creating anything.
2026-10-05 12:39:03 +00:00
..
clipboard fix: match Figma when dragging, drawing, duplicating, and pasting (#894) 2026-10-05 12:39:03 +00:00
components fix: match Figma when dragging, drawing, duplicating, and pasting (#894) 2026-10-05 12:39:03 +00:00
graph test(core): move the fig round-trip suite home, and stop test imports drilling 2026-10-01 14:11:53 +04:00
history feat(ai): show what each AI edit changed in its tool call (#812) 2026-10-03 23:32:37 +04:00
layout feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
pages fix: export layers and pages that are not on screen in app mode (#877) 2026-10-04 13:55:23 +00:00
selection test(core): move the fig round-trip suite home, and stop test imports drilling 2026-10-01 14:11:53 +04:00
structure feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
undo fix(fig): keep variable metadata, plugin data and default mode on save (#848) 2026-10-04 12:53:04 +04:00
variables feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
effects-and-resize.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
frame-presets.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
guides.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
navigation-lifecycle.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
node-preview.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
nudge.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
opacity.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
page-backgrounds.test.ts fix(core): show imported page backgrounds and stop fixed text collapsing 2026-10-02 12:10:06 +04:00
preview-events.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
reveal.test.ts feat(code): link the Code tab to canvas layers and sync both ways (#805) 2026-10-04 10:08:40 +00:00
text-auto-resize.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
vectorize.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
view-state.test.ts test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
viewport.test.ts feat(app): follow people and agents from the toolbar avatars (#807) 2026-10-04 00:09:40 +04:00