Problem
render rebuilds the hidden code-only props container for string, number, boolean and image props, but not enum ones.
An enum code-only prop is authored in Figma as a nested instance of a single-variant component whose variants supply the enumerated values. Rendering skips these with a warning, so the prop is lost on the way into Figma:
- The spec declares the prop with its enum values and default
- The rendered component has no corresponding property
- Reading that component back drops the prop entirely
A Heading component's role prop is the clearest case — it survives every other stage of the pipeline but disappears through render.
Solution
Render an enum code-only prop as the nested instance the convention calls for, so it survives a spec → Figma → spec round-trip like every other code-only prop type.
Acceptance criteria
Workspace
Found during round-trip testing of code-only props support in render — specs rendered into Figma and read back, then diffed against the baseline.
Impacted code
specs-from-figma/packages/figma-from-specs/src/Props/CodeOnlyProps.ts — the write path that currently skips enum props
specs-from-figma/packages/specs-from-figma/src/Component/Props/CodeOnlyProps/InstanceCodeOnlyProp.ts — the read-side counterpart to mirror
Text fixtures
- Heading (
role)
- Form Group Heading (
role)
Notes
The blocker is resolution, not the container: the instance manifest carries no entry for the enum's source component, so the renderer has nothing to instantiate. Any fix likely needs the manifest extended to cover components referenced only from code-only props.
Related: string, number, boolean and image code-only props, plus slot anyOf, already round-trip losslessly. Nested boolean-gated code-only containers remain unsupported and are deliberately not covered here.
Implementation details are tracked internally.
Problem
renderrebuilds the hidden code-only props container for string, number, boolean and image props, but not enum ones.An enum code-only prop is authored in Figma as a nested instance of a single-variant component whose variants supply the enumerated values. Rendering skips these with a warning, so the prop is lost on the way into Figma:
A Heading component's
roleprop is the clearest case — it survives every other stage of the pipeline but disappears throughrender.Solution
Render an enum code-only prop as the nested instance the convention calls for, so it survives a spec → Figma → spec round-trip like every other code-only prop type.
Acceptance criteria
codeOnlyPropprovenance intactWorkspace
Found during round-trip testing of code-only props support in
render— specs rendered into Figma and read back, then diffed against the baseline.Impacted code
specs-from-figma/packages/figma-from-specs/src/Props/CodeOnlyProps.ts— the write path that currently skips enum propsspecs-from-figma/packages/specs-from-figma/src/Component/Props/CodeOnlyProps/InstanceCodeOnlyProp.ts— the read-side counterpart to mirrorText fixtures
role)role)Notes
The blocker is resolution, not the container: the instance manifest carries no entry for the enum's source component, so the renderer has nothing to instantiate. Any fix likely needs the manifest extended to cover components referenced only from code-only props.
Related: string, number, boolean and image code-only props, plus slot
anyOf, already round-trip losslessly. Nested boolean-gated code-only containers remain unsupported and are deliberately not covered here.