[feature] No tool to rename a project; move_nodes across pages gives components new keys #10

Closed
opened 2026-10-24 23:52:40 +00:00 by masi · 0 comments
Owner

Expected: (1) A tool (e.g. rename_file) to rename the open project. (2) move_nodes {toPageId} of a frame holding main components keeps their ids/componentKeys so instances on other pages stay linked, as the tool description says ("Move nodes keeping their ids").
Actual: (1) No rename tool; only create_file/open_file. (2) After moving a frame with mains to another page, the mains got new ids and keys (uses: 0) and the existing instances had to be re-linked one by one with swap_instance, which also reset their sizes (hug labels clipped).
Repro: create_artboard A on page 1; write_html a div inside; create_component it; write_html an of it in artboard B; move_nodes {moves:[{nodeId:A, parentId:"root", toPageId:page2}]}; get_components shows the main with a new id and 0 uses.
Workaround: swap_instance every instance to the new key, then update_styles width:fit-content.
Impact: Moving components to a Design System page is a common step and silently unlinks every instance.


Filed from PaperCraft 0.7.2 (macos).

**Expected:** (1) A tool (e.g. rename_file) to rename the open project. (2) move_nodes {toPageId} of a frame holding main components keeps their ids/componentKeys so instances on other pages stay linked, as the tool description says ("Move nodes keeping their ids"). **Actual:** (1) No rename tool; only create_file/open_file. (2) After moving a frame with mains to another page, the mains got new ids and keys (uses: 0) and the existing instances had to be re-linked one by one with swap_instance, which also reset their sizes (hug labels clipped). **Repro:** create_artboard A on page 1; write_html a div inside; create_component it; write_html an <x-paper-instance> of it in artboard B; move_nodes {moves:[{nodeId:A, parentId:"root", toPageId:page2}]}; get_components shows the main with a new id and 0 uses. **Workaround:** swap_instance every instance to the new key, then update_styles width:fit-content. **Impact:** Moving components to a Design System page is a common step and silently unlinks every instance. --- Filed from PaperCraft 0.7.2 (macos).
masi closed this issue 2026-10-25 00:45:06 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: masi/papercraft#10