Skip to content

Commit 2f209a9

Browse files
authored
Merge branch 'master' into 2326/tooltip-touch-click
2 parents 744ff15 + b49bfce commit 2f209a9

File tree

142 files changed

+2196
-605
lines changed

Some content is hidden

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

142 files changed

+2196
-605
lines changed

.travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ env:
3030
matrix:
3131
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
3232
- MODE=lint
33-
- MODE=extract_metadata
33+
- MODE=aot
34+
- MODE=payload
3435
- MODE=e2e
3536
- MODE=saucelabs_required
3637
- MODE=browserstack_required
37-
- MODE=saucelabs_optional
38-
- MODE=browserstack_optional
3938

4039
matrix:
4140
fast_finish: true

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ should no longer throw an error if it is missing.
7373
* **scroll:** provide directive and service to listen to scrolling ([#2188](https://github.com/angular/material2/issues/2188)) ([9b68e68](https://github.com/angular/material2/commit/9b68e68))
7474
* **sidenav:** close via escape key and restore focus to trigger element ([#1990](https://github.com/angular/material2/issues/1990)) ([a1331ec](https://github.com/angular/material2/commit/a1331ec))
7575
* **tooltip:** add input for delaying show and hide ([#2101](https://github.com/angular/material2/issues/2101)) ([e85d108](https://github.com/angular/material2/commit/e85d108))
76-
76+
* **toolbar** add responsive heights as per spec ([#2157](https://github.com/angular/material2/issues/2157)) ([78d54fc](https://github.com/angular/material2/commit/78d54fc08491ce35f9ad06dc50488cc4d4c3a5e8))
7777

7878
### Performance Improvements
7979

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2016 Google, Inc.
3+
Copyright (c) 2017 Google, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
+27-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,41 @@
1-
import {browser, by, element} from 'protractor';
1+
import {browser, by, element, Key} from 'protractor';
22

33
describe('checkbox', function () {
4+
45
describe('check behavior', function () {
6+
57
beforeEach(function() {
68
browser.get('/checkbox');
79
});
8-
it('should be checked when clicked, and be unchecked when clicked again', function () {
9-
element(by.id('test-checkbox')).click();
10-
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) => {
1117
expect(value).toBeTruthy('Expect checkbox "checked" property to be true');
1218
});
1319

14-
element(by.id('test-checkbox')).click();
15-
element(by.css('input[id=input-test-checkbox]')).getAttribute('checked').then((value: string) => {
20+
checkboxEl.click();
21+
inputEl.getAttribute('checked').then((value: string) => {
22+
expect(value).toBeFalsy('Expect checkbox "checked" property to be false');
23+
});
24+
});
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) => {
1630
expect(value).toBeFalsy('Expect checkbox "checked" property to be false');
1731
});
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+
});
1838
});
39+
1940
});
2041
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import {browser, by, element, Key, ProtractorBy} from 'protractor';
2+
3+
describe('fullscreen', () => {
4+
beforeEach(() => browser.get('/fullscreen'));
5+
6+
let overlayInBody = () =>
7+
browser.isElementPresent(by.css('body > .cdk-overlay-container') as ProtractorBy);
8+
let overlayInFullscreen = () =>
9+
browser.isElementPresent(by.css('#fullscreenpane > .cdk-overlay-container') as ProtractorBy);
10+
11+
it('should open a dialog inside a fullscreen element and move it to the document body', () => {
12+
element(by.id('fullscreen')).click();
13+
element(by.id('dialog')).click();
14+
15+
overlayInFullscreen().then((isPresent: boolean) => {
16+
expect(isPresent).toBe(true);
17+
element(by.id('exitfullscreenindialog')).click();
18+
overlayInBody().then((isPresent: boolean) => {
19+
expect(isPresent).toBe(true);
20+
});
21+
});
22+
});
23+
24+
it('should open a dialog inside the document body and move it to a fullscreen element', () => {
25+
element(by.id('dialog')).click();
26+
overlayInBody().then((isPresent: boolean) => {
27+
expect(isPresent).toBe(true);
28+
element(by.id('fullscreenindialog')).click();
29+
overlayInFullscreen().then((isPresent: boolean) => {
30+
expect(isPresent).toBe(true);
31+
element(by.id('exitfullscreenindialog')).click();
32+
overlayInBody().then((isPresent: boolean) => {
33+
expect(isPresent).toBe(true);
34+
});
35+
});
36+
});
37+
});
38+
});

e2e/components/menu/menu.e2e.ts

-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ describe('menu', () => {
4646
page.backdrop().click();
4747
page.expectMenuPresent(false);
4848

49-
// TODO(kara): temporary, remove when #1607 is fixed
50-
browser.sleep(250);
5149
page.trigger().click();
5250
expect(page.menu().getText()).toEqual('One\nTwo\nThree\nFour');
5351
page.expectMenuAlignedWith(page.menu(), 'trigger');

e2e/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"sourceMap": true,
1414
"target": "es5",
1515
"typeRoots": [
16-
"../node_modules/@types/"
16+
"../node_modules/@types"
1717
],
1818
"types": [
1919
"jasmine"

guides/getting-started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export class PizzaPartyAppModule { }
3737
This is **required** to apply all of the core and theme styles to your application. You can either
3838
use a pre-built theme, or define your own custom theme.
3939

40-
:trident: See the [theming guide](guides/theming.md) for instructions.
40+
:trident: See the [theming guide](./theming.md) for instructions.
4141

4242
### Additional setup for gestures
43-
Some components ()`md-slide-toggle`, `md-slider`, `mdTooltip`) rely on
43+
Some components (`md-slide-toggle`, `md-slider`, `mdTooltip`) rely on
4444
[HammerJS](http://hammerjs.github.io/) for gestures. In order to get the full feature-set of these
4545
components, HammerJS must be loaded into the application.
4646

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"dgeni": "^0.4.2",
5959
"dgeni-packages": "^0.16.2",
6060
"express": "^4.14.0",
61+
"firebase-admin": "^4.0.4",
6162
"firebase-tools": "^2.2.1",
6263
"fs-extra": "^0.26.5",
6364
"glob": "^6.0.4",
@@ -67,15 +68,15 @@
6768
"gulp-clean": "^0.3.2",
6869
"gulp-clean-css": "^2.3.0",
6970
"gulp-cli": "^1.2.2",
71+
"gulp-connect": "^5.0.0",
7072
"gulp-htmlmin": "^3.0.0",
7173
"gulp-if": "^2.0.2",
7274
"gulp-markdown": "^1.2.0",
7375
"gulp-sass": "^2.3.2",
74-
"gulp-server-livereload": "^1.8.2",
7576
"gulp-shell": "^0.5.2",
7677
"gulp-sourcemaps": "^1.6.0",
7778
"gulp-transform": "^1.1.0",
78-
"gulp-typescript": "^2.13.6",
79+
"gulp-typescript": "^3.1.3",
7980
"hammerjs": "^2.0.8",
8081
"highlight.js": "^9.9.0",
8182
"jasmine-core": "^2.4.1",
@@ -85,6 +86,7 @@
8586
"karma-firefox-launcher": "^1.0.0",
8687
"karma-jasmine": "^1.0.2",
8788
"karma-sauce-launcher": "^1.0.0",
89+
"karma-sourcemap-loader": "^0.3.7",
8890
"madge": "^0.6.0",
8991
"merge2": "^1.0.2",
9092
"minimist": "^1.2.0",
@@ -97,11 +99,12 @@
9799
"strip-ansi": "^3.0.0",
98100
"stylelint": "^7.7.0",
99101
"symlink-or-copy": "^1.0.1",
100-
"travis-after-modes": "0.0.6-2",
102+
"travis-after-modes": "0.0.7",
101103
"ts-node": "^0.7.3",
102104
"tslint": "^3.13.0",
103105
"typedoc": "^0.5.1",
104106
"typescript": "~2.0.10",
107+
"uglify-js": "^2.7.5",
105108
"which": "^1.2.4"
106109
}
107110
}

scripts/browserstack/start-tunnel.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ rm $TUNNEL_FILE
3333
ARGS=""
3434

3535
# Set tunnel-id only on Travis, to make local testing easier.
36-
if [ ! -z "$TRAVIS_JOB_NUMBER" ]; then
37-
ARGS="$ARGS --local-identifier $TRAVIS_JOB_NUMBER"
36+
if [ ! -z "$TRAVIS_JOB_ID" ]; then
37+
ARGS="$ARGS --local-identifier $TRAVIS_JOB_ID"
3838
fi
3939

4040
echo "Starting Browserstack Local in the background, logging into:"

scripts/ci/build-and-test.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ if is_lint; then
1717
$(npm bin)/gulp ci:lint
1818
elif is_e2e; then
1919
$(npm bin)/gulp ci:e2e
20-
elif is_extract_metadata; then
21-
$(npm bin)/gulp ci:extract-metadata
20+
elif is_aot; then
21+
$(npm bin)/gulp ci:aot
22+
elif is_payload; then
23+
$(npm bin)/gulp ci:payload
2224
else
2325
$(npm bin)/gulp ci:test
2426
fi

scripts/ci/sources/mode.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ is_lint() {
99
[[ "$MODE" = lint ]]
1010
}
1111

12-
is_extract_metadata() {
13-
[[ "$MODE" = extract_metadata ]]
12+
is_aot() {
13+
[[ "$MODE" = aot ]]
1414
}
15+
16+
is_payload() {
17+
[[ "$MODE" = payload ]]
18+
}

scripts/saucelabs/start-tunnel.sh

+25-40
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,43 @@
22

33
set -e -o pipefail
44

5-
# Setup and start Sauce Connect for your TravisCI build
6-
# This script requires your .travis.yml to include the following two private env variables:
7-
# SAUCE_USERNAME
8-
# SAUCE_ACCESS_KEY
9-
# Follow the steps at https://saucelabs.com/opensource/travis to set that up.
10-
#
11-
# Curl and run this script as part of your .travis.yml before_script section:
12-
# before_script:
13-
# - curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash
14-
15-
CONNECT_DIR="/tmp/sauce-connect-$RANDOM"
16-
CONNECT_DOWNLOAD="sc-latest-linux.tar.gz"
17-
18-
CONNECT_LOG="$LOGS_DIR/sauce-connect"
19-
CONNECT_STDOUT="$LOGS_DIR/sauce-connect.stdout"
20-
CONNECT_STDERR="$LOGS_DIR/sauce-connect.stderr"
21-
22-
# Get the appropriate URL for downloading Sauce Connect
23-
if [ `uname -s` = "Darwin" ]; then
24-
# If the user is running Mac, download the OSX version
25-
# https://en.wikipedia.org/wiki/Darwin_(operating_system)
26-
CONNECT_URL="https://saucelabs.com/downloads/sc-4.4.2-osx.zip"
27-
else
28-
# Otherwise, default to Linux for Travis-CI
29-
CONNECT_URL="https://saucelabs.com/downloads/sc-4.4.2-linux.tar.gz"
30-
fi
31-
mkdir -p $CONNECT_DIR
32-
cd $CONNECT_DIR
33-
curl $CONNECT_URL -o $CONNECT_DOWNLOAD 2> /dev/null 1> /dev/null
34-
mkdir sauce-connect
35-
tar --extract --file=$CONNECT_DOWNLOAD --strip-components=1 --directory=sauce-connect > /dev/null
36-
rm $CONNECT_DOWNLOAD
5+
TUNNEL_FILE="sc-4.4.2-linux.tar.gz"
6+
TUNNEL_URL="https://saucelabs.com/downloads/$TUNNEL_FILE"
7+
TUNNEL_DIR="/tmp/saucelabs-connect"
378

9+
TUNNEL_LOG="$LOGS_DIR/sauce-connect"
3810

3911
SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`
4012

13+
# Cleanup and create the folder structure for the tunnel connector.
14+
rm -rf $TUNNEL_DIR $BROWSER_PROVIDER_READY_FILE
15+
mkdir -p $TUNNEL_DIR
16+
17+
cd $TUNNEL_DIR
18+
19+
# Download the saucelabs connect binaries.
20+
curl $TUNNEL_URL -o $TUNNEL_FILE 2> /dev/null 1> /dev/null
21+
22+
# Extract the saucelabs connect binaries from the tarball.
23+
mkdir -p sauce-connect
24+
tar --extract --file=$TUNNEL_FILE --strip-components=1 --directory=sauce-connect > /dev/null
25+
26+
# Cleanup the download directory.
27+
rm $TUNNEL_FILE
28+
4129
ARGS=""
4230

4331
# Set tunnel-id only on Travis, to make local testing easier.
44-
if [ ! -z "$TRAVIS_JOB_NUMBER" ]; then
45-
ARGS="$ARGS --tunnel-identifier $TRAVIS_JOB_NUMBER"
32+
if [ ! -z "$TRAVIS_JOB_ID" ]; then
33+
ARGS="$ARGS --tunnel-identifier $TRAVIS_JOB_ID"
4634
fi
4735
if [ ! -z "$BROWSER_PROVIDER_READY_FILE" ]; then
4836
ARGS="$ARGS --readyfile $BROWSER_PROVIDER_READY_FILE"
4937
fi
5038

51-
5239
echo "Starting Sauce Connect in the background, logging into:"
53-
echo " $CONNECT_LOG"
54-
echo " $CONNECT_STDOUT"
55-
echo " $CONNECT_STDERR"
40+
echo " $TUNNEL_LOG"
5641
echo " ---"
5742
echo " $ARGS"
58-
sauce-connect/bin/sc -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY $ARGS \
59-
--logfile $CONNECT_LOG 2> $CONNECT_STDERR 1> $CONNECT_STDOUT &
43+
44+
sauce-connect/bin/sc -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY $ARGS --logfile $TUNNEL_LOG &
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
<div class="demo-autocomplete">
2-
<md-autocomplete></md-autocomplete>
2+
<md-input-container>
3+
<input mdInput placeholder="State" [mdAutocomplete]="auto">
4+
</md-input-container>
5+
6+
<md-autocomplete #auto="mdAutocomplete">
7+
<md-option *ngFor="let state of states" [value]="state.code"> {{ state.name }} </md-option>
8+
</md-autocomplete>
39
</div>

src/demo-app/autocomplete/autocomplete-demo.ts

+30-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,33 @@ import {Component} from '@angular/core';
66
templateUrl: 'autocomplete-demo.html',
77
styleUrls: ['autocomplete-demo.css'],
88
})
9-
export class AutocompleteDemo {}
9+
export class AutocompleteDemo {
10+
states = [
11+
{code: 'AL', name: 'Alabama'},
12+
{code: 'AZ', name: 'Arizona'},
13+
{code: 'CA', name: 'California'},
14+
{code: 'CO', name: 'Colorado'},
15+
{code: 'CT', name: 'Connecticut'},
16+
{code: 'FL', name: 'Florida'},
17+
{code: 'GA', name: 'Georgia'},
18+
{code: 'ID', name: 'Idaho'},
19+
{code: 'KS', name: 'Kansas'},
20+
{code: 'LA', name: 'Louisiana'},
21+
{code: 'MA', name: 'Massachusetts'},
22+
{code: 'MN', name: 'Minnesota'},
23+
{code: 'MI', name: 'Mississippi'},
24+
{code: 'NY', name: 'New York'},
25+
{code: 'NC', name: 'North Carolina'},
26+
{code: 'OK', name: 'Oklahoma'},
27+
{code: 'OH', name: 'Ohio'},
28+
{code: 'OR', name: 'Oregon'},
29+
{code: 'PA', name: 'Pennsylvania'},
30+
{code: 'SC', name: 'South Carolina'},
31+
{code: 'TN', name: 'Tennessee'},
32+
{code: 'TX', name: 'Texas'},
33+
{code: 'VA', name: 'Virginia'},
34+
{code: 'WA', name: 'Washington'},
35+
{code: 'WI', name: 'Wisconsin'},
36+
{code: 'WY', name: 'Wyoming'},
37+
];
38+
}

src/demo-app/baseline/baseline-demo.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<md-input placeholder="Input"></md-input>
1414
| Text 5 |
1515
<md-input-container>
16-
<input md-input placeholder="Input">
16+
<input mdInput placeholder="Input">
1717
</md-input-container>
1818
| Text After
1919
</md-card-content>
@@ -35,7 +35,7 @@ <h1>
3535
<md-input placeholder="Input"></md-input>
3636
| Text 5 |
3737
<md-input-container>
38-
<input md-input placeholder="Input">
38+
<input mdInput placeholder="Input">
3939
</md-input-container>
4040
| Text After
4141
</h1>

0 commit comments

Comments
 (0)