# Contributing Guide

Thank you for your interest in contributing to the FIDH RT4Freedom campaign archive! This is a static archive website, and contributions are welcome to maintain and improve the site.

## Code of Conduct

By contributing to this project, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md).

## Types of Contributions

### Accepted Contributions

1. **Bug Fixes** - Fixing broken links, HTML/CSS/JS issues, accessibility improvements
2. **Security Fixes** - Responsible disclosure via [SECURITY.md](SECURITY.md)
3. **Documentation Improvements** - Updating README, adding missing information
4. **Translations** - Adding or correcting translations
5. **Design Improvements** - UI/UX enhancements (discuss first)

### Contributions NOT Accepted

- Content modifications without approval (this is an official FIDH campaign archive)
- Changes to the campaign messaging or political positions
- Major architectural changes without discussion
- Adding tracking codes or analytics without approval

## How to Contribute

### Reporting Bugs

Before reporting a bug, please verify:
1. The bug has not already been reported (check existing issues)
2. You are using the latest version of the code
3. The bug is reproducible

**A good bug report includes:**
- Clear and descriptive title
- Detailed steps to reproduce the problem
- Expected vs. actual behavior
- Environment (browser, OS)
- Screenshots or videos if relevant

### Suggesting Enhancements

Enhancement suggestions are welcome! Open an issue with:
- Clear description of the enhancement
- The benefit for the project
- Examples or mockups if available

### Contributing Code

1. **Fork the Repository**
   Create your own fork of this repository.

2. **Create a Feature Branch**
   ```bash
   git checkout -b fix/description-of-fix
   git checkout -b feat/description-of-feature
   git checkout -b docs/description-of-docs
   ```

3. **Make Your Changes**
   - Follow existing code style and conventions
   - Keep changes minimal and focused
   - Test locally before committing

4. **Commit Your Changes**
   Use clear, descriptive commit messages following the [Conventional Commits](https://www.conventionalcommits.org/) standard:
   - `feat:` - New feature
   - `fix:` - Bug fix
   - `docs:` - Documentation changes
   - `refactor:` - Code refactoring
   - `chore:` - Maintenance tasks
   - `style:` - Formatting changes
   - `test:` - Adding tests

   Example:
   ```bash
   git commit -m "fix: description of the bug fix"
   git commit -m "feat: description of the new feature"
   ```

5. **Push to Your Fork**
   ```bash
   git push origin fix/description-of-fix
   ```

6. **Open a Pull Request**
   - Describe what you changed and why
   - Reference any related issues
   - Be clear about the problem being solved
   - Include screenshots if UI changes are made

## Testing

Before submitting your contributions:
1. Test your code in different browsers (Chrome, Firefox, Safari, Edge)
2. Test on mobile and desktop
3. Ensure no automated tests are broken (if applicable)

## Pull Request Guidelines

- **One feature per PR**: Keep PRs focused on a single issue
- **Clean history**: Rebase or squash commits to maintain clean history
- **Descriptive title**: Clearly state what the PR does (use prefix: fix/, feat/, docs/, refactor/, chore/)
- **Detailed description**: Explain the "what" and "why"
- **Review**: All PRs require review before merging

## Development Standards

### HTML
- Valid HTML5
- Semantic markup
- Accessible (ARIA labels, alt text, etc.)
- Responsive design

### CSS
- Use semantic class names
- Mobile-first approach
- Avoid !important
- Keep specificity low

### JavaScript
- Use modern ES6+ syntax
- Minimize DOM manipulations
- Use event delegation for dynamic elements
- Avoid global variables

## Review Process

1. Any Pull Request will be reviewed by at least one maintainer
2. We may request modifications before approval
3. Once approved, the PR will be merged into the main branch
4. Significant contributions will be acknowledged

## Community

For questions or discussions, contact: it@fidh.org

## Recognition

All significant contributors will be acknowledged in the project's contribution history.

## License

By contributing, you agree that your contributions will be licensed under the same terms as the project itself.
