Thank you for your interest in contributing to RubyUI! This document provides guidelines for contributing to the project.
We recommend using the provided devcontainer to set up your development environment. This ensures a consistent environment for all contributors.
- Make sure you have Docker
- Clone the repository
- Open the project in you editor
- Select "Reopen in Container" if you are using VSCode or any other method to run the project
- The devcontainer will set up everything you need to start developing
- Fork the repository
- Create a new branch for your changes
- Make your changes
- Run tests to ensure your changes don't break existing functionality:
bundle exec rake test - Run the linter to ensure consistent code formatting:
bundle exec rake standard - Submit a Pull Request to the main repository
We prioritize:
- Improving existing components rather than adding new ones
- Preserving the shadcn look and feel
- Enhancing documentation
- Fixing bugs
We follow Standard Ruby conventions for code style. The CI pipeline runs standard to ensure consistent code formatting.
While we don't have specific test coverage requirements, all contributions should include tests for new functionality and ensure existing tests pass.
If your changes include new components, modify how components should be used, or add new behaviors, it is highly recommended to also open a PR on the ruby-ui/web repository. This ensures the documentation website stays up-to-date with the latest component changes.
RubyUI includes documentation files for each component that can be installed into your Rails application. These files are located at lib/ruby_ui/{component}/{component}_docs.rb and provide usage examples for each component.
To install the documentation files:
bin/rails g ruby_ui:install:docsTo overwrite existing documentation files:
bin/rails g ruby_ui:install:docs --forceThis will copy the documentation files to app/views/docs/ in your Rails application.
Thank you for contributing to make RubyUI better!