4.3 KiB
Contributing to SwiftUIMath
Thank you for your interest in contributing to SwiftUIMath! We welcome contributions from the community and are grateful for any help you can provide.
Code of Conduct
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
How to Contribute
Reporting Bugs
Before submitting a bug report:
- Check the existing issues to avoid duplicates
- Verify you're using the latest version of SwiftUIMath
When creating a bug report, include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected behavior vs. actual behavior
- Code samples or minimal reproduction cases
- Screenshots or videos if applicable
- Your environment (Xcode version, OS version, device/simulator)
Suggesting Enhancements
We welcome feature requests and enhancement suggestions! Before submitting:
- Check existing issues for similar suggestions
- Consider if the feature aligns with SwiftUIMath's core goals
When proposing an enhancement:
- Provide a clear and descriptive title
- Explain the problem you're trying to solve
- Describe your proposed solution
- Include code examples or mockups if applicable
- Discuss any alternative solutions you've considered
Pull Requests
- Fork the repository and create your branch from
main - Set up your development environment:
- Open
Package.swiftat the repository root
- Open
- Make your changes:
- Write clear, self-documenting code
- Add tests for new functionality
- Update documentation as needed
- Test your changes:
- Run the test suite and verify all tests pass
- Test on multiple platforms (iOS, macOS, visionOS) if applicable
- Commit your changes with a descriptive commit message (see style guide below)
- Push to your fork and submit a pull request to the
mainbranch
Development Setup
-
Clone the repository:
git clone https://github.com/gonzalezreal/swiftui-math.git cd swiftui-math -
Open the package:
open Package.swift -
Build and run the tests to verify your setup
Style Guides
Git Commit Messages
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Keep the first line concise (50 characters or less)
- Reference issues and pull requests where appropriate
- Use the body to explain what and why, not how
Examples:
Add Math view snapshot coverageFix line breaking for accented wordsImprove typesetter performance
Swift Code Style
- Follow Swift API Design Guidelines
- Use clear, descriptive names for types, methods, and variables
- Prefer clarity over brevity
- Use SwiftUI's declarative style and composition patterns
- Keep view bodies focused and extract complex logic into separate methods or types
- Document public APIs with clear, helpful comments
- Use
// MARK:comments to organize code into logical sections
Testing
- Write tests for new functionality
- Ensure existing tests continue to pass
- Focus on testing public APIs and observable behavior
- Include edge cases and error conditions
- Keep tests focused and independent
Documentation
- Update the README if you add user-facing features
- Document public APIs with clear descriptions and examples
- Include code examples in documentation when helpful
- Update previews or snapshots to showcase new features
Additional Notes
Issue Labels
We use labels to categorize issues and pull requests:
bug- Something isn't workingenhancement- New feature or requestdocumentation- Improvements or additions to documentationgood first issue- Good for newcomershelp wanted- Extra attention is needed
Questions?
If you have questions about contributing, feel free to:
- Open an issue with your question
- Start a discussion in the repository
- Review existing issues and pull requests for examples
Recognition
Contributors are recognized in the project's commit history and release notes. Significant contributions may be highlighted in the README.
Thank you for contributing to SwiftUIMath! Your efforts help make this library better for everyone.