First off, thank you for considering contributing to macwidget-studio! It's people like you that make this project better for everyone.
- Code of Conduct
- How Can I Contribute?
- Getting Started
- Development Workflow
- Coding Guidelines
- Commit Message Guidelines
- Pull Request Process
- Community
This project and everyone participating in it is governed by our commitment to creating a welcoming and inclusive environment. By participating, you are expected to:
- β Be respectful and inclusive
- β Welcome newcomers and help them get started
- β Accept constructive criticism gracefully
- β Focus on what is best for the community
- β Don't use inappropriate language or imagery
- β Don't engage in trolling or harassment
Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:
- Clear title: Brief description of the issue
- Steps to reproduce: Detailed steps to recreate the bug
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Screenshots: If applicable
- Environment:
- macOS version
- Node.js version
- npm version
- Browser (if applicable)
Bug Report Template:
**Bug Description**
A clear description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '...'
3. See error
**Expected Behavior**
What you expected to happen.
**Screenshots**
If applicable, add screenshots.
**Environment:**
- macOS: [e.g. 13.0]
- Node: [e.g. 18.0.0]
- npm: [e.g. 8.0.0]We love new ideas! When suggesting features:
- Check existing suggestions first
- Explain the problem your feature would solve
- Describe the solution you'd like to see
- Consider alternatives you've thought about
- Add mockups/examples if possible
Documentation improvements are always welcome:
- Fix typos or clarify instructions
- Add examples or tutorials
- Improve code comments
- Translate documentation
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR-USERNAME/macwidget-studio.git
cd macwidget-studio
git checkout dev# Install dependencies
npm install
# Start development server
npm run dev# Create a descriptive branch name
git checkout -b feature/amazing-new-widget
# or
git checkout -b fix/button-alignment-issueBranch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Adding testschore/- Maintenance tasks
- Make your changes in your feature branch
- Test thoroughly - ensure nothing breaks
- Run linting -
npm run lint - Build the project -
npm run buildto ensure it compiles - Test the build -
npm run previewto test production build
Before submitting:
- Code follows the project's TypeScript style
- All TypeScript types are properly defined
- No console.log statements left in code
- Code is properly formatted
- No ESLint errors or warnings
- Changes work in development mode (
npm run dev) - Changes work in production build (
npm run build && npm run preview)
// β
DO: Use proper types
interface WidgetProps {
title: string;
isVisible: boolean;
onClose: () => void;
}
const Widget: React.FC<WidgetProps> = ({ title, isVisible, onClose }) => {
// component code
};
// β DON'T: Use 'any' type
const Widget = (props: any) => {
// component code
};// β
DO: Organize components clearly
import { useState, useEffect } from 'react';
import { Button } from '@/components/ui/button';
interface MyComponentProps {
initialValue: number;
}
export const MyComponent: React.FC<MyComponentProps> = ({ initialValue }) => {
// 1. Hooks
const [count, setCount] = useState(initialValue);
// 2. Effects
useEffect(() => {
// side effects
}, []);
// 3. Handlers
const handleClick = () => {
setCount(count + 1);
};
// 4. Render
return (
<div>
<p>Count: {count}</p>
<Button onClick={handleClick}>Increment</Button>
</div>
);
};// β
DO: Use Tailwind utility classes
<div className="flex items-center gap-4 p-4 rounded-lg bg-gray-100">
<h1 className="text-2xl font-bold">Title</h1>
</div>
// β DON'T: Use inline styles
<div style={{ display: 'flex', padding: '16px' }}>
<h1 style={{ fontSize: '24px' }}>Title</h1>
</div>- Components:
PascalCase.tsx(e.g.,WidgetCard.tsx) - Utilities:
camelCase.ts(e.g.,formatDate.ts) - Types:
PascalCase.ts(e.g.,WidgetTypes.ts) - Hooks:
use+PascalCase.ts(e.g.,useWidgetData.ts)
We follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, semicolons, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
# Feature
git commit -m "feat(widgets): add weather widget component"
# Bug fix
git commit -m "fix(layout): correct responsive breakpoint for mobile"
# Documentation
git commit -m "docs(readme): update installation instructions"
# Refactoring
git commit -m "refactor(utils): simplify date formatting function"# β
Good
feat(widgets): add customizable color picker
fix(ui): resolve button alignment on Safari
docs(contributing): add code review guidelines
# β Bad
update stuff
fix bug
changes-
Update your branch with the latest dev branch:
git checkout dev git pull origin dev git checkout your-feature-branch git rebase dev
-
Ensure all checks pass:
- Code builds successfully
- No linting errors
- All tests pass (if applicable)
- Documentation is updated
- Push your branch:
git push origin feature/your-feature-name - Open a Pull Request on GitHub
- Fill out the PR template completely
- Link related issues using keywords (e.g., "Closes #123")
<type>: <description>
# Examples:
feat: Add weather widget with live updates
fix: Correct widget positioning on multi-monitor setup
docs: Improve installation guide with screenshots
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
## Testing
Describe how you tested these changes
## Screenshots (if applicable)
Add screenshots here
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-reviewed the code
- [ ] Commented complex code sections
- [ ] Updated documentation
- [ ] No new warnings introduced
- [ ] Tested on macOS- Automated checks will run automatically
- Maintainer review - we'll review within 2-3 days
- Address feedback - make requested changes
- Approval - once approved, we'll merge!
- GitHub Discussions: Ask questions and share ideas
- Issues: Report bugs or request features
- Pull Requests: Share your code contributions
Contributors will be:
- Listed in our README
- Mentioned in release notes
- Added to the contributors graph
New to the tech stack? Here are some helpful resources:
- React: Official React Docs
- TypeScript: TypeScript Handbook
- Tailwind CSS: Tailwind Documentation
- Vite: Vite Guide
Don't hesitate to ask questions! You can:
- Open a discussion on GitHub
- Comment on relevant issues
- Reach out to maintainers
Your contributions make macwidget-studio better for everyone. We appreciate your time and effort!