Skip to content

Render passes 0 to minWidth/minHeight instead of null #287

Description

@nathanacurtis

13 components fail to render at all. The Figma Plugin API rejects 0 for these properties; unsetting requires null. The render path passes the spec's literal 0 straight through.

Render failed: in set_minHeight: minHeight cannot be set to 0, use null to unset
Render failed: in set_minWidth: minWidth cannot be set to 0, use null to unset

Fixtures — fix and validate against these five only

Workspace workspaces/eg in specs-testing. Three minHeight, two minWidth, so both paths are covered:

  • ActionList — minHeight
  • Menu — minHeight
  • Sheet — minHeight
  • BottomBar — minWidth
  • CenteredSheet — minWidth

Do not sweep the catalog. The other eight affected components (BottomSheet, ExpandoListItem, PopoverSheet, Tabs, Toolbar, FullSheet, List, SideSheet) share the identical error and will follow.

Where

packages/figma-from-specs/src/Styles/ — the sizing keys are applied through StylesApplier. The exact key handler was not identified; the error text is the fastest way in.

Verification

cd workspaces/eg
specs render specs/ActionList --overwrite --page <id>

Each of the five renders with exit 0. A spec carrying minHeight: 0 must unset the property rather than throw, and must not silently substitute a different value.

Part of #281.

Metadata

Metadata

Assignees

No one assigned

    Labels

    generatorspecs-from-figma processing engine

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions