If you're reading this, you're awesome! Thank you for helping us make this project great and being a part of the Material-UI community. Here are a few guidelines that will help you along the way.
For how-to questions and other non-issues, please use StackOverflow or Gitter chat instead of Github issues. There is a StackOverflow tag called "material-ui" that you can use to tag your questions.
If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been reported or fixed. You can search through existing issues and PRs to see if someone has reported one similar to yours.
Next, create a new issue that briefly explains the problem, and provides a bit of background as to the circumstances that triggered it, and steps to reproduce it.
For code issues please include:
- Material-UI version
- React version
- Browser version
- A code example or link to a repo, gist or running site.
For visual or layout problems, images or animated gifs can help explain your issue.
For feature requests please include a link to the relevant section of Material Design spec, or a screenshot.
Please begin the title with '[ComponentName]' where appropriate, and use a succint description. "doesn't work" doesn't help others find similar issues.
Please don't group multiple topics into one issue, but instead each should be its own issue.
And please don't just '+1' an issue. It spams the maintainers and doesn't help move the issue forward.
Material-UI is a community project, so pull requests are always welcome, but before working on a large change, it is best to open an issue first to discuss it with the maintainers.
When in doubt, keep your pull requests small. To give a PR the best chance of getting accepted, don't bundle more than one feature or bug fix per pull request. It's always best to create two smaller PRs than one big one.
As with issues, please begin the title with [ComponentName].
Please create a new branch from an up to date master on your fork.
- Fork the Material-UI repository on Github
- Clone your fork to your local machine
git clone [email protected]:<yourname>/material-ui.git
- Create a branch
git checkout -b my-topic-branch
- Make your changes, lint, then push to to github with
git push --set-upstream origin my-topic-branch
. - Visit github and make your pull request.
If you have an existing local repositiry, please update it before you start, to minimise the chance of merge conflicts.
git remote add upstream git@github.com:callemall/material-ui.git
git checkout master
git pull upstream master
git checkout -b my-topic-branch
npm update
The documentation site is built with Material-UI, and contains examples of all the components. To get started:
npm install
cd docs
npm install
npm run start
You can now access the documentation site locally.
If you find you need to use console.log()
or debugger
, you will need to temporarily disable linting. Simply comment out the preLoaders
section of docs/webpack-dev-server.config.js
Test coverage is limited at present, but where possible, please add tests for any changes you make. Tests can be run with npm run test
.
Please follow the coding style of the current code base. Material-UI uses eslint, so if possible, enable linting in your editor to get realtime feedback. The linting rules are also run when Webpack recompiles your changes, and can be run manually with npm run lint
.
You can also run linting on a subset of the codebase with gulp eslint:src
, gulp eslint:docs
or gulp eslint:test
. Finally, when you submit a pull request, they are run again by Travis CI, but hopefully by then your code is already clean!
To get a sense of where Material-UI is heading, or for ideas on where you could contribute, take a look at the roadmap and the list of Material Design components.
By contributing your code to the callemall/material-ui GitHub repository, you agree to license your contribution under the MIT license.