diff --git a/.gitignore b/.github/.gitignore similarity index 100% rename from .gitignore rename to .github/.gitignore diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..e17f4b1 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +finnwhiskey@gmail.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7be2bd4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,391 @@ +# Contributing to macwidget-studio 🎨 + +First off, thank you for considering contributing to macwidget-studio! It's people like you that make this project better for everyone. + +![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square) +![Contributors](https://img.shields.io/github/contributors/SYOP200/macwidget-studio?style=flat-square) + +## 📋 Table of Contents + +- [Code of Conduct](#code-of-conduct) +- [How Can I Contribute?](#how-can-i-contribute) +- [Getting Started](#getting-started) +- [Development Workflow](#development-workflow) +- [Coding Guidelines](#coding-guidelines) +- [Commit Message Guidelines](#commit-message-guidelines) +- [Pull Request Process](#pull-request-process) +- [Community](#community) + +## 📜 Code of Conduct + +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 + +## 🤝 How Can I Contribute? + +### Reporting Bugs 🐛 + +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:** +```markdown +**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] +``` + +### Suggesting Features 💡 + +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 + +### Improving Documentation 📚 + +Documentation improvements are always welcome: + +- Fix typos or clarify instructions +- Add examples or tutorials +- Improve code comments +- Translate documentation + +## 🚀 Getting Started + +### 1. Fork and Clone + +```bash +# Fork the repository on GitHub, then: +git clone https://github.com/YOUR-USERNAME/macwidget-studio.git +cd macwidget-studio +git checkout dev +``` + +### 2. Set Up Development Environment + +```bash +# Install dependencies +npm install + +# Start development server +npm run dev +``` + +### 3. Create a Branch + +```bash +# Create a descriptive branch name +git checkout -b feature/amazing-new-widget +# or +git checkout -b fix/button-alignment-issue +``` + +Branch naming conventions: +- `feature/` - New features +- `fix/` - Bug fixes +- `docs/` - Documentation changes +- `refactor/` - Code refactoring +- `test/` - Adding tests +- `chore/` - Maintenance tasks + +## 🔄 Development Workflow + +### Local Development + +1. **Make your changes** in your feature branch +2. **Test thoroughly** - ensure nothing breaks +3. **Run linting** - `npm run lint` +4. **Build the project** - `npm run build` to ensure it compiles +5. **Test the build** - `npm run preview` to test production build + +### Code Quality Checklist + +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`) + +## 📝 Coding Guidelines + +### TypeScript Best Practices + +```typescript +// ✅ DO: Use proper types +interface WidgetProps { + title: string; + isVisible: boolean; + onClose: () => void; +} + +const Widget: React.FC = ({ title, isVisible, onClose }) => { + // component code +}; + +// ❌ DON'T: Use 'any' type +const Widget = (props: any) => { + // component code +}; +``` + +### React Component Structure + +```typescript +// ✅ DO: Organize components clearly +import { useState, useEffect } from 'react'; +import { Button } from '@/components/ui/button'; + +interface MyComponentProps { + initialValue: number; +} + +export const MyComponent: React.FC = ({ initialValue }) => { + // 1. Hooks + const [count, setCount] = useState(initialValue); + + // 2. Effects + useEffect(() => { + // side effects + }, []); + + // 3. Handlers + const handleClick = () => { + setCount(count + 1); + }; + + // 4. Render + return ( +
+

Count: {count}

+ +
+ ); +}; +``` + +### Styling with Tailwind + +```typescript +// ✅ DO: Use Tailwind utility classes +
+

Title

+
+ +// ❌ DON'T: Use inline styles +
+

Title

+
+``` + +### File Naming Conventions + +- **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`) + +## 💬 Commit Message Guidelines + +We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification: + +### Format + +``` +(): + + + +