3
3
We would love for you to contribute to Angular Material and help make it ever better!
4
4
As a contributor, here are the guidelines we would like you to follow:
5
5
6
- - [ Code of Conduct] ( #coc )
7
- - [ Question or Problem?] ( #question )
8
- - [ Issues and Bugs] ( #issue )
9
- - [ Feature Requests] ( #feature )
10
- - [ Submission Guidelines] ( #submit-pr )
11
- - [ Coding Rules] ( #rules )
12
- - [ Commit Message Guidelines] ( #commit )
13
- - [ Signing the CLA] ( #cla )
6
+ - [ Code of Conduct] ( #coc )
7
+ - [ Question or Problem?] ( #question )
8
+ - [ Issues and Bugs] ( #issue )
9
+ - [ Feature Requests] ( #feature )
10
+ - [ Submission Guidelines] ( #submit-pr )
11
+ - [ Coding Rules] ( #rules )
12
+ - [ Commit Message Guidelines] ( #commit )
13
+ - [ Signing the CLA] ( #cla )
14
14
15
15
## <a name =" coc " ></a > Code of Conduct
16
+
16
17
Help us keep Angular open and inclusive. Please read and follow our [ Code of Conduct] [ coc ] .
17
18
18
19
## <a name =" question " ></a > Got a Question or Problem?
@@ -30,92 +31,96 @@ To save your and our time, we will be systematically closing all the issues that
30
31
If you would like to chat about the question in real-time, you can reach out via [ our gitter channel] [ gitter ] .
31
32
32
33
## <a name =" issue " ></a > Found an Issue?
34
+
33
35
If you find a bug in the source code or a mistake in the documentation, you can help us by
34
- [ submitting an issue] ( #submit-issue ) to our [ GitHub Repository] [ github ] .
36
+ [ submitting an issue] ( #submit-issue ) to our [ GitHub Repository] [ github ] .
35
37
36
38
For bugs, include an issue reproduction (via your preferred REPL: StackBlitz, CodePen, JsBin,
37
39
Plunkr, etc.) Our team has limited resources, and this allows us quickly diagnose issues and make
38
40
optimal use of the time we dedicate to fixing them. Issues that do not include a REPL reproduction
39
41
will be closed. If a REPL reproduction is not possible for your issue, please explain why and
40
- include any other information that may be helpful in debugger (link to a repo, error messages,
42
+ include any other information that may be helpful in debugger (link to a repo, error messages,
41
43
screenshots, etc.)
42
44
43
45
You can help the team even more and [ submit a Pull Request] ( #submit-pr ) with a fix.
44
46
45
47
## <a name =" feature " ></a > Want a Feature?
46
- You can * request* a new feature by [ submitting an issue] ( #submit-issue ) to our [ GitHub
47
- Repository] [ github ] . If you would like to * implement* a new feature, please submit an issue with
48
+
49
+ You can _ request_ a new feature by [ submitting an issue] ( #submit-issue ) to our [ GitHub
50
+ Repository] [ github ] . If you would like to _ implement_ a new feature, please submit an issue with
48
51
a proposal for your work first, to be sure that we can use it.
49
52
Please consider what kind of change it is:
50
53
51
- * For a ** Major Feature** , first open an issue and outline your proposal so that it can be
52
- discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
53
- and help you to craft the change so that it is successfully accepted into the project.
54
- * ** Small Features** can be crafted and directly [ submitted as a Pull Request] ( #submit-pr ) .
54
+ - For a ** Major Feature** , first open an issue and outline your proposal so that it can be
55
+ discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
56
+ and help you to craft the change so that it is successfully accepted into the project.
57
+ - ** Small Features** can be crafted and directly [ submitted as a Pull Request] ( #submit-pr ) .
55
58
56
59
### <a name =" submit-issue " ></a > Submitting an Issue
60
+
57
61
Before you submit an issue, search the archive, maybe your question was already answered.
58
62
59
63
If your issue appears to be a bug, and hasn't been reported, open a new issue.
60
64
Help us to maximize the effort we can spend fixing issues and adding new
61
- features by not reporting duplicate issues. Providing the following information will increase the
65
+ features by not reporting duplicate issues. Providing the following information will increase the
62
66
chances of your issue being dealt with quickly:
63
67
64
- * ** Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
65
- * ** Angular and Material Versions** - which versions of Angular and Material are affected
66
- (e.g. 2.0.0-alpha.53)
67
- * ** Motivation for or Use Case** - explain what are you trying to do and why the current behavior
68
- is a bug for you
69
- * ** Browsers and Operating System** - is this a problem with all browsers?
70
- * ** Reproduce the Error** - provide a live example (using [ CodePen] [ codepen ] , [ JsBin] [ jsbin ] ,
71
- [ Plunker] [ plunker ] , etc.) or an unambiguous set of steps
72
- * ** Screenshots** - Due to the visual nature of Angular Material, screenshots can help the team
73
- triage issues far more quickly than a text description.
74
- * ** Related Issues** - has a similar issue been reported before?
75
- * ** Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
76
- causing the problem (line of code or commit)
68
+ - ** Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
69
+ - ** Angular and Material Versions** - which versions of Angular and Material are affected
70
+ (e.g. 2.0.0-alpha.53)
71
+ - ** Motivation for or Use Case** - explain what are you trying to do and why the current behavior
72
+ is a bug for you
73
+ - ** Browsers and Operating System** - is this a problem with all browsers?
74
+ - ** Reproduce the Error** - provide a live example (using [ CodePen] [ codepen ] , [ JsBin] [ jsbin ] ,
75
+ [ Plunker] [ plunker ] , [ StackBlitz ] [ stackBlitz ] , etc.) or an unambiguous set of steps
76
+ - ** Screenshots** - Due to the visual nature of Angular Material, screenshots can help the team
77
+ triage issues far more quickly than a text description.
78
+ - ** Related Issues** - has a similar issue been reported before?
79
+ - ** Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
80
+ causing the problem (line of code or commit)
77
81
78
82
You can file new issues by providing the above information [ here] ( https://github.com/angular/components/issues/new ) .
79
83
80
-
81
84
### <a name =" submit-pr " ></a > Submitting a Pull Request (PR)
85
+
82
86
Before you submit your Pull Request (PR) consider the following guidelines:
83
87
84
- * Search [ GitHub] ( https://github.com/angular/components/pulls ) for an open or closed PR
88
+ - Search [ GitHub] ( https://github.com/angular/components/pulls ) for an open or closed PR
85
89
that relates to your submission. You don't want to duplicate effort.
86
- * Please sign our [ Contributor License Agreement (CLA)] ( #cla ) before sending PRs.
90
+ - Please sign our [ Contributor License Agreement (CLA)] ( #cla ) before sending PRs.
87
91
We cannot accept code without this.
88
- * Make your changes in a new git branch:
92
+ - Make your changes in a new git branch:
89
93
90
- ``` shell
91
- git checkout -b my-fix-branch main
92
- ```
94
+ ``` shell
95
+ git checkout -b my-fix-branch main
96
+ ```
93
97
94
- * Create your patch, ** including appropriate test cases** .
95
- * Follow our [Coding Rules](# rules).
96
- * Test your changes with our supported browsers and screen readers.
97
- * Run the full Angular Material test suite, as described in the [developer documentation][dev-doc],
98
+ - Create your patch, ** including appropriate test cases** .
99
+ - Follow our [ Coding Rules] ( #rules ) .
100
+ - Test your changes with our supported browsers and screen readers.
101
+ - Run the full Angular Material test suite, as described in the [ developer documentation] [ dev-doc ] ,
98
102
and ensure that all tests pass.
99
- * Commit your changes using a descriptive commit message that follows our
103
+ - Commit your changes using a descriptive commit message that follows our
100
104
[ commit message conventions] ( #commit ) . Adherence to these conventions
101
105
is necessary because release notes are automatically generated from these messages.
102
106
103
- ` ` ` shell
104
- git commit -a
105
- ` ` `
107
+ ``` shell
108
+ git commit -a
109
+ ```
110
+
106
111
Note: the optional commit ` -a ` command line option will automatically "add" and "rm" edited files.
107
112
108
- * Push your branch to GitHub:
113
+ - Push your branch to GitHub:
109
114
110
- ` ` ` shell
111
- git push my-fork my-fix-branch
112
- ` ` `
115
+ ``` shell
116
+ git push my-fork my-fix-branch
117
+ ```
113
118
114
- * In GitHub, send a pull request to ` components:main` .
115
- * If we suggest changes then:
116
- * Make the required updates.
117
- * Re-run the Angular Material test suites to ensure tests are still passing.
118
- * Rebase your branch and force push to your GitHub repository (this will update your Pull
119
+ - In GitHub, send a pull request to ` components:main ` .
120
+ - If we suggest changes then:
121
+ - Make the required updates.
122
+ - Re-run the Angular Material test suites to ensure tests are still passing.
123
+ - Rebase your branch and force push to your GitHub repository (this will update your Pull
119
124
Request):
120
125
121
126
``` shell
@@ -130,47 +135,49 @@ That's it! Thank you for your contribution!
130
135
After your pull request is merged, you can safely delete your branch and pull the changes
131
136
from the main (upstream) repository:
132
137
133
- * Delete the remote branch on GitHub either through the GitHub web UI or your local shell as
134
- follows:
138
+ - Delete the remote branch on GitHub either through the GitHub web UI or your local shell as
139
+ follows:
135
140
136
- ```shell
137
- git push my-fork --delete my-fix-branch
138
- ```
141
+ ```shell
142
+ git push my-fork --delete my-fix-branch
143
+ ```
139
144
140
- * Check out the main branch:
145
+ - Check out the main branch:
141
146
142
- ```shell
143
- git checkout main -f
144
- ```
147
+ ```shell
148
+ git checkout main -f
149
+ ```
145
150
146
- * Delete the local branch:
151
+ - Delete the local branch:
147
152
148
- ```shell
149
- git branch -D my-fix-branch
150
- ```
153
+ ```shell
154
+ git branch -D my-fix-branch
155
+ ```
151
156
152
- * Update your local `main` with the latest upstream version:
157
+ - Update your local `main` with the latest upstream version:
153
158
154
- ```shell
155
- git pull --ff upstream main
156
- ```
159
+ ```shell
160
+ git pull --ff upstream main
161
+ ```
157
162
158
163
## <a name="rules"></a> Coding Rules
164
+
159
165
To ensure consistency throughout the source code, keep these rules in mind as you are working:
160
166
161
- * All features or bug fixes **must be tested** by one or more specs (unit-tests).
162
- * All public API methods **must be documented**. (Details TBD).
163
- * We follow [Google' s TypeScript Style Guide][ts-style-guide], but wrap all code at
167
+ - All features or bug fixes **must be tested** by one or more specs (unit-tests).
168
+ - All public API methods **must be documented**. (Details TBD).
169
+ - We follow [Google' s TypeScript Style Guide][ts-style-guide], but wrap all code at
164
170
** 100 characters** .
165
171
166
172
# # <a name="commit"></a> Commit Message Guidelines
167
173
168
- We have very precise rules over how our git commit messages can be formatted. This leads to ** more
169
- readable messages** that are easy to follow when looking through the ** project history** . But also,
174
+ We have very precise rules over how our git commit messages can be formatted. This leads to ** more
175
+ readable messages** that are easy to follow when looking through the ** project history** . But also,
170
176
we use the git commit messages to ** generate the Angular Material change log** .
171
177
172
178
# ## Commit Message Format
173
- Each commit message consists of a ** header** , a ** body** and a ** footer** . The header has a special
179
+
180
+ Each commit message consists of a ** header** , a ** body** and a ** footer** . The header has a special
174
181
format that includes a ** type** , a ** package** , a ** scope** and a ** subject** :
175
182
176
183
```
@@ -203,44 +210,51 @@ Fixes #1234
203
210
```
204
211
205
212
### Revert
213
+
206
214
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of
207
215
the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is
208
216
the SHA of the commit being reverted.
209
217
210
218
### Type
219
+
211
220
Must be one of the following:
212
221
213
- * ** feat** : Creates a new feature
214
- * ** fix** : Fixes a previously discovered failure/bug
215
- * ** docs** : Changes which exclusively affects documentation
216
- * ** refactor** : Refactor without any change in functionality or API (includes style changes)
217
- * ** perf** : Improves performance without any change in functionality or API
218
- * ** test** : Improvements or corrections made to the project' s test suite
219
- * **build**: Changes to local repository build system and tooling
220
- * **ci**: Changes to CI configuration and CI specific tooling
221
- * **release**: A release point in the repository
222
+ - **feat**: Creates a new feature
223
+ - **fix**: Fixes a previously discovered failure/bug
224
+ - **docs**: Changes which exclusively affects documentation
225
+ - **refactor**: Refactor without any change in functionality or API (includes style changes)
226
+ - **perf**: Improves performance without any change in functionality or API
227
+ - **test**: Improvements or corrections made to the project's test suite
228
+ - **build**: Changes to local repository build system and tooling
229
+ - **ci**: Changes to CI configuration and CI specific tooling
230
+ - **release**: A release point in the repository
222
231
223
232
### Package
233
+
224
234
The commit message should specify which package is affected by the change. For example:
225
235
`material`, `cdk-experimental`, etc.
226
236
227
237
### Scope
238
+
228
239
The scope specifies place of the commit change. For example
229
240
`material/datepicker`, `cdk/dialog`, etc.
230
241
See full list [here][commit-message-scopes].
231
242
232
243
### Subject
244
+
233
245
The subject contains succinct description of the change:
234
246
235
- * use the imperative, present tense: "change" not "changed" nor "changes"
236
- * don' t capitalize first letter
237
- * no dot (.) at the end
247
+ - use the imperative, present tense: "change" not "changed" nor "changes"
248
+ - don't capitalize first letter
249
+ - no dot (.) at the end
238
250
239
251
### Body
252
+
240
253
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
241
254
The body should include the motivation for the change and contrast this with previous behavior.
242
255
243
256
### Footer
257
+
244
258
The footer should contain any information about **Breaking Changes** or **Deprecations** and
245
259
is also the place to reference GitHub issues that this commit **Closes**.
246
260
@@ -257,11 +271,10 @@ A detailed explanation can be found in this [document][commit-message-format].
257
271
Please sign our Contributor License Agreement (CLA) before sending pull requests. For any code
258
272
changes to be accepted, the CLA must be signed. It's a quick process, we promise!
259
273
260
- * For individuals, we have a [simple click-through form][individual-cla].
261
- * For corporations, we' ll need you to
274
+ - For individuals, we have a [simple click-through form][individual-cla].
275
+ - For corporations, we'll need you to
262
276
[print, sign and one of scan+email, fax or mail the form][corporate-cla].
263
277
264
-
265
278
[material-group]: https://groups.google.com/forum/#!forum/angular-material2
266
279
[coc]: https://github.com/angular/code-of-conduct/blob/main/CODE_OF_CONDUCT.md
267
280
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/preview
@@ -278,3 +291,4 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
278
291
[plunker]: https://plnkr.co/edit
279
292
[runnable]: https://runnable.com/
280
293
[stackoverflow]: https://stackoverflow.com/
294
+ [stackBlitz]: https://stackblitz.com/
0 commit comments