Contributing
Hi there! We’re thrilled that you’d like to contribute to this project. Your help is essential for keeping it great.
If you have any substantial changes that you would like to make, please open an issue first to discuss them with us.
Contributions to this project are released to the public under the project’s open source license.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Developing with another app
In your Gemfile
, change:
gem "ariadne_view_components"
to
gem "ariadne_view_components", path: "path_to_the_gem" # e.g. path: "~/ariadne/view_components"
Then, bundle install
to update references. You’ll now be able to see changes from the gem without having to build it.
Remember that restarting the Rails server is necessary to see changes, as the gem is loaded at boot time.
To minimize the number of restarts, we recommend checking the component in Lookbook first, and then when it’s in a good state, you can check it in your app.
Submitting a pull request
- Fork and clone the repository
- Configure and install the dependencies:
./script/setup
- Make sure the tests pass on your machine
- Create a new branch:
git checkout -b my-branch-name
- Make your change, add tests, and make sure the tests still pass
- Add an entry to the top of
CHANGELOG.md
for your change under the appropriate heading - Push to your fork and submit a pull request
- Pat yourself on the back and wait for your pull request to be reviewed and merged.
Here are just a few things you can do that will increase the likelihood of your pull request being accepted:
- Write tests.
- Write YARD comments for component and slot initializers. Please document the purpose and general use of new components or slots you add, as well as the parameters they accept. See for example the comment style in app/components/ariadne/counter_component.rb.
- Add new components to the
components
list in Rakefile in thedocs:build
task, so that Markdown documentation is generated for them within docs/content/components/. - Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Write a descriptive pull request message.
Have questions?
Still have questions? Talk to support.