Skip to content

Render drops a nested instance's non-default slot fill #673

Description

@nathanacurtis

Problem

When render places a nested instance, any prop configuration whose value is an object is skipped. The instance is created, its scalar properties are applied, and the object-valued ones are dropped with nothing said. Two kinds are affected: a slot fill ($slotContent) and a prop binding ($binding).

Consequences:

Observed with specs carrying propConfigurations.aside.$slotContent and propConfigurations.children.$binding — both rendered as if the entries were not there, with no warning in CLI output. It is documented as deliberate for now: "Phase 4 scope: scalar configs (variant/boolean/text). Deferred and skipped here: $nested deep configs, and object values ($binding pass-through, $slotContent)."

Potential solution(s)

  • Apply a $slotContent configuration by building the referenced content into the named slot on the instance
  • Apply a $binding by wiring the instance's property to the host's prop rather than leaving the main component's default
  • Until both land, warn when an object-valued configuration is skipped, naming the element and prop

Acceptance criteria

  • A nested instance whose spec fills a non-default slot renders with that content in that slot
  • A nested instance whose property is bound to a host prop renders bound, not at the main component's default
  • A $nested deep configuration is applied, or skipped with a warning naming it
  • Any configuration render cannot apply produces a warning naming the element and prop

Case data

  • Fixture: Slot Non Default Nested (1660:441), Slot Passthrough (1660:429)
  • Workspace: specs-testing — TEST New Layout Test Cases page
  • Territory: figma-from-specs
  • Impacted file(s): specs-from-figma/packages/figma-from-specs/src/PropConfigurations/PropConfigurations.ts
  • Size: m

Notes

Read-side counterpart is #672, so the fill is lost in both directions today.

Render warnings are also withheld from CLI output behind a disabled flag in RenderCommand.ts, which is why a skipped configuration is invisible rather than merely unimplemented.


Implementation details are tracked internally.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

clispecs-cli commandsfigma-from-specsTransformer from specs into Figma assets

Type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions