-
Notifications
You must be signed in to change notification settings - Fork 31
feat: Figma CodeConnect and MCP documentation and enablement #3159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
103 commits
Select commit
Hold shift + click to select a range
5e56642
feature branch: hackathon 2024
dreamwasp 3ef612a
a robot made this
dreamwasp 4b4650c
created example instance
LinKCoding 8609d2f
added landing page example
LinKCoding b9cc613
code connected
LinKCoding 0e1112c
new rulez (#3120)
dreamwasp c656b60
merged figma files and rules
LinKCoding 8a2a745
merge conflict leftovers
LinKCoding fd12641
updated figma index files
LinKCoding bb60dcb
moved figma files into a single folder
LinKCoding c93b61d
update figma config file and delete logo figma file
LinKCoding 8259042
somewhat working anchor, still an error with icon though
LinKCoding 99c6121
added a single icon for testing and updated anchor figma file
LinKCoding c6f56df
updated badge figma
LinKCoding 38d0736
update CTAbutton
LinKCoding f93b72d
got leading/trailing icons to publish
LinKCoding a672926
cleaning up of figma files
LinKCoding 50d38fc
fix imports
LinKCoding fdc6b33
working on card
LinKCoding c2ef55f
more card testing
LinKCoding b151390
updated code connect and more atoms
LinKCoding 760bedf
more atoms
LinKCoding 116d2d9
merged main
LinKCoding ff2aee5
more fixes
LinKCoding 5196f95
more atoms and trying out template
LinKCoding e2dac87
removed template file
LinKCoding f1b7ffe
more atoms
LinKCoding f24f4fc
added formgroup
LinKCoding 31873fa
more atoms
LinKCoding 0d7be46
more atoms
LinKCoding 88954e4
more atoms
LinKCoding 09520b8
nest children inside tags
LinKCoding 9234239
minor updates
LinKCoding beec8d2
keeping generated code
LinKCoding 3dff694
tiny update to function type
LinKCoding 2c79e0b
remove stories and moved code into separate folder
LinKCoding af1585e
moved example code to different folder
LinKCoding 19d51b6
update figma.config.json to only include figma.tsx files
LinKCoding cd6f047
added instructions for copilot and cleaned up some old cold
LinKCoding b5b6ab1
one more example and instructions add
LinKCoding 824b5ac
clean up from hackathon files
LinKCoding 67516c8
adding leftover files
LinKCoding ea40b2c
removed extra folder + file
LinKCoding 3b20b25
merged main
LinKCoding 777d236
revert react-hook-form bump in yarn.lock
LinKCoding 5ddf045
added rules and re-org'd files
LinKCoding bc1ae28
removed figma cli dependency
LinKCoding 7dd8f3c
fix linting errors
LinKCoding 0aa7790
added documentation for figma MCP and code connect
LinKCoding 1a640d6
updated some links and text
LinKCoding e571332
formatted
LinKCoding f1360a8
add comment
LinKCoding e50f059
some small clean ups
LinKCoding 50c4d95
updated card and iconbutton figma files
LinKCoding 6873007
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding 69fc40e
add Molecules folder
LinKCoding b56036d
revert molecules addition
LinKCoding 4c1c53b
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
dreamwasp 2e68fee
apply Cass's feedback
LinKCoding f214b73
updates to form elements
LinKCoding cb7d6e0
deleting unused figma files to avoid publishing conflicts with other …
LinKCoding 3755c70
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding 397ec2d
commenting out input related props until figma design work is done
LinKCoding 68776fb
updated input figma file
LinKCoding 1eb7c0d
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding da261a9
deleted basebutton figma file
LinKCoding d5bac29
deleted unused figma files to avoid publishing
LinKCoding f6f9346
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding ed28c42
feat: Implement CodeConnect for Molecules (#3164)
LinKCoding 04a124a
feat: Implement CodeConnect for Organisms (#3175)
LinKCoding 9616032
fix immediate errors
LinKCoding c5e45dd
atoms figma redesign followups
LinKCoding 043f431
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding 55ac831
ignore eslint and prettier for code-connect files
LinKCoding 9bbcb3e
add back in react imports to avoid TS errors
LinKCoding 8edfa2b
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding e474c16
update code connect storybook page
LinKCoding 7b04e50
fix MCP files and update code connect guidance
LinKCoding bf31d1d
MCP updates
LinKCoding c9e7d95
updated figma mcp docs
LinKCoding 7e27b06
updated mcp to include beta text
LinKCoding 175466f
apply meeting feedback
LinKCoding a285d31
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding f0e8e88
formatted
LinKCoding 90a5669
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding d7f500d
minor updates to docs
LinKCoding 6a9351f
merged main
LinKCoding 375b969
update figma mcp page
LinKCoding 7235ac4
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding 54b2af7
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding e159718
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding 2232121
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding 81def92
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding 83fbead
updated config file
LinKCoding 1195ecf
address some figma fixes in atoms
LinKCoding 9342744
finish up figma updates for atoms
LinKCoding 6be882c
updated molecules according to figma
LinKCoding 6850035
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding c394b33
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding a88a294
residual clean up
LinKCoding 4082acf
Merge branch 'main' into kl-gm-1194-gamut-codeconnect-atoms
LinKCoding c917e5a
address Cass's feedback
LinKCoding 00ff590
formatted
LinKCoding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| --- | ||
| description: Figma Dev Mode MCP rules | ||
| 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: | ||
|
|
||
| ## MANDATORY Pre-Generation Steps | ||
|
|
||
| **BEFORE generating ANY code from Figma, you MUST:** | ||
|
|
||
| 1. **Inspect the Figma layer hierarchy**: | ||
|
|
||
| - Call `get_metadata` WITH the nodeId to get parent component info | ||
| - Call `get_metadata` WITHOUT nodeId (empty string) to attempt to get CHILD layers | ||
| - **IMPORTANT**: Current limitation - `get_metadata` may not return nested child layer names (icons, nested components, etc.) | ||
| - **If child layer names are not available from tooling:** | ||
| - Analyze the screenshot and make your best guess about which icons/nested components are used | ||
| - Look for visual clues (user icon, gear icon, etc.) and match them to likely Gamut icon names | ||
| - Search the codebase to verify the icon exists (e.g., check for `PersonIcon`, `GearIcon`, etc. in `/packages/gamut-icons/src`) | ||
| - Generate the code using your best guess | ||
| - **AFTER generating the code**, ask the user to confirm the icons are correct | ||
| - Example: "I've generated the code using PersonIcon and GearIcon based on what I see in the screenshot. Can you confirm these are the correct icons from the Figma layers?" | ||
| - Map icon layer names to components in the codebase (e.g., "Regular/Interface/PersonIcon" → `PersonIcon`, "Mini/MiniCheckCircleIcon" → `MiniCheckCircleIcon`) | ||
|
|
||
| 2. **Read token files** (use read_file tool on ALL of these): | ||
|
|
||
| - `/packages/gamut-styles/src/variables/spacing.ts` | ||
| - `/packages/gamut-styles/src/variables/colors.ts` | ||
| - `/packages/gamut-styles/src/variables/typography.ts` | ||
| - `/packages/gamut-styles/src/variables/borderRadii.ts` | ||
|
|
||
| 3. **Search for existing components** (use codebase_search): | ||
|
|
||
| - Check if similar component exists in `/packages/gamut/src` | ||
| - If exists, extend it instead of creating new one | ||
|
|
||
| 4. **Understand the design system patterns**: | ||
| - Read example components like Badge, Tag, or Button | ||
| - Follow variance, system props, and styledOptions patterns | ||
|
|
||
| ## 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`: | ||
| - Try to get icon layer names from Figma metadata | ||
| - If layer names are not available, make your best guess based on the screenshot and verify the icon exists in the codebase | ||
| - Generate the code with your best guess, then confirm with the user after | ||
| - Map icon layer names to Gamut components (e.g., "Regular/Interface/PersonIcon" → `PersonIcon` from `@codecademy/gamut-icons`) | ||
|
|
||
| ## Styling Guidelines - STRICT RULES | ||
|
|
||
| ### ❌ NEVER Do This: | ||
|
|
||
| ```tsx | ||
| // NEVER use hardcoded hex colors | ||
| color: '#ffffff', | ||
| backgroundColor: '#000000', | ||
|
|
||
| // NEVER use CSS properties not in system props | ||
| backdropFilter: 'blur(1px)', | ||
|
|
||
| // NEVER use inline styles | ||
| style={{ fontSize: 14 }} | ||
| ``` | ||
|
|
||
| ### ✅ ALWAYS Do This: | ||
|
|
||
| ```tsx | ||
| // ALWAYS use spacing tokens (4, 8, 12, 16, 24, 32, 40, 48, 64, 96) | ||
| height: 24, // from spacing.ts | ||
| width: 64, // from spacing.ts | ||
|
|
||
| // ALWAYS use fontSize tokens (14, 16, 18, 20, 22, 26, 34, 44, 64) | ||
| fontSize: 14, // from typography.ts | ||
|
|
||
| // ALWAYS use borderRadii tokens (none, sm, md, lg, xl, full) | ||
| borderRadius: 'full', // from borderRadii.ts | ||
|
|
||
| // ALWAYS use semantic color tokens | ||
| bg: 'background', | ||
| color: 'text', | ||
| borderColor: 'border', | ||
|
|
||
| // ALWAYS use system props via system.css or styled components | ||
| system.css({ | ||
| bg: 'black', | ||
| color: 'white', | ||
| borderRadius: 'full', | ||
| }) | ||
| ``` | ||
|
|
||
| ### Token Mapping Rules: | ||
|
|
||
| 1. **Spacing/Sizing**: Map Figma values to closest token from `spacing.ts` | ||
|
|
||
| - 4px, 8px, 12px, 16px, 24px, 32px, 40px, 48px, 64px, 96px | ||
|
|
||
| 2. **Colors**: Use semantic tokens OR core colors from `colors.ts` | ||
|
|
||
| - Semantic: `background`, `text`, `border`, `text-secondary`, etc. | ||
| - Core: `navy`, `white`, `black`, `blue`, `green`, `red`, `yellow`, etc. | ||
| - For Background component only: use color names (navy, white, etc.) | ||
|
|
||
| 3. **Border Radius**: Use tokens from `borderRadii.ts` | ||
|
|
||
| - none (0px), sm (2px), md (4px), lg (8px), xl (16px), full (999px) | ||
|
|
||
| 4. **Typography**: Use tokens from `typography.ts` | ||
|
|
||
| - fontFamily: `accent`, `base`, `monospace`, `system` | ||
| - fontSize: 14, 16, 18, 20, 22, 26, 34, 44, 64 | ||
| - fontWeight: 400, 700 or `base`, `title` | ||
| - lineHeight: `base` (1.5), `title` (1.2), `spacedTitle` (1.3) | ||
|
|
||
| 5. **If no exact match**: Document in code comment why custom value needed | ||
|
|
||
| ### Emotion & CSS-in-JS Patterns: | ||
|
|
||
| - **IMPORTANT**: Do not use inline styles | ||
| - Use `styled` from `@emotion/styled` | ||
| - Use `system.css()` for style objects | ||
| - Use `styledOptions` for styled component options | ||
| - Compose system props with `variance.compose()` | ||
|
|
||
| ## 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 | ||
|
|
||
| ## Post-Generation Validation | ||
|
|
||
| After generating code, verify: | ||
|
|
||
| - [ ] No hardcoded hex colors (`#` in color values) | ||
| - [ ] No hardcoded pixel strings (`'24px'` format) | ||
| - [ ] All spacing values match tokens from spacing.ts | ||
| - [ ] All colors use semantic tokens or theme colors | ||
| - [ ] All border radius uses borderRadii tokens | ||
| - [ ] Component follows Gamut patterns (variance, system props, styledOptions) | ||
| - [ ] No inline styles | ||
| - [ ] Uses emotion styled components | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,189 @@ | ||
| --- | ||
| applyTo: '**' | ||
| priority: high | ||
| --- | ||
|
|
||
| # 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: | ||
|
|
||
| ## WORKFLOW TRIGGER - CRITICAL | ||
|
|
||
| **When you see ANY of these patterns:** | ||
|
|
||
| - Figma URL mentioned (figma.com/design/...) | ||
| - nodeId provided | ||
| - "generate from figma" or similar requests | ||
| - MCP Figma server is being used | ||
|
|
||
| ## MANDATORY Pre-Generation Steps - MUST BE COMPLETED IN ORDER | ||
|
|
||
| **Step 1: Figma Inspection (REQUIRED)** | ||
|
|
||
| - [ ] Call `get_metadata` WITH nodeId | ||
| - [ ] Call `get_metadata` WITHOUT nodeId | ||
| - **IMPORTANT**: Current limitation - `get_metadata` may not return nested child layer names (icons, nested components, etc.) | ||
| - **If child layer names are not available from tooling:** | ||
| - Analyze the screenshot and make your best guess about which icons/nested components are used | ||
| - Look for visual clues (user icon, gear icon, etc.) and match them to likely Gamut icon names | ||
| - Search the codebase to verify the icon exists (e.g., check for `PersonIcon`, `GearIcon`, etc. in `/packages/gamut-icons/src`) | ||
| - Generate the code using your best guess | ||
| - **AFTER generating the code**, ask the user to confirm the icons are correct | ||
| - Example: "I've generated the code using PersonIcon and GearIcon based on what I see in the screenshot. Can you confirm these are the correct icons from the Figma layers?" | ||
| - Map icon layer names to components in the codebase (e.g., "Regular/Interface/PersonIcon" → `PersonIcon`, "Mini/MiniCheckCircleIcon" → `MiniCheckCircleIcon`) | ||
| - [ ] Call `get_image` to get screenshot FOR CONFIRMATION ONLY | ||
| - [ ] **Validate that screenshot matches metadata understanding** | ||
|
|
||
| **Step 1.5: Metadata Analysis (NEW - REQUIRED)** | ||
|
|
||
| - [ ] **PRIMARY SOURCE**: Use Figma metadata to determine: | ||
| - Component name and type | ||
| - Layer structure and nested components | ||
| - Any CodeConnect implementations mentioned | ||
| - [ ] **SECONDARY SOURCE**: Use screenshot only to: | ||
| - Confirm visual styling details | ||
| - Identify icons if not available in metadata | ||
| - Validate layout and spacing | ||
| - [ ] **If metadata says "Badge" but screenshot looks different, trust the metadata** | ||
|
|
||
| **Step 2: Token Analysis (REQUIRED)** | ||
|
|
||
| - [ ] Read `/packages/gamut-styles/src/variables/spacing.ts` | ||
| - [ ] Read `/packages/gamut-styles/src/variables/colors.ts` | ||
| - [ ] Read `/packages/gamut-styles/src/variables/typography.ts` | ||
| - [ ] Read `/packages/gamut-styles/src/variables/borderRadii.ts` | ||
|
|
||
| **Step 3: Component Research (REQUIRED)** | ||
|
|
||
| - [ ] Search for existing components in `/packages/gamut/src` | ||
| - [ ] Read existing component if found | ||
| - [ ] Determine if extending existing vs creating new | ||
|
|
||
| **Step 4: Generate Code** | ||
|
|
||
| - [ ] Use existing components when possible | ||
| - [ ] Follow token mapping rules strictly | ||
| - [ ] Validate against post-generation checklist | ||
|
|
||
| ## 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`: | ||
| - Try to get icon layer names from Figma metadata | ||
| - If layer names are not available, make your best guess based on the screenshot and verify the icon exists in the codebase | ||
| - Generate the code with your best guess, then confirm with the user after | ||
| - Map icon layer names to Gamut components (e.g., "Regular/Interface/PersonIcon" → `PersonIcon` from `@codecademy/gamut-icons`) | ||
|
|
||
| ## Styling Guidelines - STRICT RULES | ||
|
|
||
| ### ❌ NEVER Do This: | ||
|
|
||
| ```tsx | ||
| // NEVER use hardcoded pixel values | ||
| height: 24, | ||
| width: '64px', | ||
| fontSize: 14, | ||
|
|
||
| // NEVER use hardcoded hex colors | ||
| color: '#ffffff', | ||
| backgroundColor: '#000000', | ||
|
|
||
| // NEVER use CSS properties not in system props | ||
| backdropFilter: 'blur(1px)', | ||
|
|
||
| // NEVER use inline styles | ||
| style={{ fontSize: 14 }} | ||
| ``` | ||
|
|
||
| ### ✅ ALWAYS Do This: | ||
|
|
||
| ```tsx | ||
| // ALWAYS use spacing tokens (4, 8, 12, 16, 24, 32, 40, 48, 64, 96) | ||
| height: 24, // from spacing.ts | ||
| width: 64, // from spacing.ts | ||
|
|
||
| // ALWAYS use fontSize tokens (14, 16, 18, 20, 22, 26, 34, 44, 64) | ||
| fontSize: 14, // from typography.ts | ||
|
|
||
| // ALWAYS use borderRadii tokens (none, sm, md, lg, xl, full) | ||
| borderRadius: 'full', // from borderRadii.ts | ||
|
|
||
| // ALWAYS use semantic color tokens | ||
| bg: 'background', | ||
| color: 'text', | ||
| borderColor: 'border', | ||
|
|
||
| // ALWAYS use system props via system.css or styled components | ||
| system.css({ | ||
| bg: 'black', | ||
| color: 'white', | ||
| borderRadius: 'full', | ||
| }) | ||
| ``` | ||
|
|
||
| ### Token Mapping Rules: | ||
|
|
||
| 1. **Spacing/Sizing**: Map Figma values to closest token from `spacing.ts` | ||
|
|
||
| - 4px, 8px, 12px, 16px, 24px, 32px, 40px, 48px, 64px, 96px | ||
|
|
||
| 2. **Colors**: Use semantic tokens OR core colors from `colors.ts` | ||
|
|
||
| - Semantic: `background`, `text`, `border`, `text-secondary`, etc. | ||
| - Core: `navy`, `white`, `black`, `blue`, `green`, `red`, `yellow`, etc. | ||
| - For Background component only: use color names (navy, white, etc.) | ||
|
|
||
| 3. **Border Radius**: Use tokens from `borderRadii.ts` | ||
|
|
||
| - none (0px), sm (2px), md (4px), lg (8px), xl (16px), full (999px) | ||
|
|
||
| 4. **Typography**: Use tokens from `typography.ts` | ||
|
|
||
| - fontFamily: `accent`, `base`, `monospace`, `system` | ||
| - fontSize: 14, 16, 18, 20, 22, 26, 34, 44, 64 | ||
| - fontWeight: 400, 700 or `base`, `title` | ||
| - lineHeight: `base` (1.5), `title` (1.2), `spacedTitle` (1.3) | ||
|
|
||
| 5. **If no exact match**: Document in code comment why custom value needed | ||
|
|
||
| ### Emotion & CSS-in-JS Patterns: | ||
|
|
||
| - **IMPORTANT**: Do not use inline styles | ||
| - Use `styled` from `@emotion/styled` | ||
| - Use `system.css()` for style objects | ||
| - Use `styledOptions` for styled component options | ||
| - Compose system props with `variance.compose()` | ||
|
|
||
| ## 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 | ||
|
|
||
| ## Post-Generation Validation | ||
|
|
||
| After generating code, verify: | ||
|
|
||
| - [ ] No hardcoded hex colors (`#` in color values) | ||
| - [ ] No hardcoded pixel strings (`'24px'` format) | ||
| - [ ] All spacing values match tokens from spacing.ts | ||
| - [ ] All colors use semantic tokens or theme colors | ||
| - [ ] All border radius uses borderRadii tokens | ||
| - [ ] Component follows Gamut patterns (variance, system props, styledOptions) | ||
| - [ ] No inline styles | ||
| - [ ] Uses emotion styled components |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "codeConnect": { | ||
| "include": ["packages/code-connect/**/*.{tsx,jsx}"], | ||
| "label": "React", | ||
| "interactiveSetupFigmaFileUrl": "https://www.figma.com/design/ReGfRNillGABAj5SlITalN/%F0%9F%93%90-Gamut?node-id=23-5&p=f&m=dev" | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.