ππ 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.
I don't want to read this whole thing, I just have a question!!!
What should I know before I get started?
- Git Branch Names
- Git Commit Messages
- JavaScript Styleguide
- Tests Styleguide
- Documentation Styleguide
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].
If you have any questions you can always file an issue with the question label, or contact by email.
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.
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.
- Determine which package the problem should be reported in.
- Perform a cursory search to see if the problem has already been reported. If it has and the issue is still open, add a comment to the existing issue instead of opening a new one.
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?
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.
- Determine which package the enhancement should be suggested in.
- Perform a cursory search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
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?
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.
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.
Please follow these steps to have your contribution considered by the maintainers:
TODO Add pull request template and update link
- Follow all instructions in the template
- Follow the Styleguides
- 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.
Branch names should have the following structure:
<type_of_issue>-<issue_number>_<description>
The types can be:
docs
: Only documentation related changesfeat
: Related to new features and enhancementsbug
: Bug fixesbuild
: Changes that affect the build system or external dependencies
Example of a good branch name: docs-39_create-contributing-documentation
- 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
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}
) toObject.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>
);
};
- 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.
describe('a dog', () => {
it('should bark', () => {
// spec here
});
describe('when the dog is happy', () => {
it('should wag its tail', () => {
// spec here
});
});
});
- Use JSDoc comments on your code.
- Use better-docs @component tag to document react components.
- Use Markdown for README.md files.
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.
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). |
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 |
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 |