Skip to content

Round trip: code-only prop provenance is lost, so a rendered prop reads as an ordinary string prop #336

Description

@nathanacurtis

A code-only prop loses its provenance on round trip: the extension recording that it is a code-only prop, and which layer it came from, is absent when the rendered component is read back.

Evidence

egdsRemovablePill, REST baseline → render → read back:

   a11yLabel:
     $extensions:
       com.figma:
-        type: TEXT
-        source:
-          kind: codeOnlyProp
-          layer: A11y label

The prop itself survives — only the record of what it is disappears. A consumer reading the round-tripped spec cannot tell a code-only prop from an ordinary string prop, and a second render would not rebuild the hidden container it came from.

Where to look

figma-from-specs/src/Props/CodeOnlyProps.ts builds the hidden container and its bound child layers. Whether the layer name it writes matches what the read side looks for (processing.codeOnlyPropsPattern) is the first thing to check.

Note

Only visible since the variant-level slot fix removed the diff noise that buried it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions