Skip to content

Commit 76a6397

Browse files
authored
Merge pull request #1 from angular/master
Merging changes from material
2 parents 2e4a511 + 3f98306 commit 76a6397

File tree

176 files changed

+2810
-1686
lines changed

Some content is hidden

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

176 files changed

+2810
-1686
lines changed

.circleci/config.yml

Lines changed: 87 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Configuration file for https://circleci.com/gh/angular/material2
22

3+
#
34
# Note: YAML anchors allow an object to be re-used, reducing duplication.
45
# The ampersand declares an alias for an object, then later the `<<: *name`
56
# syntax dereferences it.
@@ -10,58 +11,111 @@
1011
var_1: &docker_image angular/ngcontainer:0.6.0
1112
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.6.0
1213

13-
# Define common ENV vars
14-
var_3: &define_env_vars
15-
run: echo "export PROJECT_ROOT=$(pwd)" >> $BASH_ENV
16-
17-
# See remote cache documentation in /docs/BAZEL.md
18-
var_4: &setup-bazel-remote-cache
19-
run:
20-
name: Start up bazel remote cache proxy
21-
command: ~/bazel-remote-proxy -backend circleci://
22-
background: true
23-
2414
# Settings common to each job
25-
anchor_1: &job_defaults
15+
var_3: &job_defaults
2616
working_directory: ~/ng
2717
docker:
2818
- image: *docker_image
2919

30-
# After checkout, rebase on top of master.
31-
# Similar to travis behavior, but not quite the same.
32-
# By default, PRs are not rebased on top of master, which we want.
33-
# See https://discuss.circleci.com/t/1662
34-
anchor_2: &post_checkout
35-
post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"
20+
# Job step for checking out the source code from GitHub. This also ensures that the source code
21+
# is rebased on top of master.
22+
var_4: &checkout_code
23+
checkout:
24+
# After checkout, rebase on top of master. By default, PRs are not rebased on top of master,
25+
# which we want. See https://discuss.circleci.com/t/1662
26+
post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"
27+
28+
# Restores the cache that could be available for the current Yarn lock file. The cache usually
29+
# includes the node modules and the Bazel repository cache.
30+
var_5: &restore_cache
31+
restore_cache:
32+
key: *cache_key
33+
34+
# Saves the cache for the current Yarn lock file. We store the node modules and the Bazel
35+
# repository cache in order to make subsequent builds faster.
36+
var_6: &save_cache
37+
save_cache:
38+
key: *cache_key
39+
paths:
40+
- "node_modules"
41+
- "~/bazel_repository_cache"
3642

43+
# Job step that ensures that the node module dependencies are installed and up-to-date. We use
44+
# Yarn with the frozen lockfile option in order to make sure that lock file and package.json are
45+
# in sync. Unlike in Travis, we don't need to manually purge the node modules if stale because
46+
# CircleCI automatically discards the cache if the checksum of the lock file has changed.
47+
var_7: &yarn_install
48+
run: yarn install --frozen-lockfile --non-interactive
49+
50+
# Copies the Bazel config which is specifically for CircleCI to a location where Bazel picks it
51+
# up and merges it with the project-wide bazel configuration (tools/bazel.rc)
52+
var_8: &copy_bazel_config
53+
# Set up the CircleCI specific bazel configuration.
54+
run: sudo cp ./.circleci/bazel.rc /etc/bazel.bazelrc
55+
56+
# -----------------------------
57+
# Container version of CircleCI
58+
# -----------------------------
3759
version: 2
60+
61+
# -----------------------------------------------------------------------------------------
62+
# Job definitions. Jobs which are defined just here, will not run automatically. Each job
63+
# must be part of a workflow definition in order to run for PRs and push builds.
64+
# -----------------------------------------------------------------------------------------
3865
jobs:
39-
build:
66+
67+
# -----------------------------------
68+
# Build and test job that uses Bazel.
69+
# -----------------------------------
70+
bazel_build_test:
4071
<<: *job_defaults
4172
resource_class: xlarge
4273
steps:
43-
- checkout:
44-
<<: *post_checkout
45-
- restore_cache:
46-
key: *cache_key
47-
# Set up the CircleCI specific bazel configuration.
48-
- run: sudo cp ./.circleci/bazel.rc /etc/bazel.bazelrc
74+
- *checkout_code
75+
- *restore_cache
76+
- *copy_bazel_config
4977

5078
# TODO(jelbourn): Update this command to run all tests if the Bazel issues have been fixed.
51-
- run: bazel test src/{cdk,lib}/schematics:unit_tests
79+
- run: bazel build src/cdk/...
80+
- run: bazel test src/cdk/...
5281

53-
- save_cache:
54-
key: *cache_key
55-
paths:
56-
- "node_modules"
57-
- "~/bazel_repository_cache"
82+
- *save_cache
5883

84+
# ----------------------------------
85+
# Lint job. Runs the gulp lint task.
86+
# ----------------------------------
87+
lint:
88+
<<: *job_defaults
89+
steps:
90+
- *checkout_code
91+
- *restore_cache
92+
- *yarn_install
93+
94+
- run: yarn ci:lint
95+
96+
- *save_cache
97+
98+
# ----------------------------------------------------------------------------------------
99+
# Workflow definitions. A workflow usually groups multiple jobs together. This is useful if
100+
# one job depends on another.
101+
# ----------------------------------------------------------------------------------------
59102
workflows:
60103
version: 2
61-
default_workflow:
104+
105+
# Build and test workflow. A workflow includes multiple jobs that run in parallel. All jobs
106+
# that build and test source code should be part of this workflow
107+
build_and_test:
108+
jobs:
109+
- bazel_build_test
110+
111+
# Lint workflow. As we want to lint in one job, this is a workflow with just one job.
112+
lint:
62113
jobs:
63-
- build
114+
- lint
64115

116+
# ---------------------------
117+
# General setup for CircleCI
118+
# ---------------------------
65119
general:
66120
branches:
67121
only:

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ branches:
2525

2626
jobs:
2727
include:
28-
- env: "MODE=lint"
2928
- env: "MODE=aot"
3029
- env: "MODE=payload"
3130
- env: "MODE=prerender"
@@ -53,10 +52,10 @@ env:
5352
before_install:
5453
- source ./scripts/ci/travis-env.sh
5554
- source ./scripts/ci/install-yarn.sh
56-
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then ./scripts/install-angular-snapshot.sh --only-save; fi
5755

5856
install:
59-
- yarn install --frozen-lockfile --non-interactive
57+
- ./scripts/ci/travis-install.sh
58+
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then ./scripts/install-angular-snapshot.sh --only-save; fi
6059

6160
before_script:
6261
- mkdir -p $LOGS_DIR

BUILD.bazel

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1 @@
11
package(default_visibility = ["//visibility:public"])
2-
3-
# TODO(jelbourn): figure out if these workarounds are still needed
4-
5-
# TODO: Replace with fine-grained node_modules using `npm_install` / `yarn_install`.
6-
# TODO: See https://github.com/bazelbuild/rules_nodejs/wiki#migrating-to-rules_nodejs-013
7-
alias(
8-
name = "node_modules",
9-
actual = "@npm//:node_modules",
10-
)
11-
12-
# Glob pattern that matches all Angular testing bundles.
13-
ANGULAR_TESTING = [
14-
"node_modules/@angular/*/bundles/*-testing.umd.js",
15-
# The compiler and the dynamic platform-browser should be visible only in tests
16-
"node_modules/@angular/compiler/bundles/*.umd.js",
17-
"node_modules/@angular/platform-browser-dynamic/bundles/*.umd.js",
18-
]
19-
20-
filegroup(
21-
name = "angular_bundles",
22-
srcs = glob(["node_modules/@angular/*/bundles/*.umd.js"], exclude = ANGULAR_TESTING),
23-
)
24-
25-
filegroup(
26-
name = "angular_test_bundles",
27-
testonly = 1,
28-
srcs = glob(ANGULAR_TESTING),
29-
)
30-
31-
filegroup(
32-
name = "tslib_bundle",
33-
testonly = 1,
34-
srcs = glob(["node_modules/tslib/tslib.js"]),
35-
)
36-
37-
# Files necessary for unit tests that use zonejs
38-
filegroup(
39-
name = "web_test_bootstrap_scripts",
40-
# The order of these deps is important.
41-
# Do not sort.
42-
srcs = [
43-
"//:node_modules/reflect-metadata/Reflect.js",
44-
"//:node_modules/zone.js/dist/zone.js",
45-
"//:node_modules/zone.js/dist/zone-testing.js",
46-
"//:node_modules/zone.js/dist/task-tracking.js",
47-
],
48-
)

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1+
<a name="7.0.0-rc.2"></a>
2+
# 7.0.0-rc.2 (2018-10-15)
3+
4+
5+
### Bug Fixes
6+
7+
* **drag-drop:** enterPredicate being called with wrong drop container ([#13578](https://github.com/angular/material2/issues/13578)) ([60b4a58](https://github.com/angular/material2/commit/60b4a58))
8+
* **drag-drop:** rename cdkDrop to cdkDropList ([#13619](https://github.com/angular/material2/issues/13619)) ([160b688](https://github.com/angular/material2/commit/160b688))
9+
* **ng-add:** do not add theme file if existing theme is set up ([#13468](https://github.com/angular/material2/issues/13468)) ([d1e59a2](https://github.com/angular/material2/commit/d1e59a2))
10+
* **schematics:** template content exceeds max line length ([#13521](https://github.com/angular/material2/issues/13521)) ([b0a1daf](https://github.com/angular/material2/commit/b0a1daf))
11+
* **schematics:** tree folder icons do not have enough contrast ([#13462](https://github.com/angular/material2/issues/13462)) ([4a0eb2b](https://github.com/angular/material2/commit/4a0eb2b))
12+
* **virtual-scroll:** fix several small bugs ([#13597](https://github.com/angular/material2/issues/13597)) ([8cfaeea](https://github.com/angular/material2/commit/8cfaeea))
13+
14+
### Features
15+
16+
* **schematics:** prompt for name when generating component ([#13518](https://github.com/angular/material2/issues/13518)) ([9085de7](https://github.com/angular/material2/commit/9085de7))
17+
18+
19+
120
<a name="7.0.0-rc.1"></a>
221
# 7.0.0-rc.1 (2018-10-09)
322

423

524
### Bug Fixes
625

726
* **a11y:** not being able to escape disabled focus trap using arrow keys ([#13133](https://github.com/angular/material2/issues/13133)) ([3c55caa](https://github.com/angular/material2/commit/3c55caa)), closes [#13132](https://github.com/angular/material2/issues/13132)
8-
* **autocomplete:** closing parent overlay when pressing escpe ([#13413](https://github.com/angular/material2/issues/13413)) ([8dfd2ee](https://github.com/angular/material2/commit/8dfd2ee))
27+
* **autocomplete:** closing parent overlay when pressing escape (Esc) ([#13413](https://github.com/angular/material2/issues/13413)) ([8dfd2ee](https://github.com/angular/material2/commit/8dfd2ee))
928
* **bottom-sheet:** dismiss bottom sheet on destroy ([#13120](https://github.com/angular/material2/issues/13120)) ([ffa4a06](https://github.com/angular/material2/commit/ffa4a06))
1029
* **button-toggle:** not setting proper border in vertical mode ([#13397](https://github.com/angular/material2/issues/13397)) ([d58db5d](https://github.com/angular/material2/commit/d58db5d))
1130
* **button-toggle:** remove extra focus indication added by firefox ([#13367](https://github.com/angular/material2/issues/13367)) ([3583913](https://github.com/angular/material2/commit/3583913))

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ and which pieces are blocked) and make a comment.
2626
Also see our [`help wanted`](https://github.com/angular/material2/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
2727
label.
2828

29-
High level stuff planned for Q3 2018 (July - September):
30-
* Finishing cdk virtual-scroll
31-
* Finishing cdk drag-and-drop
32-
* New cdk/collections selection directives
33-
* Ongoing migration to bazel
34-
* Improve docs for cdk
35-
* Bug fixes and code health improvements, especially around accessibility.
29+
High level stuff planned for Q4 2018 (October - Dec):
30+
* Improve our own build and automation tooling
31+
* Fix bugs and reduce some technical debt inside Google
32+
* Working on long-term plans on how to collaborate with the MDC Web team
33+
* Designs for advanced table improvements (column resize, selection directives, inline-edit)
3634

3735

3836
#### Available features
@@ -51,11 +49,12 @@ High level stuff planned for Q3 2018 (July - September):
5149
| datepicker | | [Docs][25] |
5250
| dialog | | [Docs][22] |
5351
| divider | | [Docs][35] |
52+
| drag-drop | Landing in v7 | |
5453
| expansion-panel | | [Docs][32] |
5554
| grid-list | | [Docs][9] |
5655
| icon | | [Docs][10] |
5756
| input | | [Docs][5] |
58-
| list | Action list planned 2018 | [Docs][8] |
57+
| list | | [Docs][8] |
5958
| menu | | [Docs][17] |
6059
| paginator | | [Docs][29] |
6160
| progress-bar | | [Docs][12] |
@@ -74,6 +73,7 @@ High level stuff planned for Q3 2018 (July - September):
7473
| toolbar | | [Docs][7] |
7574
| tooltip | | [Docs][18] |
7675
| tree | | [Docs][36] |
76+
| virtual-scroll | Landing in v7 | |
7777
| ---------------- | ------------------------------------------------------ | ------------ |
7878
| theming | | [Guide][20] |
7979
| typography | | [Guide][27] |
@@ -85,7 +85,6 @@ High level stuff planned for Q3 2018 (July - September):
8585

8686
| Feature | Status | Docs | Issue |
8787
|------------------|-------------------------------------|--------------|----------------|
88-
| virtual-repeat | In-progress, planned Q3 2018 | - | [#823][0823] |
8988
| fab speed-dial | Not started, not planned | - | [#860][0860] |
9089
| fab toolbar | Not started, not planned | - | - |
9190
| bottom-nav | Not started, not planned | - | [#408][0408] |

WORKSPACE

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ workspace(name = "angular_material")
33
# Add NodeJS rules (explicitly used for sass bundle rules)
44
http_archive(
55
name = "build_bazel_rules_nodejs",
6-
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.14.2.zip",
7-
strip_prefix = "rules_nodejs-0.14.2",
8-
sha256 = "af481421c9e74f754a693a8bf5e9409484e38cf7be6f73f85879bdc7ed1b1d82",
6+
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.15.0.zip",
7+
strip_prefix = "rules_nodejs-0.15.0",
8+
sha256 = "5f5b6464ca20aa63d278caaf4736f0381eb838800d7375132057a48f09d0b837",
99
)
1010

1111
# Add TypeScript rules
1212
http_archive(
1313
name = "build_bazel_rules_typescript",
14-
url = "https://github.com/bazelbuild/rules_typescript/archive/0.19.1.zip",
15-
strip_prefix = "rules_typescript-0.19.1",
16-
sha256 = "91a03623a03a463ffd62cea3f7a384c2f298af6438d5d153fc4d69aa5665b53d",
14+
url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.2.zip",
15+
strip_prefix = "rules_typescript-0.20.2",
16+
sha256 = "2879fbd7168ba5d17db22bc2f585c0d1d3a82dd5e6f8af118e8b2f74d290024e",
1717
)
1818

1919
# Fetch transient dependencies of the TypeScript bazel rules.
@@ -31,6 +31,27 @@ http_archive(
3131
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
3232
sass_repositories()
3333

34+
# Add Angular source and Bazel rules.
35+
http_archive(
36+
name = "angular",
37+
# Temporarily locked down to the angular/angular:bazel branch. This branch includes necessary
38+
# commits that make building from source possible.
39+
# TODO(devversion): switch to release archive if workaround can be removed
40+
url = "https://github.com/angular/angular/archive/08e4489cf5a93a352954f1639da5e92112993753.zip",
41+
strip_prefix = "angular-08e4489cf5a93a352954f1639da5e92112993753",
42+
sha256 = "a59c85426048cc95f51937d0c26f4d1143b7bef730152b68ac4b79d1438e746b",
43+
)
44+
45+
# Add RxJS as repository because those are needed in order to build Angular from source.
46+
# Also we cannot refer to the RxJS version from the node modules because self-managed
47+
# node modules are not guaranteed to be installed.
48+
http_archive(
49+
name = "rxjs",
50+
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
51+
strip_prefix = "package/src",
52+
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
53+
)
54+
3455
# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install
3556
# your npm dependencies. You must still run the package manager.
3657
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
@@ -54,14 +75,25 @@ yarn_install(
5475
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
5576
ts_setup_workspace()
5677

57-
# Add Angular rules
58-
local_repository(
59-
name = "angular",
60-
path = "node_modules/@angular/bazel",
61-
)
78+
# Setup Angular bazel rules
79+
load("@angular//packages/bazel:package.bzl", "rules_angular_dependencies")
80+
rules_angular_dependencies()
6281

63-
# Add rxjs
64-
local_repository(
65-
name = "rxjs",
66-
path = "node_modules/rxjs/src",
82+
# Setup Angular workspace for building (Bazel managed node modules)
83+
load("@angular//:index.bzl", "ng_setup_workspace")
84+
ng_setup_workspace()
85+
86+
# Setup Go toolchain (required for Bazel web testing rules)
87+
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
88+
go_rules_dependencies()
89+
go_register_toolchains()
90+
91+
# Setup web testing. We need to setup a browser because the web testing rules for TypeScript need
92+
# a reference to a registered browser (ideally that's a hermetic version of a browser)
93+
load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories",
94+
"web_test_repositories")
95+
96+
web_test_repositories()
97+
browser_repositories(
98+
chromium = True,
6799
)

0 commit comments

Comments
 (0)