# Contributing

The following is a set of guidelines for contributing to Textile-related projects, which are hosted in the [Textile organization](https://github.com/textileio). These are just guidelines, not rules. Use your best judgment, and
feel free to propose changes to this document in a pull request.

Note that Textile is an evolving project, so expect things to change over time as the team learns, listens and refines how we work with the community.

#### Table Of Contents

[What should I know before I get started?](#what-should-i-know-before-i-get-started)

-   [Code of Conduct](#code-of-conduct)

[How Can I Contribute?](#how-can-i-contribute)

-   [Reporting Bugs](#reporting-bugs)
-   [Suggesting Enhancements](#suggesting-enhancements)

[Additional Notes](#additional-notes)

## What should I know before I get started?

### Code of Conduct

This project adheres to the Contributor Covenant [code of conduct](./CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code.
Please report unacceptable behavior to [contact@textile.io](mailto:contact@textile.io).

## How Can I Contribute?

### Developing locally

#### How to Setup

Generally, Textile projects can be initialized with something like:

**Step 1:** git clone this repo:

```
git clone git@github.com:textileio/js-threads-client.git
```

If you want to run the tests in both browser and Nodejs, you'll need to install a recent [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html), and [Firefox](https://www.mozilla.org/en-CA/firefox/) or [Chrome](https://www.google.com/chrome/) browser.

**Step 2:** cd to the cloned repo:

**Step 3:** Install the Application with `yarn` or `npm i`

**Step 4:** Run the tests:

```
npm run test
```

Or to do just Nodejs or browser:

```
npm run test:{node,browser}
```

### Reporting Bugs

This section guides you through submitting a bug report for any Textile repo.
Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.

Before creating bug reports, please check [this list](../../labels/bug) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report).

#### Before Submitting A Bug Report

**Perform a [cursory search](../../labels/bug)** to see if the problem has already been reported. If it does exist, add a :thumbsup: to the issue to indicate this is also an issue for you, and add a comment to the existing issue if there is extra information you can contribute.

#### How Do I Submit A (Good) Bug Report?

Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/).

Simply create an issue on the [Textile issue tracker](../../issues).

The information we are interested in includes:

-   details about your environment - which build, which operating system
-   details about reproducing the issue - what steps to take, what happens, how
    often it happens
-   other relevant information - log files, screenshots, etc.

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for this project, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:.

Before creating enhancement suggestions, please check [this list](../..//labels/bug)
as you might find out that you don't need to create one. When you are creating
an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Include the steps
that you imagine you would take if the feature you're requesting existed.

#### Before Submitting An Enhancement Suggestion

**Perform a [cursory search](../../labels/enhancement)**
to see if the enhancement has already been suggested. If it has, add a
:thumbsup: to indicate your interest in it, or comment if there is additional
information you would like to add.

#### How Do I Submit A (Good) Enhancement Suggestion?

Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/).

Simply create an issue on the [Textile issue tracker](../..//issues)
and provide the following information:

-   **Use a clear and descriptive title** for the issue to identify the
    suggestion.
-   **Provide a step-by-step description of the suggested enhancement** in as
    much detail as possible. This additional context helps the maintainers to
    understand the enhancement from your perspective
-   **Explain why this enhancement would be useful** to Textile users.
-   **Include screenshots and animated GIFs** if relevant to help you demonstrate
    the steps or point out the part of Textile which the suggestion is
    related to.
-   **List some other applications where this enhancement exists, if applicable.**

## Additional Notes

More to be added
