Skip to content

Latest commit

Β 

History

History
293 lines (195 loc) Β· 20.7 KB

CONTRIBUTING.md

File metadata and controls

293 lines (195 loc) Β· 20.7 KB

Contributing to MIST

πŸ‘πŸŽ‰ First off, thanks for taking the time to contribute! πŸŽ‰πŸ‘

The following is a set of guidelines for contributing to MIST and its packages. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

Table Of Contents

Code of Conduct

I don't want to read this whole thing, I just have a question!!!

What should I know before I get started?

How Can I Contribute?

Styleguides

Additional Notes

Code of Conduct

This project and everyone participating in it is governed by the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

I don't want to read this whole thing I just have a question!!!

If you have any questions you can always file an issue with the question label, or contact by email.

What should I know before I get started?

MIST is a monorepo

MIST is a monorepo containing several different packages, and maintained with Lerna. If you want to contribute to any of them, you must clone the whole repository and you will find them under the packages directory.

How Can I Contribute?

Reporting Bugs

This section guides you through submitting a bug report for MIST. 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 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. Fill out the required template, the information it asks for helps us resolve issues faster.

Note: If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.

Before Submitting A Bug Report

How Do I Submit A (Good) Bug Report?

Bugs are tracked as GitHub issues. After you've determined which package your bug is related to, create an issue on the repository, add both the bug label and the specific package label, and provide the following information by filling in the template.

Explain the problem and, if possible, include additional details to help maintainers reproduce the problem:

  • Use a clear and descriptive title for the issue to identify the problem.
  • Describe the exact steps which reproduce the problem in as many details as possible.
  • Provide specific examples to demonstrate the steps. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
  • Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
  • Explain which behavior you expected to see instead and why.
  • Include screenshots and animated GIFs if the problem is related to styles or animations. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
  • If the problem wasn't triggered by a specific action, describe what you were doing before the problem happened and share more information using the guidelines below.

Provide more context by answering these questions:

  • Did the problem start happening recently (e.g. after updating to a new version) or was this always a problem?
  • If the problem started happening recently, can you reproduce the problem in an older version? What's the most recent version in which the problem doesn't happen? You can download older versions from the releases page.
  • Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.

Include details about your configuration and environment:

  • Which package version failed? You can see the exact version by running npm list package-name in your terminal if you have it installed.
  • What's the name and version of the OS and browser you're using?

Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for any MIST packages, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion πŸ“ and find related suggestions πŸ”Ž.

Before creating enhancement suggestions, please check this list 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. Fill in the template, including the steps that you imagine you would take if the feature you're requesting existed.

Before Submitting An Enhancement Suggestion

How Do I Submit A (Good) Enhancement Suggestion?

Enhancement suggestions are tracked as GitHub issues. After you've determined which package your enhancement suggestion is related to, create an issue on the repository, add both the enhancement label and the specific package label, 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 many details as possible.
  • Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
  • Describe the current behavior and explain which behavior you expected to see instead and why.
  • Include screenshots and animated GIFs if it helps you demonstrate the steps or point out the part the package which the suggestion is related to. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
  • Explain why this enhancement would be useful to most users.
  • List some other software examples where this enhancement exists.
  • Specify which version the package you're using. You can see the exact version by running npm list package-name in your terminal if you have it installed.
  • What's the name and version of the OS and browser you're using?

Your First Code Contribution

Unsure where to begin contributing? You can start by looking through these beginner and help-wanted issues:

  • Beginner issues - issues which should only require a few lines of code, and a test or two.
  • Help wanted issues - issues which should be a bit more involved than beginner issues.

Both issue lists are sorted by total number of +1 reactions but you can change to other useful sorting ways, such as ascendent -1 reactions, or by number of comments.

Local development

All MIST packages can and should be developed locally. In order to do so, follow these steps:

Clone MIST monorepo:

git clone https://github.com/FranciscoFornell/MIST.git

Now create a new branch following the branch names styleguide

git checkout feature-1_do-something

CODE_OF_CONDUCT

npm install

Bootstrap all packages dependencies:

npm run lerna:bootstrap

Build all packages:

npm run build

Now you can go to the package you want to develop (they are in packages directory) and start the development server:

npm start

It depends on the package, but usually npm start it will lint and test the code in watch mode, and also serve the app or docs locally in watch mode. Now you can edit the code and it will run lints, tests and refresh the development server automatically.

Pull Requests

Please follow these steps to have your contribution considered by the maintainers:

TODO Add pull request template and update link

  1. Follow all instructions in the template
  2. Follow the Styleguides
  3. After you submit your pull request, verify that all status checks are passing
    What if the status checks are failing?If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.

While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.

Styleguides

Git Branch Names

Branch names should have the following structure: <type_of_issue>-<issue_number>_<description>

The types can be:

  • docs: Only documentation related changes
  • feat: Related to new features and enhancements
  • bug: Bug fixes
  • build: Changes that affect the build system or external dependencies

Example of a good branch name: docs-39_create-contributing-documentation

Git Commit Messages

  • Follow the conventional commits styleguide. Otherwise the commit will fail, as the commit message is linted on a git hook.
  • There are plugins make following this convention easier for the most used editors. For example on VS Code you can use this plugin.
  • Use the present tense ("add feature" not "added feature")
  • Use the imperative mood ("move cursor to..." not "moves cursor to...")
  • Consider starting the commit message description with an applicable emoji, following this guide.

Example of a good commit message: docs: :memo: update README.md

JavaScript Styleguide

All JavaScript code is linted with Prettier. It also uses prettier to auto-format your code when you commit. We also use ESLint for some additional linting not covered by prettier.

  • Prefer the object spread operator ({...anotherObj}) to Object.assign()
  • When possible, prefer ES6 import over commonJS require.
  • Prefer React named arrow function components with hooks over class components.
const MyComponent = ({ someProp }) => {
  return (
    <React.Fragment>
      <span>Render the prop value: </span>
      <span>{someProp}</span>
    </React.Fragment>
  );
};

Tests Styleguide

  • Include thoughtfully-worded, well-structured Jest tests. Test files should be on the same directory as the tested file, and have the same name with .test.js extension.

Example

describe('a dog', () => {
  it('should bark', () => {
    // spec here
  });

  describe('when the dog is happy', () => {
    it('should wag its tail', () => {
      // spec here
    });
  });
});

Documentation Styleguide

Additional Notes

Issue and Pull Request Labels

This section lists the labels we use to help us track and manage issues and pull requests.

GitHub search makes it easy to use labels for finding groups of issues or pull requests you're interested in. To help you find issues and pull requests, each label is listed with search links for finding open items with that label. We encourage you to read about other search filters which will help you write more focused queries.

Please open an issue if you have suggestions for new labels.

Type of Issue and Issue State

Label name Search issues πŸ”Ž Description
✨ enhancement Search Feature requests.
πŸ› bug Search Confirmed bugs or reports that are very likely to be bugs.
❓ question Search Questions more than bug reports or feature requests (e.g. how do I do X).
πŸ’¬ feedback Search General feedback more than bug reports or feature requests.
πŸ†˜ help wanted Search We would appreciate help from the community in resolving these issues.
πŸ†• good first issue Search Less complex issues which would be good first issues to work on for users who want to contribute to Atom.
ℹ️ more information needed Search More information needs to be collected about these problems or feature requests (e.g. steps to reproduce).
β›” blocked Search Issues blocked on other issues.
2️⃣ duplicate Search Issues which are duplicates of other issues, i.e. they have been reported before.
🚫 wontfix Search The core team has decided not to fix these issues for now, either because they're working as intended or for some other reason.
πŸ™… invalid Search Issues which aren't valid (e.g. user errors).

Topic Categories

Label name Search issues πŸ”Ž Description
πŸ“ documentation Search Related to any type of documentation
⚑ performance Search Related to performance.
πŸ” Security Search Related to security.
🎨 ui Search Related to visual design.
πŸ‘· build Search Changes that affect the build system or external dependencies

Packages

Label name Search issues πŸ”Ž Description
πŸ“¦ ink-story-manager Search Related to ink-story-manager package
πŸ“¦ ink-story-web-player Search Related to ink-story-web-player package
πŸ“¦ mist-utils Search Related to mist-utils package