Skip to content

feat: add Figma Code Connect mappings for all components#1251

Draft
ByronDWall wants to merge 5 commits intomainfrom
CRAFT-2151-code-connect-generation-script
Draft

feat: add Figma Code Connect mappings for all components#1251
ByronDWall wants to merge 5 commits intomainfrom
CRAFT-2151-code-connect-generation-script

Conversation

@ByronDWall
Copy link
Contributor

Summary

  • Add .figma.tsx Code Connect files for 44 components, mapping Figma design properties to code props for Dev Mode
  • Simplified scripts/generate-code-connect.ts to pure data collection (outputs scripts/code-connect-data.json)
  • Added review-code-connect skill for intelligent .figma.tsx generation from collected data
  • Maps variant, size, state, colorPalette, boolean visibility, and instance swap properties across all components
  • Components with composition-only Figma variants are documented with comments for future Figma updates

Closes CRAFT-2151

Test plan

  • Run npx figma connect publish to verify all mappings are valid
  • Spot-check Dev Mode output in Figma for key components (Button, Select, TextInput)
  • Verify no TypeScript errors with pnpm typecheck

🤖 Generated with Claude Code

Add .figma.tsx files for 44 components mapping Figma design properties
to code props. Includes simplified data collection script and generation
skill for maintaining mappings.

Closes CRAFT-2151

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Mar 12, 2026

⚠️ No Changeset found

Latest commit: ff738c2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nimbus-documentation Ready Ready Preview, Comment Mar 13, 2026 2:29am
nimbus-storybook Ready Ready Preview, Comment Mar 13, 2026 2:29am

Request Review

Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Failed Failed SAST high 2   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca
🛡️ The following SAST misconfigurations have been detected
NAME FILE
high User-controlled URLs May Allow Server-Side Request Forgery (SSRF) Attacks ...ollect-figma-data.ts View in code
high User-controlled URLs May Allow Server-Side Request Forgery (SSRF) Attacks ...ollect-figma-data.ts View in code

Remove #NNN:NN suffixes from all figma property names (internal Figma IDs
not recognized by Code Connect). Add figma.config.json to configure parser
and include globs. All 50 mappings now pass dry-run validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…and structural elements

- Add figma.children to all compound components (Accordion, Card, ComboBox,
  Dialog, DraggableList, FormField, RadioInput, Steps, TagGroup, Tooltip)
- FormField: add Label, InfoBox (boolean toggle), Input (instance swap),
  and variant-based Error/Description selection
- Toast: fix import to resolve directly from outlet file
- Update skill with new patterns: compound children, boolean visibility
  toggles, variant-based sub-component selection, static structural elements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d pnpx guideline

Moves code-connect generation into a Claude skill, updates all .figma.tsx files
with improved examples, adds .env.template, and documents pnpx/pnpm exec usage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix phantom props (isClearable on Alert, highPrecisionIndicator on MoneyInput,
trailingElement on MultilineTextInput, variant on ToastOutlet, isClearable/
calendarButton on DatePicker), add missing required props (firstName/lastName
on Avatar, count on Steps), and wire up captured-but-unused leadingElement/
trailingElement props in input component examples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant