Ariadne

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

  1. Fork and clone the repository
  2. Configure and install the dependencies: ./script/setup
  3. Make sure the tests pass on your machine
  4. Create a new branch: git checkout -b my-branch-name
  5. Make your change, add tests, and make sure the tests still pass
  6. Add an entry to the top of CHANGELOG.md for your change under the appropriate heading
  7. Push to your fork and submit a pull request
  8. 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 the docs: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.