Subissue of #204.
ADR-065 documents what an absent nullable means on a prop:
true for StringProp, NumberProp, SlotProp, ImageProp — open value sets
false for EnumProp — enum enumerates every accepted value
figma-from-specs/src/Props does not consult nullable at all today. Rendering a spec back onto the Figma canvas therefore cannot distinguish a prop that accepts an empty value from one that always carries a value.
Scope
- Apply the per-type default when reading a prop's nullability, rather than testing for an explicit
true
- Decide what an explicit
nullable: false should mean at render time — in particular whether a prop asserting a value should ever be written with an empty default
- Round-trip check: a spec written to Figma and read back should preserve
nullable (present or absent) rather than gaining or losing it
Depends on
Schema side ships in @directededges/specs-schema 0.29.0 (PR #273).
Subissue of #204.
ADR-065 documents what an absent
nullablemeans on a prop:trueforStringProp,NumberProp,SlotProp,ImageProp— open value setsfalseforEnumProp—enumenumerates every accepted valuefigma-from-specs/src/Propsdoes not consultnullableat all today. Rendering a spec back onto the Figma canvas therefore cannot distinguish a prop that accepts an empty value from one that always carries a value.Scope
truenullable: falseshould mean at render time — in particular whether a prop asserting a value should ever be written with an empty defaultnullable(present or absent) rather than gaining or losing itDepends on
Schema side ships in
@directededges/specs-schema0.29.0 (PR #273).