Skip to content

feat: add Figma Code Connect POC for DsButtonV3 and DsSplitButton#534

Draft
Haiylo-Batel wants to merge 1 commit into
drivenets:mainfrom
Haiylo-Batel:feat/code-connect-poc
Draft

feat: add Figma Code Connect POC for DsButtonV3 and DsSplitButton#534
Haiylo-Batel wants to merge 1 commit into
drivenets:mainfrom
Haiylo-Batel:feat/code-connect-poc

Conversation

@Haiylo-Batel

Copy link
Copy Markdown

Summary

POC for Figma Code Connect — links DS components to their Figma counterparts so developers see correct, dynamic code snippets in Dev Mode instead of Figma's auto-generated (often incorrect) output.

What's included

  • figma.config.json (repo root) — Code Connect CLI config
  • @figma/code-connect added as root devDependency (v1.4.7)
  • tsconfig.json (design-system) — added @figma/code-connect/figma-types to types
  • Two .figma.ts template files:
    • ds-button-v3/ds-button-v3.figma.ts — maps DAP_Button_v03 (Variant, Color, light, Size, disabled, selected)
    • ds-split-button/ds-split-button.figma.ts — maps DAP_SplitButton_v01 (disabled state)

Current state

Both mappings are published and working in Dev Mode on the DAP Design System 1.2 library file (published manually for this POC).

Notes for future adoption

  • CI publishing: figma connect publish should run on merge to main with a Figma service account token (scopes: Code Connect → Write, File content → Read)
  • Incremental rollout: add .figma.ts files per component as they're touched — no big-bang migration needed
  • Each template file is ~20 lines and only needs updating when the component API changes

- Add figma.config.json with Code Connect CLI configuration
- Add ds-button-v3.figma.ts mapping DAP_Button_v03 variants to code props
- Add ds-split-button.figma.ts mapping DAP_SplitButton_v01 to code props
- Add @figma/code-connect devDependency (v1.4.7)
- Add @figma/code-connect/figma-types to design-system tsconfig
@netlify

netlify Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploy Preview for drivenets-design-system failed.

Name Link
🔨 Latest commit 9905836
🔍 Latest deploy log https://app.netlify.com/projects/drivenets-design-system/deploys/6a2809c149a9960008178d7c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant