Skip to content

Commit b2ab61e

Browse files
authored
Merge branch 'master' into disable-body-scroll
2 parents 6b4492c + dccbe41 commit b2ab61e

File tree

400 files changed

+14697
-14669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+14697
-14669
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# compiled output
44
/dist
55
/tmp
6-
/typings
76
/deploy
87

98
# dependencies

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ env:
2424
- BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
2525
- ARCH=linux-x64
2626
- BROWSER_PROVIDER_READY_FILE=/tmp/angular-material2-build/readyfile
27+
- BROWSER_PROVIDER_ERROR_FILE=/tmp/angular-material2-build/errorfile
2728
# GITHUB_TOKEN_ANGULAR
2829
- secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
2930
matrix:
@@ -51,6 +52,9 @@ before_script:
5152
script:
5253
- ./scripts/ci/build-and-test.sh
5354

55+
after_success:
56+
- ./scripts/ci/after-success.sh
57+
5458
cache:
5559
directories:
5660
- node_modules

CHANGELOG.md

Lines changed: 151 additions & 1 deletion
Large diffs are not rendered by default.

CODING_STANDARDS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## Code style
55

6-
The [Google JavaScript Style Guide](https://google.github.io/styleguide/javascriptguide.xml) is the
6+
The [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html) is the
77
basis for our coding style, with additional guidance here where that style guide is not aligned with
88
ES6 or TypeScript.
99

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
237237
[github]: https://github.com/angular/material2
238238
[gitter]: https://gitter.im/angular/material2
239239
[individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
240-
[js-style-guide]: https://google.github.io/styleguide/javascriptguide.xml
240+
[js-style-guide]: https://google.github.io/styleguide/jsguide.html
241241
[codepen]: http://codepen.io/
242242
[jsbin]: http://jsbin.com/
243243
[jsfiddle]: http://jsfiddle.net/

DEV_ENVIRONMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ To run lint, run `gulp lint`.
2525
### Running benchmarks
2626
Not yet implemented.
2727

28-
### Running screenshot diff tests.
28+
### Running screenshot diff tests
2929
Not yet implemented.

README.md

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,42 @@ This is the home for the Angular team's Material Design components built on top
1010
[Contributing](https://github.com/angular/material2/blob/master/CONTRIBUTING.md),
1111
[Plunker Template](http://plnkr.co/edit/o077B6uEiiIgkC0S06dd?p=preview)
1212

13-
### Getting started
13+
### Installation
1414

15-
See our [Getting Started Guide](https://github.com/angular/material2/blob/master/GETTING_STARTED.md)
15+
The latest release of Angular Material can be installed from npm
16+
17+
`npm install @angular/material`
18+
19+
Playing with the latest changes from [master](https://github.com/angular/material2/tree/master) is also possible
20+
21+
`npm install https://github.com/angular/material2-builds.git`
22+
23+
### Getting started
24+
25+
See our [Getting Started Guide][getting-started]
1626
if you're building your first project with Angular Material 2.
1727

1828
### Project status
19-
Angular Material 2 is currently in alpha and under active development.
20-
During alpha, breaking API and behavior changes will be occurring regularly.
29+
Angular Material 2 is currently in beta and under active development.
30+
During beta, new features will be added regularly and APIs will evolve based on user feedback.
2131

22-
Check out our [directory of design documents](https://github.com/angular/material2/wiki/Design-doc-directory)
32+
Check out our [directory of design documents](https://github.com/angular/material2/wiki/Design-doc-directory)
2333
for more insight into our process.
2434

25-
If you'd like to contribute, you must follow our [contributing guidelines](https://github.com/angular/material2/blob/master/CONTRIBUTING.md).
26-
You can look through the issues (which should be up-to-date on who is working on which features
27-
and which pieces are blocked) and make a comment.
28-
Also see our [`Good for community contribution`](https://github.com/angular/material2/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+for+community+contribution%22)
35+
If you'd like to contribute, you must follow our [contributing guidelines](https://github.com/angular/material2/blob/master/CONTRIBUTING.md).
36+
You can look through the issues (which should be up-to-date on who is working on which features
37+
and which pieces are blocked) and make a comment.
38+
Also see our [`Good for community contribution`](https://github.com/angular/material2/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+for+community+contribution%22)
2939
label.
3040

31-
High level items planned for November 2016:
32-
* Initial version of md-select
33-
* Continued bug bashing
34-
* Initial versions of autocomplete and chips
35-
* AoT compile e2e app
36-
* Continue work on https://material.angular.io site
37-
* Major refactoring for md-input
38-
* Tabs animations
39-
* Expanding e2e test coverage
41+
High level items planned for January 2017:
42+
* Initial version of md-autocomplete
43+
* Prototyping for data-table
44+
* Improvements to https://material.angular.io
45+
* Continued expanding e2e test coverage
46+
* More work on scroll / resize handling for overlays
47+
* Screenshot tests
48+
* Better development automation
4049

4150

4251
#### Feature status:
@@ -53,35 +62,35 @@ High level items planned for November 2016:
5362
| list | Available | [README][8] | [#107][0107] |
5463
| grid-list | Available | [README][9] | - |
5564
| icon | Available | [README][10] | - |
56-
| progress-circle | Available | [README][11] | - |
65+
| progress-spinner | Available | [README][11] | - |
5766
| progress-bar | Available | [README][12] | - |
5867
| tabs | Available | [README][13] | - |
5968
| slide-toggle | Available | [README][14] | - |
6069
| button-toggle | Available | [README][15] | - |
6170
| slider | Available | [README][16] | - |
6271
| menu | Available | [README][17] | [#119][0119] |
63-
| tooltip | Initial version, needs enhancements | [README][18] | - |
72+
| tooltip | Available | [README][18] | - |
6473
| ripples | Available | [README][19] | [#108][0108] |
6574
| dialog | Available | [README][22] | [#114][0114] |
6675
| snackbar / toast | Available | [README][21] | [#115][0115] |
67-
| select | Will be released in alpha.11 | - | [#118][0118] |
68-
| textarea | Started | - | [#546][0546] |
69-
| autocomplete | Design started | - | [#117][0117] |
70-
| chips | Started | - | [#120][0120] |
76+
| select | Available | - | [#118][0118] |
77+
| textarea | Available | - | - |
78+
| autocomplete | In-progress | - | [#117][0117] |
79+
| chips | Initial version, features evolving | - | [#120][0120] |
7180
| theming | Available, need guidance overlays | [Guide][20] | - |
72-
| prod build | Not started | - | - |
7381
| docs site | UX design and tooling in progress | - | - |
7482
| typography | Not started | - | [#205][0205] |
75-
| layout | Design in-progress, prototyped | - | - |
7683
| fab speed-dial | Not started | - | [#860][0860] |
7784
| fab toolbar | Not started | - | - |
7885
| bottom-sheet | Not started | - | - |
7986
| bottom-nav | Not started | - | [#408][0408] |
8087
| virtual-repeat | Not started | - | [#823][0823] |
8188
| datepicker | Not started | - | [#675][0675] |
82-
| data-table | Not started | - | [#581][0581] |
89+
| data-table | Design in-progress | - | [#581][0581] |
8390
| stepper | Not started | - | [#508][0508] |
91+
| layout | see [angular/flex-layout][lay_rp] | - | - |
8492

93+
[lay_rp]: https://github.com/angular/flex-layout
8594
[1]: https://github.com/angular/material2/blob/master/src/lib/button/README.md
8695
[2]: https://github.com/angular/material2/blob/master/src/lib/card/README.md
8796
[3]: https://github.com/angular/material2/blob/master/src/lib/checkbox/README.md
@@ -92,7 +101,7 @@ High level items planned for November 2016:
92101
[8]: https://github.com/angular/material2/blob/master/src/lib/list/README.md
93102
[9]: https://github.com/angular/material2/blob/master/src/lib/grid-list/README.md
94103
[10]: https://github.com/angular/material2/blob/master/src/lib/icon/README.md
95-
[11]: https://github.com/angular/material2/blob/master/src/lib/progress-circle/README.md
104+
[11]: https://github.com/angular/material2/blob/master/src/lib/progress-spinner/README.md
96105
[12]: https://github.com/angular/material2/blob/master/src/lib/progress-bar/README.md
97106
[13]: https://github.com/angular/material2/blob/master/src/lib/tabs/README.md
98107
[14]: https://github.com/angular/material2/blob/master/src/lib/slide-toggle/README.md
@@ -101,7 +110,7 @@ High level items planned for November 2016:
101110
[17]: https://github.com/angular/material2/blob/master/src/lib/menu/README.md
102111
[18]: https://github.com/angular/material2/blob/master/src/lib/tooltip/README.md
103112
[19]: https://github.com/angular/material2/blob/master/src/lib/core/ripple/README.md
104-
[20]: https://github.com/angular/material2/blob/master/docs/theming.md
113+
[20]: https://github.com/angular/material2/blob/master/guides/theming.md
105114
[21]: https://github.com/angular/material2/blob/master/src/lib/snack-bar/README.md
106115
[22]: https://github.com/angular/material2/blob/master/src/lib/dialog/README.md
107116

@@ -123,13 +132,16 @@ High level items planned for November 2016:
123132
[0675]: https://github.com/angular/material2/issues/675
124133
[0581]: https://github.com/angular/material2/issues/581
125134

135+
[getting-started]: https://github.com/angular/material2/blob/master/guides/getting-started.md
136+
[theming]: https://github.com/angular/material2/blob/master/guides/theming.md
137+
126138

127139
"Available" means that the components or feature is published and available for use, but may still
128140
be missing some behaviors or polish.
129141

130142
## The goal of Angular Material
131-
Our goal is to build a set of high-quality UI components built with Angular 2 and TypeScript,
132-
following the Material Design spec. These
143+
Our goal is to build a set of high-quality UI components built with Angular 2 and TypeScript,
144+
following the Material Design spec. These
133145
components will serve as an example of how to write Angular code following best practices.
134146

135147
### What do we mean by "high-quality"?
@@ -142,7 +154,7 @@ components will serve as an example of how to write Angular code following best
142154
* Code is clean and well-documented to serve as an example for Angular devs.
143155

144156
## Browser and screen reader support
145-
Angular Material supports the most recent two versions of all major browsers:
157+
Angular Material supports the most recent two versions of all major browsers:
146158
Chrome (including Android), Firefox, Safari (including iOS), and IE11 / Edge
147159

148160
We also aim for great user experience with the following screen readers:

e2e/components/button/button.e2e.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {browser, by, element} from 'protractor';
2+
13
describe('button', function () {
24
describe('disabling behavior', function () {
35
beforeEach(function() {
Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,41 @@
1+
import {browser, by, element, Key} from 'protractor';
2+
13
describe('checkbox', function () {
4+
25
describe('check behavior', function () {
6+
37
beforeEach(function() {
48
browser.get('/checkbox');
59
});
6-
it('should be checked when clicked, and be unchecked when clicked again', function () {
7-
element(by.id('test-checkbox')).click();
8-
element(by.css('input[id=input-test-checkbox]')).getAttribute('checked').then((value: string) => {
10+
11+
it('should be checked when clicked, and be unchecked when clicked again', () => {
12+
let checkboxEl = element(by.id('test-checkbox'));
13+
let inputEl = element(by.css('input[id=input-test-checkbox]'));
14+
15+
checkboxEl.click();
16+
inputEl.getAttribute('checked').then((value: string) => {
917
expect(value).toBeTruthy('Expect checkbox "checked" property to be true');
1018
});
1119

12-
element(by.id('test-checkbox')).click();
13-
element(by.css('input[id=input-test-checkbox]')).getAttribute('checked').then((value: string) => {
20+
checkboxEl.click();
21+
inputEl.getAttribute('checked').then((value: string) => {
1422
expect(value).toBeFalsy('Expect checkbox "checked" property to be false');
1523
});
1624
});
25+
26+
it('should toggle the checkbox when pressing space', () => {
27+
let inputEl = element(by.css('input[id=input-test-checkbox]'));
28+
29+
inputEl.getAttribute('checked').then((value: string) => {
30+
expect(value).toBeFalsy('Expect checkbox "checked" property to be false');
31+
});
32+
33+
inputEl.sendKeys(Key.SPACE);
34+
35+
inputEl.getAttribute('checked').then((value: string) => {
36+
expect(value).toBeTruthy('Expect checkbox "checked" property to be true');
37+
});
38+
});
39+
1740
});
1841
});

e2e/components/dialog/dialog.e2e.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
import {browser, by, element, Key, ProtractorBy} from 'protractor';
2+
13
describe('dialog', () => {
24
beforeEach(() => browser.get('/dialog'));
35

46
it('should open a dialog', () => {
57
element(by.id('default')).click();
6-
waitForDialog().then(isPresent => expect(isPresent).toBe(true));
8+
waitForDialog().then((isPresent: boolean) => expect(isPresent).toBe(true));
79
});
810

911
it('should close by clicking on the backdrop', () => {
1012
element(by.id('default')).click();
1113

1214
waitForDialog().then(() => {
1315
clickOnBackrop();
14-
waitForDialog().then(isPresent => expect(isPresent).toBe(false));
16+
waitForDialog().then((isPresent: boolean) => expect(isPresent).toBe(false));
1517
});
1618
});
1719

@@ -20,7 +22,7 @@ describe('dialog', () => {
2022

2123
waitForDialog().then(() => {
2224
pressEscape();
23-
waitForDialog().then(isPresent => expect(isPresent).toBe(false));
25+
waitForDialog().then((isPresent: boolean) => expect(isPresent).toBe(false));
2426
});
2527
});
2628

@@ -29,7 +31,7 @@ describe('dialog', () => {
2931

3032
waitForDialog().then(() => {
3133
element(by.id('close')).click();
32-
waitForDialog().then(isPresent => expect(isPresent).toBe(false));
34+
waitForDialog().then((isPresent: boolean) => expect(isPresent).toBe(false));
3335
});
3436
});
3537

@@ -56,7 +58,7 @@ describe('dialog', () => {
5658
element(by.id('default')).click();
5759

5860
waitForDialog().then(() => {
59-
let tab = protractor.Key.TAB;
61+
let tab = Key.TAB;
6062

6163
browser.actions().sendKeys(tab, tab, tab).perform();
6264
expectFocusOn(element(by.id('close')));
@@ -68,7 +70,7 @@ describe('dialog', () => {
6870

6971
waitForDialog().then(() => {
7072
clickOnBackrop();
71-
waitForDialog().then(isPresent => expect(isPresent).toBe(true));
73+
waitForDialog().then((isPresent: boolean) => expect(isPresent).toBe(true));
7274
});
7375
});
7476

@@ -77,25 +79,25 @@ describe('dialog', () => {
7779

7880
waitForDialog().then(() => {
7981
pressEscape();
80-
waitForDialog().then(isPresent => expect(isPresent).toBe(true));
82+
waitForDialog().then((isPresent: boolean) => expect(isPresent).toBe(true));
8183
});
8284
});
8385

8486
function waitForDialog() {
85-
return browser.isElementPresent(by.css('md-dialog-container'));
87+
return browser.isElementPresent(by.css('md-dialog-container') as ProtractorBy);
8688
}
8789

8890
function clickOnBackrop() {
8991
browser.actions()
9092
// We need to move the cursor to the top left so
9193
// the dialog doesn't receive the click accidentally.
92-
.mouseMove(element(by.css('.md-overlay-backdrop')).getWebElement(), { x: 0, y: 0 })
94+
.mouseMove(element(by.css('.cdk-overlay-backdrop')).getWebElement(), { x: 0, y: 0 })
9395
.click()
9496
.perform();
9597
}
9698

9799
function pressEscape() {
98-
browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
100+
browser.actions().sendKeys(Key.ESCAPE).perform();
99101
}
100102

101103
// TODO(crisbeto): should be moved to a common util. copied from the menu e2e setup.

e2e/components/grid-list/grid-list.e2e.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {browser, by, element} from 'protractor';
2+
13
describe('grid-list', () => {
24
beforeEach(() => browser.get('/grid-list'));
35

e2e/components/icon/icon.e2e.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {browser, by, element} from 'protractor';
2+
13
describe('icon', () => {
24
describe('font icons by ligature', () => {
35
let testIcon: any;

e2e/components/list/list.e2e.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {browser, by, element} from 'protractor';
2+
13
describe('list', () => {
24
beforeEach(() => browser.get('/list'));
35

0 commit comments

Comments
 (0)