Skip to content

Commit

Permalink
Merge pull request #3075 from mbrookes/contributing
Browse files Browse the repository at this point in the history
[Docs] Contributing guide
  • Loading branch information
oliviertassinari committed Jan 28, 2016
2 parents af83dde + 09c7ac6 commit 3da3523
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 3 deletions.
85 changes: 85 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
## Contributing

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.

### Asking Questions

For how-to questions and other non-issues, please use [StackOverflow](http://stackoverflow.com/questions/tagged/material-ui) or [Gitter](https://gitter.im/callemall/material-ui) chat instead of Github issues. There is a StackOverflow tag called "material-ui" that you can use to tag your questions.

### Opening an Issue

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](https://github.com/callemall/material-ui/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aclosed). 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.

## Issue Guidelines

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.

### Submitting a Pull Request

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, do not 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].

### Getting started

Please create a new branch from an up to date master on your fork.

1. Fork the Material UI repository on Github
2. Clone your fork to your local machine `git clone git@github.com:<yourname>/material-ui.git`
3. Create a branch `git checkout -b my-topic-branch`
4. Make your changes, lint, then push to to github with `git push --set-upstream origin my-topic-branch`.
5. 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.
```js
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
```

### Testing

The documentation site is built with Material UI, and contains examples of all the components. To get started:
```js
npm install
cd docs
npm install
npm run start
```
You can now access
If you find you need to use `console.log()` or `debugger`, you will need to temporarily disable linting. Simply comment out the [`preLoaders` section](https://github.com/callemall/material-ui/blob/master/docs/webpack-dev-server.config.js#L62) of `docs/webpack-dev-server.config.js`

### Coding style

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!

### Roadmap

To get a sense of where Material UI is heading, or for ideas on where you could contribute, take a look at the [roadmap](https://github.com/callemall/material-ui/blob/master/ROADMAP.md) and the list of [Material Design components](https://github.com/callemall/material-ui/issues/2863).


### License

By contributing your code to the callemall/material-ui GitHub repository, you agree to license your contribution under the MIT license.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The future plans and high priority features and enhancements can be found in the

## Contribute

[Material-UI](http://www.material-ui.com/) came about from our love of [React](http://facebook.github.io/react/) and [Google's Material Design](https://www.google.com/design/spec/material-design/introduction.html). We're currently using it on a project at [Call-Em-All](https://www.call-em-all.com/) and plan on adding to it and making it better. If you'd like to help, check out the [docs folder](https://github.com/callemall/material-ui/tree/master/docs). We'd greatly appreciate any contribution you make. :)
[Material-UI](http://www.material-ui.com/) came about from our love of [React](http://facebook.github.io/react/) and [Google's Material Design](https://www.google.com/design/spec/material-design/introduction.html). We're currently using it on a project at [Call-Em-All](https://www.call-em-all.com/) and plan on adding to it and making it better. If you'd like to help, check out the [docs folder](https://github.com/callemall/material-ui/tree/master/docs). We'd greatly appreciate any [contribution](https://github.com/callemall/material-ui/blob/master/CONTRIBUTING.md) you make. :)

## License
This project is licensed under the terms of the [MIT license](https://github.com/callemall/material-ui/blob/master/LICENSE)
2 changes: 2 additions & 0 deletions docs/src/app/app-routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import TogglePage from './components/pages/components/Toggle/Page';
import ToolbarPage from './components/pages/components/Toolbar/Page';

import Community from './components/pages/discover-more/Community';
import Contributing from './components/pages/discover-more/Contributing';
import Showcase from './components/pages/discover-more/Showcase';

/**
Expand Down Expand Up @@ -128,6 +129,7 @@ const AppRoutes = (
<Redirect from="discover-more" to="/discover-more/community" />
<Route path="discover-more">
<Route path="community" component={Community} />
<Route path="contributing" component={Contributing} />
<Route path="showcase" component={Showcase} />
</Route>
</Route>
Expand Down
1 change: 1 addition & 0 deletions docs/src/app/components/app-left-nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ const AppLeftNav = React.createClass({
primaryTogglesNestedList={true}
nestedItems={[
<ListItem primaryText="Community" value="/discover-more/community" />,
<ListItem primaryText="Contributing" value="/discover-more/contributing" />,
<ListItem primaryText="Showcase" value="/discover-more/showcase" />,
]}
/>
Expand Down
9 changes: 9 additions & 0 deletions docs/src/app/components/pages/discover-more/Contributing.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import MarkdownElement from '../../MarkdownElement';
import contributingText from '../../../../../../CONTRIBUTING.md';

const Contributing = () => (
<MarkdownElement text={contributingText} />
);

export default Contributing;
1 change: 0 additions & 1 deletion docs/webpack-dev-server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const config = {
{
test: /\.md$/,
loader: 'raw-loader',
include: path.resolve(__dirname, 'src/app/components'),
},
{
test: /\.css$/,
Expand Down
1 change: 0 additions & 1 deletion docs/webpack-production.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ const config = {
{
test: /\.md$/,
loader: 'raw-loader',
include: path.resolve(__dirname, 'src/app/components'),
},
{
test: /\.css$/,
Expand Down

0 comments on commit 3da3523

Please sign in to comment.