Skip to content

A composition loses its non-default slot fills when the composed-content opt-in is off #685

Description

@nathanacurtis

Problem

A composition is exempt from the composed-content opt-in when deciding whether to consolidate a default-slot fill into its own layout — composed content is the entire reason a composition exists. The same exemption is missing when deciding whether to record a slot-content reference at all.

The result, with the convention declared and the opt-in off:

  • the composition's default-slot content consolidates into its layout, as intended
  • every non-default slot fill on a nested instance is dropped — no entry, no reference, no warning

So a screen keeps the content that flattens and silently loses the content that does not. Turning the opt-in on restores it.

Measured on a composition whose nested instance has both kinds of slot filled:

Opt-in Nesting Slot-content entries
off yes 0
on yes 1

The second column proves the nesting exemption works. The third is the gap.

Potential solution(s)

  • Exempt a composition from the opt-in when recording slot-content references, exactly as it is already exempt when deciding to consolidate
  • Or, if the opt-in is meant to govern a composition's references, say so — because the two halves currently disagree and neither surface explains why

Acceptance criteria

  • A composition with the convention declared and the opt-in off keeps its non-default slot fills
  • A composition's output is identical whether the opt-in is on or off, since composed content is not optional for a composition
  • A component is unaffected: the opt-in still governs whether it records composed slot content at all
  • A workspace declaring no convention is unchanged

Case data

  • Fixture: Composition Slots
  • Workspace: specs-testing
  • Territory: specs-from-figma
  • Size: s

Notes

Found by walking the gate matrix in #671 — the composition rows were the last cells never exercised, and this is what they turned up.

The two decisions are made in different places. One consults the host kind and exempts a frame; the other reads the setting alone. The exemption's own rationale applies verbatim to both.

This is the same defect class as #677: content captured, registered, and never referenced, so it does not survive into the spec and nothing says it was dropped.


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

pluginFigma pluginspecs-from-figmaTransformer from Figma into specs

Type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions