Problem
When render places a nested instance, a prop configuration that is a $binding — the instance's property staying wired to the host component's own prop — is not applied. The instance renders at its main component's default instead, so a pass-through is silently converted into a hardcoded value.
A $nested deep configuration, addressing an instance further down a chain, is likewise not applied.
Both now emit a warning naming the element and prop, so they are visible rather than silent, but neither is implemented.
Potential solution(s)
- Apply the bindings the platform supports: a nested layer's visibility, its text content, and its swapped component can each be wired to a host property by reference
- Establish whether a nested instance's variant property can be bound at all, and if not, decide what the spec should mean for one — refuse it, warn once per run, or record it as unrenderable
- Apply
$nested by walking the instance chain the path names
Acceptance criteria
Case data
- Fixture: Slot Passthrough, Slot Non Default Nested
- Workspace: specs-testing
- Territory: figma-from-specs
- Size: m
Notes
Split from #673, which covered this together with the slot-fill half. That half is done and round-trip verified; this one is unstarted and gated on a platform question, so they no longer belong together.
What the platform offers, read from the Plugin API typings rather than inferred. A node property can be wired to a containing component's property through componentPropertyReferences, and the admissible keys are exactly three: visible, characters, and mainComponent. Those correspond to a boolean pass-through, a text pass-through, and an instance-swap pass-through, and they apply to a sublayer's node property.
A nested instance's own component property — its size variant, say — is not in that set. So the general case this issue describes has no setter in the API as typed, and the three cases that do are narrower than the spec's $binding is. That is the question to settle before implementing: which bindings a spec can actually carry through a render, and what the contract should say about the rest.
Worth confirming against the current Plugin API documentation rather than the typings alone before building anything.
Implementation details are tracked internally.
Problem
When render places a nested instance, a prop configuration that is a
$binding— the instance's property staying wired to the host component's own prop — is not applied. The instance renders at its main component's default instead, so a pass-through is silently converted into a hardcoded value.A
$nesteddeep configuration, addressing an instance further down a chain, is likewise not applied.Both now emit a warning naming the element and prop, so they are visible rather than silent, but neither is implemented.
Potential solution(s)
$nestedby walking the instance chain the path namesAcceptance criteria
$nesteddeep configuration is applied, or reported with the path it could not reachCase data
Notes
Split from #673, which covered this together with the slot-fill half. That half is done and round-trip verified; this one is unstarted and gated on a platform question, so they no longer belong together.
What the platform offers, read from the Plugin API typings rather than inferred. A node property can be wired to a containing component's property through
componentPropertyReferences, and the admissible keys are exactly three:visible,characters, andmainComponent. Those correspond to a boolean pass-through, a text pass-through, and an instance-swap pass-through, and they apply to a sublayer's node property.A nested instance's own component property — its
sizevariant, say — is not in that set. So the general case this issue describes has no setter in the API as typed, and the three cases that do are narrower than the spec's$bindingis. That is the question to settle before implementing: which bindings a spec can actually carry through a render, and what the contract should say about the rest.Worth confirming against the current Plugin API documentation rather than the typings alone before building anything.