Skip to content

Badge defaults to a visible start icon when Figma has it hidden by default #367

Description

@nathanacurtis

Problem

In both React and Web Components transform output, Badge renders with a visible icon by default. In Figma, Badge's start visual is not visible in the default variant. The transformed component's out-of-the-box appearance therefore does not match the design source, and anyone using the default gets an icon they did not ask for.

Solution

Default visibility of a slot or visual element in transform output follows the default state of that element in the spec. A visual hidden by default in Figma is hidden by default in the generated component, and shown only when the consumer opts in.

Acceptance criteria

  • Badge renders with no start icon by default in React output
  • Badge renders with no start icon by default in Web Components output
  • The default follows the spec's recorded default visibility, rather than a per-component allowance
  • Components whose visuals ARE visible by default still render them

Workspace

Found during transform QA of React and Web Components output, comparing generated components against their Figma source.

Notes

Primary component: Badge.


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

react-from-specsTransformer from specs into React code

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions