Overview
The Definition of Done (DoD) ensures consistent quality across all components in the Conty Design System. Every component must meet these criteria before being merged.These criteria apply to all components, whether new or updated. Treat this as a checklist for your PRs.
Minimum Criteria
For a component to be considered ready for production, it must satisfy all of the following:1. Basic Render Story
Smoke Test Story
Smoke Test Story
Every component must have at least one story that renders the basic, default state.Example:This ensures the component can render without errors in its simplest form.
2. State Variations
Relevant States
Relevant States
Components must include stories for all relevant states:Not all states apply to all components - use judgment to determine which states are relevant.
- Disabled: When the component cannot be interacted with
- Loading: When the component is processing an action
- Error: When the component is in an error state
- Empty: When the component has no data (for data components)
- Filled: When the component has data
3. Play Test for Interactions
Interaction Testing
Interaction Testing
When a component has interactive behavior (clicks, focus, hover, etc.), it must include at least one play test.Example:Play tests ensure critical interactions work as expected.
Play tests run in real browsers using
@storybook/addon-vitest and Playwright. They validate component behavior beyond simple rendering.4. Accessibility Checks
No Critical A11y Violations
No Critical A11y Violations
Components must pass automated accessibility checks without critical violations.The Storybook accessibility addon automatically runs on all stories. Common checks include:
- Proper ARIA attributes
- Color contrast ratios
- Keyboard navigation
- Screen reader support
- Focus management
- Open your story in Storybook
- Check the Accessibility tab
- Resolve any violations marked as “Serious” or “Critical”
5. Visual Review
Visual Regression Coverage
Visual Regression Coverage
Components must be covered by visual review in the PR process.This ensures:
- Visual consistency across browsers
- No unintended styling changes
- Proper rendering of all states
6. Token Usage (No Hardcoding)
Use Design Tokens
Use Design Tokens
All visual values must come from design tokens - no hardcoded values.Incorrect:Correct:This ensures:
- Cross-platform consistency (Web and Flutter)
- Theme support (light/dark modes)
- Easy maintenance and updates
Before adding a new token, check if an existing semantic token serves your purpose. Only create new tokens when absolutely necessary.
7. Documentation
Usage and Limitations
Usage and Limitations
Components must include documentation covering:
- Purpose: What the component does
- Usage: How to use it (with code examples)
- Props: Description of all props and their purpose
- Limitations: Known constraints or edge cases
- Accessibility: Any special accessibility considerations
- Story descriptions
- MDX documentation pages
- JSDoc comments on component props
Checklist Summary
Use this checklist when submitting a component PR:- Basic render story exists (smoke test)
- Stories for all relevant states (disabled, loading, error, etc.)
- At least one play test for interactive behavior (if applicable)
- No critical accessibility violations
- Visual regression review passed
- All visual values use design tokens (no hardcoding)
- Documentation covers usage and limitations
Beyond the Minimum
While the above criteria are the minimum, consider these enhancements:- Multiple play tests for complex interactions
- Responsive behavior stories for different viewport sizes
- RTL support for internationalization
- Performance considerations for data-heavy components
- Edge cases that might occur in production
Quality Gates
Automated CI checks will enforce:npm run lint- Code style and best practicesnpm run typecheck- TypeScript type safetynpm run build- All packages build successfully- Storybook tests - Component tests run in browser
- Accessibility checks - No critical violations
- Visual regression - No unintended visual changes
CI must pass before a PR can be merged. Fix any failing checks before requesting review.
Token Naming Guidelines
When creating or using tokens:- Use semantic names:
brand.primary,text.muted,surface.default - Avoid implementation-coupled names:
purple500,buttonBlue - Maintain cross-platform consistency (TypeScript and Dart)
- Document token purpose and examples
- Prefer deprecation over renaming existing tokens
Cross-Platform Flow
When creating a component:Examples
Review existing components in Storybook for real-world examples of components that meet the DoD criteria. Look for:- Button component - Simple interaction patterns
- Input component - Form states and validation
- Dialog component - Complex interactions and accessibility
- Card component - Layout and composition patterns