Skip to content

feat(design-system): setup Figma Code Connect CLI [AR-71339] - #553

Merged
iromanchuk-dn merged 16 commits into
drivenets:mainfrom
iromanchuk-dn:AR-71339-setup-code-connect-cli-for-ds-status-badge-v-2
Jun 24, 2026
Merged

feat(design-system): setup Figma Code Connect CLI [AR-71339]#553
iromanchuk-dn merged 16 commits into
drivenets:mainfrom
iromanchuk-dn:AR-71339-setup-code-connect-cli-for-ds-status-badge-v-2

Conversation

@iromanchuk-dn

@iromanchuk-dn iromanchuk-dn commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Figma Code Connect setup

  • Added @figma/code-connect devDependency and scripts in packages/design-system/package.json:
    • figma:validate — parse/check mappings locally
    • figma:publish — publish to Figma Dev Mode
  • Added figma.config.json — scans *.figma.ts / *.stories.tsx, maps imports to @drivenets/design-system, React/JSX label
  • Updated tsconfig.json — includes @figma/code-connect/figma-types for editor/type support

CI

  • Added .github/workflows/figma-code-connect.yml:
    • PR: validates Code Connect files when relevant paths change
    • main push / manual: publishes to Figma using FIGMA_ACCESS_TOKEN secret

Before merge

  • @StyleShit / @aroba-dn could you add the FIGMA_ACCESS_TOKEN GitHub Actions secret (Figma PAT with Code Connect write + file content read) so the publish job can run after merge.

First component mapping

  • ds-status-badge-v2
  • ds-button-v3
  • ds-text-input
  • ds-modal
image image image image

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for drivenets-design-system ready!

Name Link
🔨 Latest commit 2e9af54
🔍 Latest deploy log https://app.netlify.com/projects/drivenets-design-system/deploys/6a3bbe421d2ee50009d0bf58
😎 Deploy Preview https://deploy-preview-553--drivenets-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

mmurawski-dn
mmurawski-dn previously approved these changes Jun 19, 2026
vpolessky-dn
vpolessky-dn previously approved these changes Jun 19, 2026
Comment thread .changeset/lucky-sides-create.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why do we need a release for this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Even though it's related to Design System it doens't affect the DS package itself, so I'll remove it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's separate this into 2 workflows

  • pull_request - validation (figma-code-connect-validate.yml)
  • push: main - publish (figma-code-connect-publish.yml)

Comment on lines +5 to +9
paths: &figma_paths
- packages/design-system/**/*.figma.ts
- packages/design-system/figma.config.json
- packages/design-system/package.json
- .github/workflows/figma-code-connect.yml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of having a list here, let's move this to a turborepo task, so it'll be cached

- name: Publish Code Connect files
run: pnpm --filter @drivenets/design-system figma:publish
env:
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's talk about this, we'll need to define it. We might need to involve other people for this.

@@ -0,0 +1,10 @@
{
"codeConnect": {
"include": ["**/*.figma.ts", "**/*.stories.tsx"],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"include": ["**/*.figma.ts", "**/*.stories.tsx"],
"include": ["**/*.figma.ts"],

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It was intentional, we can define Figma Code Connect configuration via storybook files and probably will for complex components like Table.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Let me remove it and add it back when we really need to define figma code connect via storybook files.

Comment thread packages/design-system/figma.config.json
@iromanchuk-dn
iromanchuk-dn merged commit 7a045bd into drivenets:main Jun 24, 2026
25 checks passed
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.

4 participants