Skip to content

Commit 7f83445

Browse files
committed
chore(contributing): update contributing guidelines
1 parent 2d19308 commit 7f83445

File tree

2 files changed

+119
-134
lines changed

2 files changed

+119
-134
lines changed

.github/CONTRIBUTING.md

Lines changed: 119 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,140 @@
1+
# Contributing
12

2-
### Creating an Issue
3+
Thanks for your interest in contributing to the Ionic Framework! :tada:
34

4-
If you have a question on how something works, or its expected functionality, you might want to visit the [Ionic Forum](http://forum.ionicframework.com/) first.
55

6-
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](https://github.com/driftyco/ionic/issues?state=open). You can search through existing issues to see if someone's reported one similar to yours.
6+
## Contributing Etiquette
77

8-
If not, then [create a codepen.io](http://codepen.io/ionic/public-list) that demonstrates the problem (try to use as little code as possible: the more minimalist, the faster we can debug it). Also, please do not group multiple topics into one issue, but instead each should be its own issue.
8+
Please see our [Contributor Code of Conduct](./CODE_OF_CONDUCT.md) for information on our rules of conduct.
99

10-
Next, [create a new issue](https://github.com/driftyco/ionic/issues/new) that thoroughly explains the problem, how to reproduce the issue, and provide any additional information such as code examples and error logs.
1110

11+
## Creating an Issue
1212

13-
### Issue Etiquette Guidelines
13+
If you have a question about using the framework, please ask on the [Ionic Forum](http://forum.ionicframework.com/) or in the [Ionic Worldwide Slack](http://ionicworldwide.herokuapp.com/) group.
1414

15-
Poor attitude, ranting, name-calling, bullying, being a jerk, complaining, or spamming are fruitless and unacceptable. Issues that violate the open source spirit of this community, or any of the guidelines listed here, may result in your Issue being deleted or reposted to our Forum, a better place for debate and discussion. If you wish to contribute, either make your response respectful or do not bother to respond. You’ll find it’s pretty ineffective.
15+
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](https://github.com/driftyco/ionic/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
1616

17-
Simply put: be respectful and act like an adult. Critiques are better made on the Forum. If you can’t do that, this isn’t a community for you.
17+
Next, [create a new issue](https://github.com/driftyco/ionic/issues/new) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
1818

1919

20-
### Pull Request Guidelines
20+
## Creating a Pull Request
2121

22-
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 PR. Doing so makes it very hard to accept it if one of the fixes has issues.
22+
We appreciate you taking the time to contribute! Before submitting a pull request, we ask that you please [create an issue](#creating-an-issue) that explains the bug or feature request and let us know that you plan on creating a pull request for it. If an issue already exists, please comment on that issue letting us know you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort.
2323

24-
It's always best to create two smaller PRs than one big one.
24+
Looking for an issue to fix? Make sure to look through our issues with the [help wanted](https://github.com/driftyco/ionic/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label!
2525

26-
### Style
26+
### Setup
2727

28-
Always use two spaces, no tabs. This goes for any HTML, CSS, or Javascript.
28+
1. Fork the repo.
29+
2. Clone your fork.
30+
3. Make a branch for your change.
31+
4. Run `npm install` (make sure you have [node](https://nodejs.org/en/) and [npm](http://blog.npmjs.org/post/85484771375/how-to-install-npm) installed first)
2932

30-
### License
3133

32-
By contributing your code to the driftyco/ionic GitHub Repository, you agree to license your contribution under the MIT license.
34+
### Modifying Components
35+
36+
1. Make any changes to the component.
37+
2. Modify the e2e test in the `test/` directory under the component directory, if possible. If the test does not exist and it is possible to show the change, please create a new test in a directory called `basic/`.
38+
39+
40+
#### TypeScript Changes
41+
42+
1. If there is a `*.spec.ts` file located in the `test/` folder, update it to include a karma test for your change, if needed. If this file doesn't exist, please notify us.
43+
2. Run `gulp karma` to make sure all tests are working, regardless if a test was added.
44+
3. Run `gulp tslint` and fix any linter errors.
45+
46+
47+
#### Sass Changes
48+
49+
1. If the css property is something that the user may want to override and it won't break the component layout, it should be given a Sass variable. See our [doc on naming Sass variables](https://docs.google.com/document/d/1OyOyrRE5lpB_9mdkF0HWVQLV97fHma450N8XqE4mjZQ/edit?usp=sharing).
50+
2. After any changes to the Sass files run the [Sass Linter](https://github.com/brigade/scss-lint), and fix any linter errors:
51+
- Requires [Ruby](https://www.ruby-lang.org/en/documentation/installation/). **Skip this step entirely if you are unable to install Ruby.**
52+
- Install the linter: `gem install scss_lint`
53+
- Make sure to run the linter at the root of the repository.
54+
- To check all component Sass files: `scss-lint ionic/**/**/*.scss`
55+
- To check a specific Sass file: `scss-lint src/components/toolbar/toolbar.ios.scss`
56+
57+
58+
#### Viewing Changes
59+
60+
1. Run the gulp watch task for e2e tests: `gulp watch.e2e`
61+
2. Launch your browser and navigate to `http://localhost:8000/dist/e2e`
62+
3. From here, navigate to the component you are changing.
63+
4. Any changes to the e2e tests in the `test/` directory will show here.
64+
5. If your changes look good, you're ready to [commit](#committing)!
65+
66+
67+
#### Adding Documentation
68+
69+
1. To add or modify API Documentation for a component, it should be added/changed in the component's TypeScript (`*.ts`) file, prior to the Class definition. For example, `Badge` looks similar to this:
70+
71+
```
72+
/**
73+
* @name Badge
74+
* @module ionic
75+
* @description
76+
* Badges are simple components in Ionic containing numbers or text.
77+
*
78+
* @see {@link /docs/v2/components/#badges Badges Component Docs}
79+
* @demo /docs/v2/demos/badge/
80+
**/
81+
```
3382

34-
## Ionic 1.x
83+
where `@name` is the Class name, `@description` is the description displayed on the documentation page, `@see` links to any related pages, and `@demo` links to the API demo located in the `demos` folder.
84+
2. In order to run API documentation locally, you will need to clone the `ionic-site` repo as a sibling to the `ionic` repo and then run it: https://github.com/driftyco/ionic-site#local-build
85+
3. Then, run `gulp docs` in the `ionic` repo every time you make a change and the site will update.
86+
4. If the change affects the component documentation, create an issue on the `ionic-site` repo: https://github.com/driftyco/ionic-site/issues
3587

36-
Please read the contributing guide on the ionic website: http://ionicframework.com/contribute/
3788

38-
## Ionic 2.x
89+
#### Adding Demos
3990

40-
See the Ionic 2 [CONTRIBUTING](https://github.com/driftyco/ionic/blob/2.0/CONTRIBUTING.md) file.
91+
1. Create or modify the demo in the `demos/` folder.
92+
2. If it is new, link to the demo in the component's TypeScript (`*.ts`) file (under `src/components`) by adding a link to it in the documentation using `@demo`, for example:
93+
94+
```
95+
/**
96+
* @name Badge
97+
*
98+
* ...
99+
*
100+
* @demo /docs/v2/demos/badge/
101+
**/
102+
```
103+
3. Run `gulp watch.demos` to watch for changes to the demo
104+
4. Navigate to `http://localhost:8000/dist/demos/` and then to your component's demo to view it.
105+
5. If the change affects the component demos, create an issue on the `ionic-site` repo: https://github.com/driftyco/ionic-site/issues
106+
107+
108+
## Commit Message Format
109+
110+
We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the our change log. (Ok you got us, it's basically Angular's commit message format).
111+
112+
`type(scope): subject`
113+
114+
#### Type
115+
Must be one of the following:
116+
117+
* **fix**: A bug fix
118+
* **feat**: A new feature
119+
* **docs**: Documentation only changes
120+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
121+
* **refactor**: A code change that neither fixes a bug nor adds a feature
122+
* **perf**: A code change that improves performance
123+
* **test**: Adding missing tests
124+
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
125+
126+
#### Scope
127+
The scope could be anything specifying place of the commit change. For example `alert`, `button`, `menu`, `nav`, etc...
128+
129+
#### Subject
130+
The subject contains succinct description of the change:
131+
132+
* use the imperative, present tense: "change" not "changed" nor "changes"
133+
* do not capitalize first letter
134+
* do not place a period (.) at the end
135+
* entire length of the commit message must not go over 50 characters
136+
137+
138+
## License
139+
140+
By contributing your code to the driftyco/ionic GitHub Repository, you agree to license your contribution under the MIT license.

CONTRIBUTING.md

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)