|
| 1 | +# Contributing to DWUI |
| 2 | + |
| 3 | +First off, thank you for considering contributing to DWUI! It's people like you that make DWUI such a great tool. |
| 4 | + |
| 5 | +## 🌟 Ways to Contribute |
| 6 | + |
| 7 | +- 🐛 Report bugs |
| 8 | +- 💡 Suggest new features |
| 9 | +- 📝 Improve documentation |
| 10 | +- 🎨 Contribute code |
| 11 | +- 🧪 Write tests |
| 12 | + |
| 13 | +## 🚀 Getting Started |
| 14 | + |
| 15 | +### 1. Fork & Clone |
| 16 | + |
| 17 | +```bash |
| 18 | +# Fork the repo on GitHub, then clone your fork |
| 19 | +git clone https://github.com/YOUR-USERNAME/dwui-new-tab.git |
| 20 | +cd dwui-new-tab |
| 21 | + |
| 22 | +# Add the original repo as upstream |
| 23 | +git remote add upstream https://github.com/mohammadumar-dev/dwui-new-tab.git |
| 24 | +``` |
| 25 | + |
| 26 | +### 2. Set Up Development Environment |
| 27 | + |
| 28 | +```bash |
| 29 | +# Install dependencies |
| 30 | +npm install |
| 31 | + |
| 32 | +# Start development server |
| 33 | +npm run dev |
| 34 | +``` |
| 35 | + |
| 36 | +### 3. Create a Branch |
| 37 | + |
| 38 | +```bash |
| 39 | +# Create a new branch for your feature |
| 40 | +git checkout -b feature/your-feature-name |
| 41 | +``` |
| 42 | + |
| 43 | +## 📋 Development Guidelines |
| 44 | + |
| 45 | +### Code Style |
| 46 | + |
| 47 | +- Use **TypeScript** for all new files |
| 48 | +- Follow existing code formatting |
| 49 | +- Use meaningful variable and function names |
| 50 | +- Add comments for complex logic |
| 51 | + |
| 52 | +### Component Guidelines |
| 53 | + |
| 54 | +```tsx |
| 55 | +// ✅ Good: Descriptive component with props interface |
| 56 | +interface ButtonProps { |
| 57 | + label: string; |
| 58 | + onClick: () => void; |
| 59 | +} |
| 60 | + |
| 61 | +export function CustomButton({ label, onClick }: ButtonProps) { |
| 62 | + return <button onClick={onClick}>{label}</button>; |
| 63 | +} |
| 64 | + |
| 65 | +// ❌ Avoid: Unclear naming and no types |
| 66 | +export function Btn(props: any) { |
| 67 | + return <button onClick={props.fn}>{props.txt}</button>; |
| 68 | +} |
| 69 | +``` |
| 70 | + |
| 71 | +### Commit Messages |
| 72 | + |
| 73 | +Use clear, descriptive commit messages: |
| 74 | + |
| 75 | +```bash |
| 76 | +# Good |
| 77 | +git commit -m "Add dark mode toggle to sidebar" |
| 78 | +git commit -m "Fix search bar focus issue on mobile" |
| 79 | +git commit -m "Update Aurora animation performance" |
| 80 | + |
| 81 | +# Avoid |
| 82 | +git commit -m "fixed stuff" |
| 83 | +git commit -m "updates" |
| 84 | +``` |
| 85 | + |
| 86 | +## 🧪 Testing Your Changes |
| 87 | + |
| 88 | +1. **Build the extension** |
| 89 | + ```bash |
| 90 | + npm run build |
| 91 | + ``` |
| 92 | + |
| 93 | +2. **Test in Chrome** |
| 94 | + - Go to `chrome://extensions/` |
| 95 | + - Enable Developer mode |
| 96 | + - Click "Load unpacked" |
| 97 | + - Select the `dist` folder |
| 98 | + - Test all features thoroughly |
| 99 | + |
| 100 | +3. **Check for errors** |
| 101 | + - Open DevTools (F12) |
| 102 | + - Check Console for errors |
| 103 | + - Test on different screen sizes |
| 104 | + |
| 105 | +## 📤 Submitting Changes |
| 106 | + |
| 107 | +### Before Submitting |
| 108 | + |
| 109 | +- [ ] Code follows the project's style |
| 110 | +- [ ] Changes have been tested in Chrome |
| 111 | +- [ ] No console errors |
| 112 | +- [ ] README updated (if needed) |
| 113 | +- [ ] Comments added for complex code |
| 114 | + |
| 115 | +### Creating a Pull Request |
| 116 | + |
| 117 | +1. **Push your changes** |
| 118 | + ```bash |
| 119 | + git push origin feature/your-feature-name |
| 120 | + ``` |
| 121 | + |
| 122 | +2. **Open a Pull Request** |
| 123 | + - Go to your fork on GitHub |
| 124 | + - Click "Pull Request" |
| 125 | + - Select your branch |
| 126 | + - Fill in the PR template |
| 127 | + |
| 128 | +3. **PR Description should include:** |
| 129 | + - What changes were made |
| 130 | + - Why these changes are needed |
| 131 | + - Screenshots (for UI changes) |
| 132 | + - Any breaking changes |
| 133 | + |
| 134 | +### PR Template |
| 135 | + |
| 136 | +```markdown |
| 137 | +## Description |
| 138 | +Brief description of what this PR does |
| 139 | + |
| 140 | +## Type of Change |
| 141 | +- [ ] Bug fix |
| 142 | +- [ ] New feature |
| 143 | +- [ ] Documentation update |
| 144 | +- [ ] Performance improvement |
| 145 | + |
| 146 | +## Screenshots (if applicable) |
| 147 | +[Add screenshots here] |
| 148 | + |
| 149 | +## Checklist |
| 150 | +- [ ] My code follows the style guidelines |
| 151 | +- [ ] I have tested my changes |
| 152 | +- [ ] I have added necessary comments |
| 153 | +- [ ] My changes generate no new warnings |
| 154 | +``` |
| 155 | + |
| 156 | +## 🐛 Reporting Bugs |
| 157 | + |
| 158 | +### Before Reporting |
| 159 | + |
| 160 | +- Check if the bug has already been reported |
| 161 | +- Make sure you're using the latest version |
| 162 | +- Try to reproduce the bug consistently |
| 163 | + |
| 164 | +### Bug Report Template |
| 165 | + |
| 166 | +```markdown |
| 167 | +**Describe the bug** |
| 168 | +A clear description of what the bug is |
| 169 | + |
| 170 | +**To Reproduce** |
| 171 | +Steps to reproduce: |
| 172 | +1. Go to '...' |
| 173 | +2. Click on '...' |
| 174 | +3. See error |
| 175 | + |
| 176 | +**Expected behavior** |
| 177 | +What you expected to happen |
| 178 | + |
| 179 | +**Screenshots** |
| 180 | +If applicable, add screenshots |
| 181 | + |
| 182 | +**Environment:** |
| 183 | +- Chrome Version: [e.g. 120.0.6099.109] |
| 184 | +- OS: [e.g. Windows 11, macOS 14] |
| 185 | +- Extension Version: [e.g. 1.0.0] |
| 186 | +``` |
| 187 | + |
| 188 | +## 💡 Suggesting Features |
| 189 | + |
| 190 | +We love feature suggestions! Please provide: |
| 191 | + |
| 192 | +1. **Clear description** of the feature |
| 193 | +2. **Use case** - why is it needed? |
| 194 | +3. **Mockups or examples** (if possible) |
| 195 | +4. **Technical considerations** (if you have ideas) |
| 196 | + |
| 197 | +## 📜 Code of Conduct |
| 198 | + |
| 199 | +### Our Standards |
| 200 | + |
| 201 | +- Be respectful and inclusive |
| 202 | +- Accept constructive criticism gracefully |
| 203 | +- Focus on what's best for the community |
| 204 | +- Show empathy towards others |
| 205 | + |
| 206 | +### Unacceptable Behavior |
| 207 | + |
| 208 | +- Harassment or discriminatory language |
| 209 | +- Trolling or insulting comments |
| 210 | +- Publishing others' private information |
| 211 | +- Unprofessional conduct |
| 212 | + |
| 213 | +## ❓ Questions? |
| 214 | + |
| 215 | +- Open a [GitHub Issue](https://github.com/mohammadumar-dev/dwui-new-tab/issues) |
| 216 | +- Join discussions in existing issues |
| 217 | +- Check existing documentation |
| 218 | + |
| 219 | +## 🙏 Thank You! |
| 220 | + |
| 221 | +Your contributions make DWUI better for everyone. We appreciate your time and effort! |
| 222 | + |
| 223 | +--- |
| 224 | + |
| 225 | +Happy Coding! 🚀 |
0 commit comments