Skip to content

Commit

Permalink
Merge branch 'master' into arthurevans-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Jan 31, 2018
2 parents ae58e88 + 4c8d255 commit a06759a
Show file tree
Hide file tree
Showing 131 changed files with 14,201 additions and 3,760 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"Boolean": "boolean",
"Number": "number",
"String": "string",
"object": "Object"
"object": "Object",
"array": "Array"
}
}]
}],
"no-useless-escape": "off"
},
"env": {
"browser": true,
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Code owners for Polymer
* @sorvell @kevinpschaaf @TimvdLippe @azakus
9 changes: 6 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
If you are asking a question rather than filing a bug, try one of these instead:
- StackOverflow (http://stackoverflow.com/questions/tagged/polymer)
- StackOverflow (https://stackoverflow.com/questions/tagged/polymer)
- Polymer Slack Channel (https://bit.ly/polymerslack)
- Mailing List (https://groups.google.com/forum/#!forum/polymer-dev)
-->
Expand All @@ -9,8 +9,11 @@ If you are asking a question rather than filing a bug, try one of these instead:
<!-- Example: Error thrown when calling `appendChild` on Polymer element -->

#### Live Demo
<!-- Fork this JSBin, or provide your own URL -->
http://jsbin.com/luhaxab/1/edit
<!-- jsBin starting point (fork and edit) -->
https://jsbin.com/luhaxab/1/edit
<!-- glitch.me starting point (remix and edit -- must be logged in to persist!) -->
https://glitch.com/edit/#!/polymer-repro?path=my-element.html:2:0
<!-- ...or provide your own repro URL -->

#### Steps to Reproduce
<!--
Expand Down
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ before_script:
- npm install -g bower gulp-cli@1
- bower install
- gulp lint-eslint
- gulp update-types
- git diff --exit-code
script:
- xvfb-run wct
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'windows 10/microsoftedge@14' -s 'windows 10/microsoftedge@15' -s 'windows 8.1/internet explorer@11' -s 'os x 10.11/safari@9' -s 'macos 10.12/safari@10' -s 'macos 10.12/safari@11' -s 'Linux/chrome@41'; fi
- wct -l chrome -l firefox
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then travis_wait 30 ./util/travis-sauce-test.sh; fi
env:
global:
- secure: bfF/o1ewpOxDNqTzWfvlwgRgGfP8OXhSQLLdEwZ6izO9tckMJuSNghk3qBXCEQJwTcUEyXP6EqfzIrRAvDXPa0H3OoinbrooDyV2wIDaVRK++WR2iZIqzqo3hGOdzm4tdrGJZe5av5Rk661Hls8aPfLbjdzcGuYXi8B4wZq2xMI=
Expand Down
354 changes: 354 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

43 changes: 20 additions & 23 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Beyond GitHub, we try to have a variety of different lines of communication open

Because of the component-based nature of the Polymer project, we tend to have lots of different repositories. Our main repository for the Polymer library itself is at [github.com/Polymer/polymer](https://github.com/polymer/polymer). File any issues or pull requests that have to do with the core library on that repository, and we'll take a look ASAP.

We keep all of the element "product lines" that the Polymer team maintains and distributes in the [PolymerElements](https://github.com/polymerelements) organization. For any element-specific issues or pull requests, file directly on the element's repository, such as the `paper-button` repository at [github.com/polymerelements/paper-button](https://github.com/polymerelements/paper-button). Of course, the elements built by the Polymer team are just a tiny fraction of all the Polymer-based elements out there - catalogs of other web components include [customelements.io](http://www.customelements.io) and [component.kitchen](http://component.kitchen).
We keep all of the element "product lines" that the Polymer team maintains and distributes in the [PolymerElements](https://github.com/polymerelements) organization. For any element-specific issues or pull requests, file directly on the element's repository, such as the `paper-button` repository at [github.com/polymerelements/paper-button](https://github.com/polymerelements/paper-button). Of course, the elements built by the Polymer team are just a tiny fraction of all the Polymer-based elements out there - catalogs of other web components include [https://www.webcomponents.org/](https://github.com/webcomponents/webcomponents.org) and [component.kitchen](https://component.kitchen).

The GoogleWebComponents element product line is maintained by teams all across Google, and so is kept in a separate organization: the [GoogleWebComponents](https://github.com/googlewebcomponents) org. Feel free to file issues and PR's on those elements directly in that organization.

Expand All @@ -42,7 +42,7 @@ If you find an issue, please do file it on the repository. The [Polymer/polymer

For issues with elements the team maintains, please file directly on the element's repository. If you're not sure if a bug stems from the element or the library, air toward filing it on the element and we'll move the issue if necessary.

Please file issues using the issue template provided, filling out as many fields as possible. We love examples for addressing issues - issues with a Plunkr, jsFiddle, or jsBin will be much easier for us to work on quickly. You can start with [this jsbin](http://jsbin.com/luhaxab/edit) which sets up the basics to demonstrate a Polymer element.
Please file issues using the issue template provided, filling out as many fields as possible. We love examples for addressing issues - issues with a jsBin, Plunkr, jsFiddle, or glitch.me repro will be much easier for us to work on quickly. You can start with [this jsbin](http://jsbin.com/luhaxab/edit) which sets up the basics to demonstrate a Polymer element. If you need your repro to run in IE11, you can start from [this glitch](https://glitch.com/edit/#!/polymer-repro?path=my-element.html:2:0), which serves the source via polyserve for automatic transpilation, although you must sign up for a glitch.me account to ensure your code persists for more than 5 days (note the glitch.me _editing environment_ is not compatible with IE11, however the "live" view link of the running code should work).

Occasionally we'll close issues if they appear stale or are too vague - please don't take this personally! Please feel free to re-open issues we've closed if there's something we've missed and they still need to be addressed.

Expand Down Expand Up @@ -71,7 +71,7 @@ All elements should follow the [Polymer element style guide](http://polymereleme

We follow the most common javascript and HTML style guidelines for how we structure our code - in general, look at the code and you'll know how to contribute! If you'd like a bit more structure, the [Google JavaScript Styleguide](https://google.github.io/styleguide/javascriptguide.xml) is a good place to start.

Polymer also participates in Google's [Patch Rewards Program](http://www.google.com/about/appsecurity/patch-rewards/), where you can earn cold, hard cash for qualifying security patches to the Polymer library. Visit the [patch rewards page](http://www.google.com/about/appsecurity/patch-rewards/) to find out more.
Polymer also participates in Google's [Patch Rewards Program](https://www.google.com/about/appsecurity/patch-rewards/), where you can earn cold, hard cash for qualifying security patches to the Polymer library. Visit the [patch rewards page](https://www.google.com/about/appsecurity/patch-rewards/) to find out more.

## Unit tests

Expand All @@ -90,15 +90,15 @@ To run the Polymer library unit tests:

2. Install the dependencies:

npm install && bower install
npm install && bower install

3. Run the tests:

npm test
npm test

Or if you have `web-component-tester` installed locally:

wct
wct

To run individual test suites:

Expand All @@ -110,45 +110,42 @@ Or:

For example:

npm test test/unit/template.html
npm test test/unit/template.html

You can also run tests in the browser:

polyserve
polyserve

Navigate to:

[`http://localhost:8080/components/polymer/test/runner.html`](http://localhost:8080/components/polymer/test/runner.html)

### Running Polymer element unit tests

To run the element unit tests, you need a global
install of `web-component-tester` or `polyserve` (or both).
To run the element unit tests, you need a global install of `web-component-tester` or `polyserve` (or both).

1. Clone the element repo.
1. Clone the element repo.

2. Install the dependencies.
1. Install the dependencies.

bower install
bower install

3. Run the tests:
1. Run the tests:

wct
wct

Or run the tests in a browser:
Or run the tests in a browser:

polyserve
polyserve

Navigate to:
Navigate to:

<code>http://localhost:8080/components/<var>element-name</var>/test/runner.html</code>
<code>http://localhost:8080/components/<var>element-name</var>/test/runner.html</code>

### Configuring `web-component-tester`

By default, `web-component-tester` runs tests on all installed browsers. You can configure it
to run tests on a subset of available browsers, or to run tests remotely using Sauce Labs.

See the [`web-component-tester` README](https://github.com/Polymer/web-component-tester) for
information on configuring the tool.


See the [`web-component-tester` README](https://github.com/Polymer/web-component-tester) for
information on configuring the tool.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ Polymer 2.0 elements will stamp their templates into shadow roots created using
#### Scoped styling

* <a name="breaking-styling-content"></a>`::content` CSS pseudo-selectors must be changed to `::slotted`, and may only target immediate children and use no descendant selectors
* <a name="breaking-styling-host-context"></a>`:host-context()` pseudo-selectors have been removed. These were primarily useful for writing bidi rules (e.g. `:host-context([dir=rtl])`); these should be replaced with the [new `:dir(rtl)` selector](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir), which we plan to polyfill in the [styling shim](https://github.com/webcomponents/shadycss) soon
* <a name="breaking-styling-host-context"></a>`:host-context()` pseudo-selectors have been removed. These were primarily useful for writing bi-directional rules (e.g. `:host-context([dir=rtl])`); these should be replaced with the [new `:dir(rtl)` selector](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir), which we plan to polyfill in the [styling shim](https://github.com/webcomponents/shadycss) soon
* <a name="breaking-deep"></a>The previously deprecated `/deep/` and `::shadow` selectors have been completely removed from V1 native support and must not be used (use [CSS custom properties](https://www.polymer-project.org/1.0/docs/devguide/styling#custom-css-properties) to customize styling instead)

#### Scoped events
Expand Down Expand Up @@ -462,7 +462,7 @@ Polymer 2.0 will continue to use a [shim](https://github.com/webcomponents/shady
* `@apply(--foo)`
* Should be `@apply --foo;`
* <a name="breaking-customStyle"></a>`element.customStyle` as an object that can be assigned to has been removed; use `element.updateStyles({...})` instead.
* <a name="breaking-style-location"></a>`<style>` inside of a `<dom-module>`, but outside of `<template>` is no longer supported
* <a name="breaking-style-location"></a>`<style>` inside of a `<dom-module>`, but outside of `<template>` is no longer supported.
### Data system
* <a name="breaking-data-init"></a>An element's template is not stamped & data system not initialized (observers, bindings, etc.) until the element has been connected to the main document. This is a direct result of the V1 changes that prevent reading attributes in the constructor.
Expand All @@ -476,7 +476,7 @@ Polymer 2.0 will continue to use a [shim](https://github.com/webcomponents/shady
* <a name="breaking-method-args"></a>Multi-property observers, computed methods, and computed bindings are now called once at initialization if any arguments are defined (and will see `undefined` for any undefined arguments). As such, the [1.x rule requiring all properties of a multi-property observer to be defined](https://www.polymer-project.org/1.0/docs/devguide/observers#multi-property-observers) no longer applies, as this was a major source of confusion and unintended consequences. Subsequently setting multi-property method arguments will cause the method to be called once for each property changed via accessors, or once per batch of changes via `setProperties({...})`.
* <a name="breaking-dynamic-functions"> Declaring a method name used as an observer or computing function in the `properties` block causes the method property itself to become a dependency for any effects it is used in, meaning the effect for that method will run whenever the method is set, similar to 1.x. However, due to removing the `undefined` rule noted above, in 2.x if such a method exists when the element is created, it will run with initial values of arguments, even in the case some or all arguments are `undefined`.
* <a name="breaking-binding-notifications">‘notify’ events are no longer fired when value changes _as result of binding from host_, as a major performance optimization over 1.x behavior. Use cases such as `<my-el foo="{{bar}}" on-foo-changed="fooChanged">` are no longer supported. In this case you should simply user a `bar` observer in the host. Use cases such as dynamically adding a `property-changed` event listener on for properties bound by an element's host by an actor other than the host are no longer supported.
* <a name="breaking-properties-deserialization"></a>In order for a property to be deserialized from its attribute, it must be declared in the `properties` metadata object
* <a name="breaking-properties-deserialization"></a>In order for a property to be deserialized from its attribute, it must be declared in the `properties` metadata object.
* <a name="breaking-collection"></a>The `Polymer.Collection` and associated key-based path and splice notification for arrays has been eliminated. See [explanation here](https://github.com/Polymer/polymer/pull/3970#issue-178203286) for more details.
* <a name="feature-mutable-data"></a>While not a breaking change, Polymer now ships with a `Polymer.MutableData` mixin (and legacy `Polymer.MutableDataBehavior` behavior) to provide more options for managing data. By default, `Polymer.PropertyEffects` performs strict dirty checking on objects, which means that any deep modifications to an object or array will not be propagated unless "immutable" data patterns are used (i.e. all object references from the root to the mutation were changed). Polymer also provides a proprietary data mutation and path notification API (e.g. `notifyPath`, `set`, and array mutation API's) that allow efficient mutation and notification of deep changes in an object graph to all elements bound to the same object graph. In cases where neither immutable patterns or the data mutation API can be used, applying this mixin will cause Polymer to skip dirty checking for objects and arrays and always consider them to be "dirty". This allows a user to make a deep modification to a bound object graph, and then either simply re-set the object (e.g. `this.items = this.items`) or call `notifyPath` (e.g. `this.notifyPath('items')`) to update the tree. Note that all elements that wish to be updated based on deep mutations must apply this mixin or otherwise skip strict dirty checking for objects/arrays.
Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"url": "https://github.com/Polymer/polymer.git"
},
"dependencies": {
"shadycss": "webcomponents/shadycss#^v1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^v1.0.2"
"shadycss": "webcomponents/shadycss#^v1.1.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^v1.0.19"
},
"devDependencies": {
"web-component-tester": "^v6.0.0",
"web-component-tester": "^6.0.0",
"test-fixture": "PolymerElements/test-fixture#3.0.0-rc.1"
},
"private": true,
Expand Down
Loading

0 comments on commit a06759a

Please sign in to comment.