[bug] import_components refuses components nested in an artboard; instance attribute docs disagree #8

Closed
opened 2026-10-17 22:17:43 +00:00 by masi · 2 comments
Owner

Context: PaperCraft build of 2026-10-17, Design System page with components, then import_components into another page.
Expected: components made with create_component can be imported.
Actual: create_component keeps the component inside its artboard; import_components then answers "no matching top-level components on that page (create_component first)" although get_components lists them. Only after move_nodes {parentId:"root"} does the import work. Also the guide says <x-paper-instance component-id="ID"/>, the tool description says component="Name"; the name form works, the id form was not needed.
Repro: create an artboard, write_html a button frame into it, create_component, get_components (listed), import_components into another page (refused).
Workaround: move each component to the page root first; use the name form of x-paper-instance.
Impact: the documented Design System workflow silently fails. Either import nested components or have create_component hoist them (or say so in its result), and align the docs on the instance attribute.

**Context:** PaperCraft build of 2026-10-17, Design System page with components, then `import_components` into another page. **Expected:** components made with `create_component` can be imported. **Actual:** `create_component` keeps the component inside its artboard; `import_components` then answers "no matching top-level components on that page (create_component first)" although `get_components` lists them. Only after `move_nodes {parentId:"root"}` does the import work. Also the guide says `<x-paper-instance component-id="ID"/>`, the tool description says `component="Name"`; the name form works, the id form was not needed. **Repro:** create an artboard, `write_html` a button frame into it, `create_component`, `get_components` (listed), `import_components` into another page (refused). **Workaround:** move each component to the page root first; use the name form of `x-paper-instance`. **Impact:** the documented Design System workflow silently fails. Either import nested components or have `create_component` hoist them (or say so in its result), and align the docs on the instance attribute.
Author
Owner

Fixed in commit 5169fe6 and released in v0.3.1.

Fixed in commit 5169fe6 and released in v0.3.1.
masi closed this issue 2026-10-17 23:05:18 +00:00
Author
Owner

Follow-up: after move_nodes {parentId:"root"} the hoisted components do not keep their world position; all land on the same spot and overlap (observed with 25 components). Expected: position kept, as the tool description says for free parents.

Follow-up: after move_nodes {parentId:"root"} the hoisted components do not keep their world position; all land on the same spot and overlap (observed with 25 components). Expected: position kept, as the tool description says for free parents.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: masi/papercraft#8