Thank you for your interest in contributing to Prima! We welcome contributions from the community.
- Fork the repository
- Clone your fork locally
- Set up the development environment:
mix setup # Full setup (deps, assets setup, assets build)
mix phx.server # Start development serverVisit http://localhost:4000/demo to see all components in action and test your changes.
mix test # Run all tests (includes ExUnit and Wallaby tests)The test suite includes both unit tests and comprehensive browser-based integration tests using Wallaby to ensure all interactive behaviors work correctly. Due to the interactive nature of Prima components, prefer Wallaby tests over unit tests for component testing.
mix assets.build # Build assets for development- Create your feature branch (
git checkout -b feature/amazing-feature) - Make your changes following the project's conventions:
- Follow the existing code style and patterns
- Ensure components are unstyled by default
- Maintain accessibility standards (ARIA attributes, focus management, keyboard navigation)
- Add appropriate tests (preferably Wallaby tests for interactive components)
- Run the test suite to ensure nothing is broken
- Commit your changes (
git commit -am 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
- ExUnit tests for simple component logic and rendering
- Wallaby tests for complex UI interactions and components with JavaScript behavior
- Components with heavy JavaScript integration, DOM manipulation, or keyboard navigation should have Wallaby tests
- Ensure your code follows the existing patterns and conventions
- Add tests for new functionality
- Update documentation if necessary
- Ensure all tests pass
- Your PR will be reviewed by maintainers
If you have questions about contributing, feel free to open an issue for discussion.