Skip to content
Open
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
5e56642
feature branch: hackathon 2024
dreamwasp Jun 23, 2025
3ef612a
a robot made this
dreamwasp Jun 23, 2025
4b4650c
created example instance
LinKCoding Jun 23, 2025
8609d2f
added landing page example
LinKCoding Jun 24, 2025
b9cc613
code connected
LinKCoding Jun 24, 2025
0e1112c
new rulez (#3120)
dreamwasp Jun 24, 2025
c656b60
merged figma files and rules
LinKCoding Jun 24, 2025
8a2a745
merge conflict leftovers
LinKCoding Jun 24, 2025
fd12641
updated figma index files
LinKCoding Jun 24, 2025
bb60dcb
moved figma files into a single folder
LinKCoding Aug 6, 2025
c93b61d
update figma config file and delete logo figma file
LinKCoding Aug 14, 2025
8259042
somewhat working anchor, still an error with icon though
LinKCoding Aug 14, 2025
99c6121
added a single icon for testing and updated anchor figma file
LinKCoding Aug 14, 2025
c6f56df
updated badge figma
LinKCoding Aug 14, 2025
38d0736
update CTAbutton
LinKCoding Aug 14, 2025
f93b72d
got leading/trailing icons to publish
LinKCoding Aug 18, 2025
a672926
cleaning up of figma files
LinKCoding Aug 19, 2025
50d38fc
fix imports
LinKCoding Aug 19, 2025
fdc6b33
working on card
LinKCoding Aug 19, 2025
c2ef55f
more card testing
LinKCoding Aug 19, 2025
b151390
updated code connect and more atoms
LinKCoding Aug 20, 2025
760bedf
more atoms
LinKCoding Aug 20, 2025
116d2d9
merged main
LinKCoding Aug 20, 2025
ff2aee5
more fixes
LinKCoding Aug 20, 2025
5196f95
more atoms and trying out template
LinKCoding Aug 21, 2025
e2dac87
removed template file
LinKCoding Aug 21, 2025
f1b7ffe
more atoms
LinKCoding Aug 21, 2025
f24f4fc
added formgroup
LinKCoding Aug 21, 2025
31873fa
more atoms
LinKCoding Aug 22, 2025
0d7be46
more atoms
LinKCoding Aug 22, 2025
88954e4
more atoms
LinKCoding Aug 22, 2025
09520b8
nest children inside tags
LinKCoding Aug 22, 2025
9234239
minor updates
LinKCoding Aug 22, 2025
beec8d2
keeping generated code
LinKCoding Aug 22, 2025
3dff694
tiny update to function type
LinKCoding Aug 22, 2025
2c79e0b
remove stories and moved code into separate folder
LinKCoding Aug 22, 2025
af1585e
moved example code to different folder
LinKCoding Aug 22, 2025
19d51b6
update figma.config.json to only include figma.tsx files
LinKCoding Aug 22, 2025
cd6f047
added instructions for copilot and cleaned up some old cold
LinKCoding Aug 22, 2025
b5b6ab1
one more example and instructions add
LinKCoding Aug 22, 2025
824b5ac
clean up from hackathon files
LinKCoding Aug 22, 2025
67516c8
adding leftover files
LinKCoding Aug 25, 2025
ea40b2c
removed extra folder + file
LinKCoding Aug 25, 2025
3b20b25
merged main
LinKCoding Aug 28, 2025
777d236
revert react-hook-form bump in yarn.lock
LinKCoding Aug 28, 2025
5ddf045
added rules and re-org'd files
LinKCoding Aug 28, 2025
bc1ae28
removed figma cli dependency
LinKCoding Aug 28, 2025
7dd8f3c
fix linting errors
LinKCoding Aug 28, 2025
0aa7790
added documentation for figma MCP and code connect
LinKCoding Aug 28, 2025
1a640d6
updated some links and text
LinKCoding Aug 28, 2025
e571332
formatted
LinKCoding Aug 28, 2025
f1360a8
add comment
LinKCoding Aug 28, 2025
e50f059
some small clean ups
LinKCoding Aug 28, 2025
50c4d95
updated card and iconbutton figma files
LinKCoding Aug 29, 2025
6873007
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding Sep 2, 2025
69fc40e
add Molecules folder
LinKCoding Sep 2, 2025
b56036d
revert molecules addition
LinKCoding Sep 2, 2025
4c1c53b
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
dreamwasp Sep 3, 2025
2e68fee
apply Cass's feedback
LinKCoding Sep 3, 2025
f214b73
updates to form elements
LinKCoding Sep 8, 2025
cb7d6e0
deleting unused figma files to avoid publishing conflicts with other …
LinKCoding Sep 10, 2025
3755c70
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding Sep 11, 2025
397ec2d
commenting out input related props until figma design work is done
LinKCoding Sep 11, 2025
68776fb
updated input figma file
LinKCoding Sep 12, 2025
1eb7c0d
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding Sep 15, 2025
da261a9
deleted basebutton figma file
LinKCoding Sep 15, 2025
d5bac29
deleted unused figma files to avoid publishing
LinKCoding Sep 25, 2025
f6f9346
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding Sep 25, 2025
ed28c42
feat: Implement CodeConnect for Molecules (#3164)
LinKCoding Oct 6, 2025
04a124a
feat: Implement CodeConnect for Organisms (#3175)
LinKCoding Oct 6, 2025
9616032
fix immediate errors
LinKCoding Oct 6, 2025
c5e45dd
atoms figma redesign followups
LinKCoding Oct 10, 2025
043f431
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding Oct 14, 2025
55ac831
ignore eslint and prettier for code-connect files
LinKCoding Oct 14, 2025
9bbcb3e
add back in react imports to avoid TS errors
LinKCoding Oct 14, 2025
8edfa2b
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding Oct 16, 2025
e474c16
update code connect storybook page
LinKCoding Oct 16, 2025
7b04e50
fix MCP files and update code connect guidance
LinKCoding Oct 16, 2025
bf31d1d
MCP updates
LinKCoding Oct 21, 2025
c9e7d95
updated figma mcp docs
LinKCoding Oct 22, 2025
7e27b06
updated mcp to include beta text
LinKCoding Oct 22, 2025
175466f
apply meeting feedback
LinKCoding Oct 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .cursor/rules/figma-rules.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
description: Figma Dev Mode MCP rules
globs:
alwaysApply: true
---

# Figma Dev Mode MCP Rules

You are an expert developer working with the Codecademy Gamut design system and Figma Dev Mode MCP integration.

When generating code from Figma designs, follow these rules:

## Asset Management

- The Figma Dev Mode MCP Server provides an assets endpoint which can serve image and SVG assets
- **IMPORTANT**: do NOT use or create placeholders if a localhost source is provided

## Component Usage

## Component Usage

- **IMPORTANT**: Always use components from `/packages` whenever possible
- Check if the Figma component name matches a Gamut component name and use that component
- **IMPORTANT**: All patterns should come from `/packages/gamut-patterns` - use the design's metadata to match the Figma component name to the pattern component
- **IMPORTANT**: All illustrations should come from `/packages/gamut-illustrations` - use the design's metadata to match the Figma component name to the illustration component
- **IMPORTANT**: All icons should come from `/packages/gamut-icons` - use the design's metadata to find the Figma component's icon's name and find the matching Gamut icon component

## Styling Guidelines

- Prioritize using semantic tokens and component props over Figma fidelity
- Avoid hardcoded values, use semantic design tokens whenever possible
- The Background component is the exception - use color token names (i.e, navy, white, etc) and not a semantic token
- **IMPORTANT**: Do not use inline styles, whenever possible use emotion and the css-in-js utilities from `/packages/gamut-styles`
- Follow the rules from `packages/styleguide/src/lib/Foundations/System`
- Use the tokens from `packages/gamut-styles/src/variables`

## Accessibility & Best Practices

- **IMPORTANT**: Follow WCAG requirements for accessibility
- Always follow best practices from `/packages/styleguide/src/lib/Meta/Best Practices.mdx`

## Implementation

- Use the CodeConnect implementation when available
- Generate clean, maintainable React code using TypeScript
- Follow the existing Gamut patterns and conventions
Empty file.
42 changes: 42 additions & 0 deletions .github/instructions/figma.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
applyTo: '**/*.tsx,**/*.jsx'
---

# Figma Dev Mode MCP Rules

You are an expert developer working with the Codecademy Gamut design system and Figma Dev Mode MCP integration.

When generating code from Figma designs, follow these rules:

## Asset Management

- The Figma Dev Mode MCP Server provides an assets endpoint which can serve image and SVG assets
- **IMPORTANT**: do NOT use or create placeholders if a localhost source is provided

## Component Usage

- **IMPORTANT**: Always use components from `/packages` whenever possible
- Check if the Figma component name matches a Gamut component name and use that component
- **IMPORTANT**: All patterns should come from `/packages/gamut-patterns` - use the design's metadata to match the Figma component name to the pattern component
- **IMPORTANT**: All illustrations should come from `/packages/gamut-illustrations` - use the design's metadata to match the Figma component name to the illustration component
- **IMPORTANT**: All icons should come from `/packages/gamut-icons` - use the design's metadata to find the Figma component's icon's name and find the matching Gamut icon component

## Styling Guidelines

- Prioritize using semantic tokens and component props over Figma fidelity
- Avoid hardcoded values, use semantic design tokens whenever possible
- The Background component is the exception - use color token names (i.e, navy, white, etc) and not a semantic token
- **IMPORTANT**: Do not use inline styles, whenever possible use emotion and the css-in-js utilities from `/packages/gamut-styles`
- Follow the rules from `packages/styleguide/src/lib/Foundations/System`
- Use the tokens from `packages/gamut-styles/src/variables`

## Accessibility & Best Practices

- **IMPORTANT**: Follow WCAG requirements for accessibility
- Always follow best practices from `/packages/styleguide/src/lib/Meta/Best Practices.mdx`

## Implementation

- Use the CodeConnect implementation when available
- Generate clean, maintainable React code using TypeScript
- Follow the existing Gamut patterns and conventions
7 changes: 7 additions & 0 deletions figma.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"codeConnect": {
"include": ["packages/code-connect/**/*.figma.{tsx,jsx}"],
"label": "React",
"interactiveSetupFigmaFileUrl": "https://www.figma.com/design/ReGfRNillGABAj5SlITalN/%F0%9F%93%90-Gamut?node-id=23-5&p=f&m=dev"
}
}
34 changes: 34 additions & 0 deletions packages/code-connect/Atoms/Anchor.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Anchor } from '@codecademy/gamut';
import figma from '@figma/code-connect';

/**
* -- This file was auto-generated by Code Connect --
* `props` includes a mapping from Figma properties and variants to
* suggested values. You should update this to match the props of your
* code component, and update the `example` function to return the
* code example you'd like to see in Figma
*/

figma.connect(
Anchor,
'https://www.figma.com/design/ReGfRNillGABAj5SlITalN/%F0%9F%93%90-Gamut?node-id=19220%3A21856',
{
props: {
children: figma.string('✏️ label'),
icon: figma.boolean('👁 leading icon', {
true: figma.instance('↳ leading icon'),
false: figma.boolean('👁 trailing icon', {
true: figma.instance('↳ trailing icon'),
false: undefined,
}),
}),
variant: figma.enum('variant', {
Inline: 'inline',
Interface: 'interface',
Standard: 'standard',
'Standard-secondary': 'standard-secondary',
}),
},
example: ({ children, ...props }) => <Anchor {...props}>{children}</Anchor>,
}
);
35 changes: 35 additions & 0 deletions packages/code-connect/Atoms/Badge.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Badge } from '@codecademy/gamut';
import figma from '@figma/code-connect';

/**
* -- This file was auto-generated by Code Connect --
* `props` includes a mapping from Figma properties and variants to
* suggested values. You should update this to match the props of your
* code component, and update the `example` function to return the
* code example you'd like to see in Figma
*/

figma.connect(
Badge,
'https://www.figma.com/design/ReGfRNillGABAj5SlITalN/%F0%9F%93%90-Gamut?node-id=8200%3A8349',
{
props: {
children: figma.string('✏️ label'),
icon: figma.instance('↳ icon'),
variant: figma.enum('variant', {
primary: 'primary',
secondary: 'secondary',
tertiary: 'tertiary',
tertiaryFill: 'tertiaryFill',
accent: 'accent',
}),
size: figma.enum('size', {
base: 'base',
sm: 'sm',
}),
},
example: ({ children, ...props }: any) => (
<Badge {...props}>{children}</Badge>
),
}
);
30 changes: 30 additions & 0 deletions packages/code-connect/Atoms/Buttons/CTAButton.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { CTAButton } from '@codecademy/gamut';
import figma from '@figma/code-connect';

/**
* -- This file was auto-generated by Code Connect --
* `props` includes a mapping from Figma properties and variants to
* suggested values. You should update this to match the props of your
* code component, and update the `example` function to return the
* code example you'd like to see in Figma
*/

figma.connect(
CTAButton,
'https://www.figma.com/design/ReGfRNillGABAj5SlITalN/%F0%9F%93%90-Gamut?node-id=1615%3A1914',
{
props: {
children: figma.string('✏️ label'),
icon: figma.boolean('👁 leading icon', {
true: figma.instance('↳ leading icon'),
false: figma.boolean('👁 trailing icon', {
true: figma.instance('↳ trailing icon'),
false: undefined,
}),
}),
},
example: ({ children, ...props }: any) => (
<CTAButton {...props}>{children}</CTAButton>
),
}
);
40 changes: 40 additions & 0 deletions packages/code-connect/Atoms/Buttons/FillButton.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { FillButton } from '@codecademy/gamut';
import figma from '@figma/code-connect';

/**
* -- This file was auto-generated by Code Connect --
* `props` includes a mapping from Figma properties and variants to
* suggested values. You should update this to match the props of your
* code component, and update the `example` function to return the
* code example you'd like to see in Figma
*/

figma.connect(
FillButton,
'https://www.figma.com/design/ReGfRNillGABAj5SlITalN/%F0%9F%93%90-Gamut?node-id=1106%3A7',
{
props: {
icon: figma.boolean('👁 leading icon', {
true: figma.instance('↳ leading icon'),
false: figma.boolean('👁 trailing icon', {
true: figma.instance('↳ trailing icon'),
false: undefined,
}),
}),
children: figma.string('✏️ label'),
variant: figma.enum('variant', {
primary: 'primary',
secondary: 'secondary',
danger: 'danger',
}),
size: figma.enum('size', {
normal: 'normal',
small: 'small',
large: 'large',
}),
},
example: ({ children, ...props }: any) => (
<FillButton {...props}>{children}</FillButton>
),
}
);
30 changes: 30 additions & 0 deletions packages/code-connect/Atoms/Buttons/IconButton.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { IconButton } from '@codecademy/gamut';
import figma from '@figma/code-connect';

/**
* -- This file was auto-generated by Code Connect --
* `props` includes a mapping from Figma properties and variants to
* suggested values. You should update this to match the props of your
* code component, and update the `example` function to return the
* code example you'd like to see in Figma
*/

figma.connect(
IconButton,
'https://www.figma.com/design/ReGfRNillGABAj5SlITalN/%F0%9F%93%90-Gamut?node-id=1106%3A90',
{
props: {
icon: figma.instance('icon'),
size: figma.enum('size', {
normal: 'normal',
small: 'small',
large: 'large',
}),
toolTipInfo: figma.nestedProps('tooltip', {
tip: figma.textContent('✏️ tooltip'),
}),
},
// @ts-expect-error - props doesn't full align with code implementation
example: (props) => <IconButton {...props} tip={props.toolTipInfo?.tip} />,
}
);
40 changes: 40 additions & 0 deletions packages/code-connect/Atoms/Buttons/StrokeButton.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { StrokeButton } from '@codecademy/gamut';
import figma from '@figma/code-connect';

/**
* -- This file was auto-generated by Code Connect --
* `props` includes a mapping from Figma properties and variants to
* suggested values. You should update this to match the props of your
* code component, and update the `example` function to return the
* code example you'd like to see in Figma
*/

figma.connect(
StrokeButton,
'https://www.figma.com/design/ReGfRNillGABAj5SlITalN/%F0%9F%93%90-Gamut?node-id=1106%3A48',
{
props: {
children: figma.string('✏️ label'),
icon: figma.boolean('👁 leading icon', {
true: figma.instance('↳ leading icon'),
false: figma.boolean('👁 trailing icon', {
true: figma.instance('↳ trailing icon'),
false: undefined,
}),
}),
variant: figma.enum('variant', {
primary: 'primary',
secondary: 'secondary',
danger: 'danger',
}),
size: figma.enum('size', {
normal: 'normal',
small: 'small',
large: 'large',
}),
},
example: ({ children, ...props }: any) => (
<StrokeButton {...props}>{children}</StrokeButton>
),
}
);
35 changes: 35 additions & 0 deletions packages/code-connect/Atoms/Buttons/TextButton.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { TextButton } from '@codecademy/gamut';
import figma from '@figma/code-connect';

/**
* -- This file was auto-generated by Code Connect --
* `props` includes a mapping from Figma properties and variants to
* suggested values. You should update this to match the props of your
* code component, and update the `example` function to return the
* code example you'd like to see in Figma
*/

figma.connect(
TextButton,
'https://www.figma.com/design/ReGfRNillGABAj5SlITalN/%F0%9F%93%90-Gamut?node-id=1106%3A69',
{
props: {
children: figma.string('✏️ label'),
icon: figma.boolean('👁 leading icon', {
true: figma.instance('↳ leading icon'),
false: figma.boolean('👁 trailing icon', {
true: figma.instance('↳ trailing icon'),
false: undefined,
}),
}),
size: figma.enum('size', {
small: 'small',
normal: 'normal',
large: 'large',
}),
},
example: ({ children, ...props }: any) => (
<TextButton {...props}>{children}</TextButton>
),
}
);
38 changes: 38 additions & 0 deletions packages/code-connect/Atoms/Card.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { Card } from '@codecademy/gamut';
import figma from '@figma/code-connect';

/**
* -- This file was auto-generated by Code Connect --
* `props` includes a mapping from Figma properties and variants to
* suggested values. You should update this to match the props of your
* code component, and update the `example` function to return the
* code example you'd like to see in Figma
*/

figma.connect(
Card,
'https://www.figma.com/design/ReGfRNillGABAj5SlITalN/%F0%9F%93%90-Gamut?node-id=20111%3A63391',
{
props: {
variant: figma.enum('variant', {
Default: 'default',
White: 'white',
Yellow: 'yellow',
Beige: 'beige',
Navy: 'navy',
Hyper: 'hyper',
}),
shadow: figma.enum('shadow', {
'pattern-right': 'patternRight',
'pattern-left': 'patternLeft',
outline: 'outline',
none: 'none',
}),
isInteractive: figma.boolean('isInteractive'),
children: figma.children('.Card Content'),
},
example: ({ children, ...props }: any) => (
<Card {...props}>{children}</Card>
),
}
);
Loading
Loading