Restructure Forma 36 skill into granular guidelines format#3385
Restructure Forma 36 skill into granular guidelines format#3385toniwowtscherk wants to merge 13 commits intomainfrom
Conversation
Add Forma 36 skill documentation for UI development using Contentful's design system, including rules, guidelines, and component usage.
This file contains design tokens for Forma 36, including color, spacing, typography, shadow, border radius, and z-index tokens. It emphasizes the use of token names instead of raw values to maintain consistency with the design system.
Add description for Forma 36 UI design system.
Updated the title to reflect 'Screen Patterns' instead of 'UI Patterns'.
Replace the monolithic SKILL.md/tokens.md/screen-patterns.md with a structured guidelines/ directory following Figma Make Kit best practices (many short, focused files over few large ones). New structure: - guidelines/tokens/ — color, typography, spacing, effects - guidelines/components/ — layout, buttons, forms, feedback, navigation, data-display, content-media, utility - guidelines/composition/ — base shell, 9 screen patterns - guidelines/foundations/ — writing, icons, accessibility - examples/ — 6 TSX reference implementations (list, detail, settings, confirmation, form, error) SKILL.md now routes two audiences: - Path A (designers): composition-first, visual-language focused - Path B (developers): setup-first, prop-precision focused Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
size-limit report 📦
|
| alignItems="center" | ||
| justifyContent="center" | ||
| padding="spacing2Xl" | ||
| style={{ minHeight: '400px' }} |
There was a problem hiding this comment.
we should avoid this type of inline styles and write emotion style classes instead
|
|
||
| | Variant | Color | Use | Limit | | ||
| |---|---|---|---| | ||
| | `primary` | Blue | The single most important action | **One per screen section** | |
There was a problem hiding this comment.
should we assoicate them with the color token? or is the general "blue" description better?
| **Writing rules:** | ||
| - Always start with a verb: "Add field", "Delete entry", "Publish" | ||
| - Max 3 words | ||
| - Sentence case | ||
| - Cancel for destructive actions: **"Never mind"** — not "Cancel" |
There was a problem hiding this comment.
In forma36 texts should not be part of any of the component and all content and copy should come from outside and be translateable. So I think we should not have it in this skill
|
|
||
| ## TextLink | ||
|
|
||
| For navigation and low-priority actions. Never use Button for navigation. |
There was a problem hiding this comment.
Never use Button for navigation could be misleading as we can render the Button as an a tag which would allow to use the Button for navigation.
This is also in contradiction of how we describe the Button earlier in the document.
Sometimes interactive Buttons e.g. "Edit" action has to be a link, because it leads the user to the edit-route
|
|
||
| | Prop | Type | Notes | | ||
| |---|---|---| | ||
| | `as` | `'a'` (default) or `'button'` | `a` = navigation, `button` = action | |
There was a problem hiding this comment.
the note should be formatted less like a variable assignment.
| | `as` | `'a'` (default) or `'button'` | `a` = navigation, `button` = action | | |
| | `as` | `'a'` (default) or `'button'` | `a` should be used for navigation between routes, `button` reserved only for interaction | |
| <Badge variant="positive">Published</Badge> | ||
| <Badge variant="warning">Draft</Badge> |
There was a problem hiding this comment.
We should not use examples that are meant to be an EntityBadge component
| |---|---| | ||
| | `primary` | Default | | ||
| | `primary-filled` | Emphasized default | | ||
| | `positive` | Published, active | |
There was a problem hiding this comment.
we should not use the published association as this is meant for the EntityBadge
Source validation against forma-36 repo: - Fix 38 wrong icon names (Phosphor naming convention) - Fix 3 shadow token names and 1 color value - Restore Skeleton.Row component PR review comment fixes: - Use Emotion css prop instead of inline styles - Add missing component props (Table, Card, Accordion, Skeleton, Pagination, List) - Fix Button docs (token names, writing rules, isActive, navigation) - Rename confirmation-dialog to confirmation-modal - Fix Badge examples to not use entity status labels - Add code-connect.md guide Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds screenshot comparison post-flight for Figma-to-code (Path C): capture source Figma design, render generated code, compare both, fix differences until converging. Eval showed V3 Path C missed sidebar, top nav, filter chips, and avatar columns because the design context alone doesn't describe page-level composition. Also syncs eval-driven fixes from product-design PR #7: corrected icon names (TrashIcon not TrashSimpleIcon), removed fabricated Skeleton.Row, fixed shadow token names. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Restructure base-shell.md to be design-first: the source Figma frame is the authority, and each structural element (navbar, sidebar, content area) is conditional on whether the design includes it. Key changes: - Every section gated with "when the design includes..." - Mandate <Navbar> from @contentful/f36-navbar (never hand-build) - Document box-sizing: border-box requirement (fixes 60→92px navbar) - Enforce size="small" (32px) for all buttons - Expanded common mistakes table with new anti-patterns Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Paths D (Code → Figma) and E (Edit existing Figma design) output Figma Plugin API JavaScript, not React with Forma 36 components. They don't belong in a design system skill — removed to keep the scope focused on the three React-based workflows (A/B/C). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ections, token compliance Syncs all skill improvements from V5 through V9: - Remove nonexistent `dist/styles.css` import (f36 v6 uses Emotion) - Standardize all examples to `style` prop over Emotion `css` prop - Add `size="small"` to every Button/IconButton (32px standard, never 40px) - Fix 38 wrong icon names to Phosphor convention - Fix shadow token names, add HouseIcon, correct CloseCircleIcon → WarningOctagonIcon - Replace hardcoded padding with f36 tokens, add token compliance exceptions - Add app-shell.tsx example with Navbar, sidebar, and content area - Rename confirmation-dialog → confirmation-modal Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Restructures the Forma 36 skill from a monolithic format into a granular guidelines directory, adds 7 TSX reference implementations, and incorporates eval-driven improvements from V1–V9 iterations (average skill delta: +0.6 → +4.6).
Structure
What changed from the initial skill files
SKILL.md+tokens.md+screen-patterns.mdwith ~30 focused files organized by topicdist/styles.cssimport, standardizedstyleprop, enforcedButton size="small"(32px), fixed icon names, replaced hardcoded values with f36 tokensKey rules enforced
@contentful/f36-tokens— no hardcoded hex, px, or font stacksicons.md, never invent namesButton size="small"always — 32px standard, never medium (40px)LayoutnotWorkbench— Workbench is deprecatedTest plan
icons.mdmatch@contentful/f36-iconsexports🤖 Generated with Claude Code