Contributing to LawnGuru Design System
Help us build and maintain a world-class design system.
🙌 Welcome Contributors!
We're thrilled you want to contribute to the LawnGuru Design System! Whether you're fixing a bug, adding a component, or improving documentation, your contributions make LawnGuru better for everyone.
🎯 Ways to Contribute
1. Report Issues
Found a bug or inconsistency?
- Check if it's already reported
- Open a GitHub issue
- Include screenshots and details
- Tag appropriately (bug, enhancement, documentation)
2. Suggest Improvements
Have an idea for a new component or improvement?
- Open a discussion first
- Explain the problem it solves
- Share examples or mockups
- Get feedback from the team
3. Fix Bugs
Help squash bugs!
- Look for "good first issue" labels
- Comment that you're working on it
- Submit a PR with the fix
- Include tests
4. Add Components
Want to add a new component?
- Discuss the need first
- Follow component guidelines
- Include documentation
- Add usage examples
5. Improve Documentation
Documentation is always welcome!
- Fix typos and errors
- Add missing examples
- Clarify confusing sections
- Add screenshots or diagrams
🔄 Contribution Workflow
1. Set Up Your Environment
bash
# Clone the repository
git clone [repository-url]
# Install dependencies
npm install
# Start development server
npm run dev2. Create a Branch
bash
# Create a feature branch
git checkout -b feature/your-feature-name
# Or for bug fixes
git checkout -b fix/bug-descriptionBranch naming:
feature/- New features or componentsfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Test improvements
3. Make Your Changes
Follow our coding standards and guidelines:
- Match existing code style
- Add comments for complex logic
- Update documentation
- Add tests for new features
4. Test Your Changes
bash
# Run tests
npm test
# Run linting
npm run lint
# Check accessibility
npm run test:a11y
# Test in multiple browsers5. Commit Your Changes
Follow Conventional Commits:
bash
# Format: type(scope): description
# Examples:
git commit -m "feat(button): add loading state"
git commit -m "fix(modal): resolve focus trap issue"
git commit -m "docs(colors): add usage examples"
git commit -m "refactor(forms): simplify validation logic"Commit types:
feat: New featurefix: Bug fixdocs: Documentationstyle: Formatting (no code change)refactor: Code refactoringtest: Adding testschore: Maintenance
6. Push and Create Pull Request
bash
# Push your branch
git push origin your-branch-name
# Open GitHub and create a Pull RequestPR Guidelines:
- Use descriptive title
- Reference related issues
- Describe what and why
- Include screenshots/videos for UI changes
- Request reviews from relevant team members
📋 Component Contribution Guidelines
New Component Checklist
When adding a new component, ensure:
Design
- [ ] Figma component created
- [ ] Multiple variants/states designed
- [ ] Responsive behavior defined
- [ ] Accessibility considered
- [ ] Design review approved
Code
- [ ] Component implemented
- [ ] Props properly typed (TypeScript)
- [ ] Responsive behavior implemented
- [ ] All variants included
- [ ] Code follows style guide
Documentation
- [ ] Component documented
- [ ] Usage examples included
- [ ] Props documented
- [ ] Accessibility notes added
- [ ] Visual examples included
Testing
- [ ] Unit tests written
- [ ] Accessibility tests pass
- [ ] Visual regression tests pass
- [ ] Tested in multiple browsers
- [ ] Mobile tested
Integration
- [ ] Component exported
- [ ] Storybook story created
- [ ] Design tokens used
- [ ] No breaking changes
- [ ] Changelog updated
🎨 Design Contribution Guidelines
Designing New Components
Start with research
- Review existing patterns
- Check other design systems
- Understand user needs
- Document use cases
Design in Figma
- Use existing design tokens
- Create all necessary variants
- Consider all states (hover, focus, disabled, etc.)
- Ensure responsive behavior
Document specifications
- Spacing and sizing
- Color usage
- Typography
- Interaction states
Get feedback
- Share in design review
- Get accessibility review
- Test with developers
- Iterate based on feedback
Update Figma library
- Add to design library
- Publish changes
- Update documentation
- Notify team
💻 Code Standards
React Components
tsx
import React from 'react';
import { cn } from '@/lib/utils';
export interface ButtonProps {
/**
* Button variant
* @default 'primary'
*/
variant?: 'primary' | 'secondary' | 'destructive';
/**
* Button size
* @default 'md'
*/
size?: 'sm' | 'md' | 'lg';
/**
* Button content
*/
children: React.ReactNode;
/**
* Additional CSS classes
*/
className?: string;
}
/**
* Button component for user actions
*
* @example
* <Button variant="primary" size="md">
* Click me
* </Button>
*/
export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ variant = 'primary', size = 'md', children, className, ...props }, ref) => {
return (
<button
ref={ref}
className={cn(
'button',
`button--${variant}`,
`button--${size}`,
className
)}
{...props}
>
{children}
</button>
);
}
);
Button.displayName = 'Button';CSS/Styling
css
/* Use CSS variables for values */
.button {
padding: var(--button-padding-y) var(--button-padding-x);
border-radius: var(--border-radius-md);
font-weight: var(--font-weight-semibold);
transition: all var(--duration-fast) var(--ease-out);
}
/* Follow BEM naming if using CSS modules */
.button__icon {
margin-right: var(--space-2);
}
.button--primary {
background: var(--color-primary);
color: var(--color-white);
}📝 Documentation Standards
Component Documentation Template
markdown
# Component Name
> Brief description of the component
## Overview
Detailed description of what the component does and when to use it.
## Variants
List and describe all variants.
## Usage
Code examples showing how to use the component.
## Props/API
Document all props, parameters, or options.
## Accessibility
Accessibility requirements and considerations.
## Examples
Real-world usage examples.✅ Review Process
What Reviewers Look For
Code Reviews:
- Follows coding standards
- Properly tested
- No breaking changes
- Performance considerations
- Accessibility compliance
Design Reviews:
- Consistent with design system
- Responsive behavior
- Accessibility
- All states covered
- Design tokens used
Getting Your PR Merged
- Pass all checks - Tests, linting, accessibility
- Get approvals - At least 1 code review, 1 design review
- Address feedback - Respond to all comments
- Update documentation - Keep docs in sync
- Squash commits - Clean commit history (if requested)
🚫 What Not to Do
❌ Make breaking changes without discussion ❌ Add dependencies without approval ❌ Skip tests or documentation ❌ Ignore accessibility requirements ❌ Copy code without attribution ❌ Submit WIP without [WIP] tag ❌ Make multiple unrelated changes in one PR
💬 Communication
Where to Ask Questions
- GitHub Discussions - General questions, ideas
- GitHub Issues - Bug reports, feature requests
- Slack #design-system - Quick questions, chat
- Email - Private concerns
Response Times
- Issues acknowledged: Within 2 business days
- PR reviews: Within 3 business days
- Questions answered: Within 1 business day
🏆 Recognition
We appreciate all contributions! Contributors are:
- Listed in release notes
- Credited in documentation
- Invited to contributor meetings
- Eligible for swag (coming soon!)
📚 Resources
📞 Need Help?
Stuck or have questions?
- Check existing documentation
- Search GitHub issues
- Ask in discussions
- Reach out to maintainers
We're here to help! 🌱
Thank you for contributing to LawnGuru!