[feature] No tool to rename a project; move_nodes across pages gives components new keys #10
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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).