Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements #4

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/bower_components/iron-autogrow-textarea/.bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iron-autogrow-textarea",
"version": "1.0.14",
"version": "1.0.15",
"description": "A textarea element that automatically grows with input",
"authors": [
"The Polymer Authors"
Expand Down Expand Up @@ -36,11 +36,11 @@
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.0.14",
"_release": "1.0.15",
"_resolution": {
"type": "version",
"tag": "v1.0.14",
"commit": "132b3917314c1ede8713f85fbd11c6f404670700"
"tag": "v1.0.15",
"commit": "e75057555b347185f498d400127082fb1a812bda"
},
"_source": "git:https://github.com/PolymerElements/iron-autogrow-textarea.git",
"_target": "^1.0.0",
Expand Down
25 changes: 13 additions & 12 deletions app/bower_components/iron-autogrow-textarea/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
language: node_js
sudo: required
before_script:
- npm install -g bower polylint web-component-tester
- bower install
- polylint
- npm install -g bower polylint web-component-tester
- bower install
- polylint
env:
global:
- secure: TqFz1Cdu4BtLCHYLFPES0q+6wPfCnj9bnTfven9LIU+gtek70FPDT3UlnviNwp5ob3o0sbLgsLWG5OkCsRHli+HCgPEVDazSrghfwaT9mL+h/DlM/PVB079VDdIKvZM6L7xEF0zPv7t26kljBRQcZJ81O3K7h1mNjeBj6sDXHzE=
- secure: ihYM52Uu3H7FGU+x+f+hzMcWt00B7l6GZOtxzT1xYx4hb4E9/WwXYR5z9bqN+s5p10yf3FG64zbmMTuJeBvknDpSyBt/vKP+QBBZT0hxv05GifS38hiSoYT3HBxEpwhYdpjlsSJtIbKfYGR3xIXutRzRrRKSYigcrQNX83MGWFY=
node_js: stable
- secure: >-
TqFz1Cdu4BtLCHYLFPES0q+6wPfCnj9bnTfven9LIU+gtek70FPDT3UlnviNwp5ob3o0sbLgsLWG5OkCsRHli+HCgPEVDazSrghfwaT9mL+h/DlM/PVB079VDdIKvZM6L7xEF0zPv7t26kljBRQcZJ81O3K7h1mNjeBj6sDXHzE=
- secure: >-
ihYM52Uu3H7FGU+x+f+hzMcWt00B7l6GZOtxzT1xYx4hb4E9/WwXYR5z9bqN+s5p10yf3FG64zbmMTuJeBvknDpSyBt/vKP+QBBZT0hxv05GifS38hiSoYT3HBxEpwhYdpjlsSJtIbKfYGR3xIXutRzRrRKSYigcrQNX83MGWFY=
node_js: '6'
addons:
firefox: '46.0'
firefox: latest
apt:
sources:
- google-chrome
- google-chrome
packages:
- google-chrome-stable
sauce_connect: true
- google-chrome-stable
script:
- xvfb-run wct
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'default'; fi
- xvfb-run wct
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s ''default''; fi'
dist: trusty
2 changes: 1 addition & 1 deletion app/bower_components/iron-autogrow-textarea/bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iron-autogrow-textarea",
"version": "1.0.14",
"version": "1.0.15",
"description": "A textarea element that automatically grows with input",
"authors": [
"The Polymer Authors"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,18 @@
this.$.textarea.selectionEnd = value;
},

attached: function() {
/* iOS has an arbitrary left margin of 3px that isn't present
* in any other browser, and means that the paper-textarea's cursor
* overlaps the label.
* See https://github.com/PolymerElements/paper-input/issues/468.
*/
var IS_IOS = navigator.userAgent.match(/iP(?:[oa]d|hone)/);
if (IS_IOS) {
this.$.textarea.style.marginLeft = '-3px';
}
},

/**
* Returns true if `value` is valid. The validator provided in `validator`
* will be used first, if it exists; otherwise, the `textarea`'s validity
Expand Down
8 changes: 4 additions & 4 deletions app/bower_components/iron-collapse/.bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iron-collapse",
"version": "1.2.1",
"version": "1.3.0",
"description": "Provides a collapsable container",
"authors": [
"The Polymer Authors"
Expand Down Expand Up @@ -31,11 +31,11 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"main": "iron-collapse.html",
"_release": "1.2.1",
"_release": "1.3.0",
"_resolution": {
"type": "version",
"tag": "v1.2.1",
"commit": "5f994b1ac109925f6849b134e479229a16a752db"
"tag": "v1.3.0",
"commit": "a6a66288669d59202b23125b70de3d4d91bd528e"
},
"_source": "git:https://github.com/PolymerElements/iron-collapse.git",
"_target": "^1.0.0",
Expand Down
5 changes: 2 additions & 3 deletions app/bower_components/iron-collapse/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ env:
UKNKHUjbp8O3UiVmnCmmprLR573ZXak9znhIvy0Uvxpkga7DFvfKvYRFCXQI/eV2I9YOI1FgVjlPfH8Id1NOWdMLdNjAI7G5p4FWisgu36kfat853HDYemoxx0C9nqPwakPGCJ9duL1w0dwje2sEHndk1cdwkU3TMsgkawdOJbU=
- secure: >-
cWudj1yh2mzialubEqhSHBG/CPLtI9ZeUPaI1+N3hiPzvuxqGaEbkpzEmlZrdAfuy9axCQStg88dgKRSv+TdMbcDKpzQqfClxTf9baKgrSgzVoMReY0kjHumCJz1tIVIz74ggp/gdQVFyS9CiA82pHTnxDl/drwPIHa2S8ST02U=
node_js: stable
node_js: '6'
addons:
firefox: '46.0'
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
sauce_connect: true
script:
- xvfb-run wct
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s ''default''; fi'
Expand Down
2 changes: 1 addition & 1 deletion app/bower_components/iron-collapse/bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iron-collapse",
"version": "1.2.1",
"version": "1.3.0",
"description": "Provides a collapsable container",
"authors": [
"The Polymer Authors"
Expand Down
42 changes: 21 additions & 21 deletions app/bower_components/iron-collapse/iron-collapse.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,18 @@
observer: '_openedChanged'
},

/**
* When true, the element is transitioning its opened state. When false,
* the element has finished opening/closing.
*
* @attribute transitioning
*/
transitioning: {
type: Boolean,
notify: true,
readOnly: true
},

/**
* Set noAnimation to true to disable animations.
*
Expand Down Expand Up @@ -165,12 +177,7 @@
},

listeners: {
transitionend: '_transitionEnd'
},

attached: function() {
// It will take care of setting correct classes and styles.
this._transitionEnd();
transitionend: '_onTransitionEnd'
},

/**
Expand Down Expand Up @@ -198,15 +205,13 @@
updateSize: function(size, animated) {
// Consider 'auto' as '', to take full size.
size = size === 'auto' ? '' : size;
// No change!
if (this._desiredSize === size) {
return;
}

var willAnimate = animated && !this.noAnimation &&
this.isAttached && this._desiredSize !== size;

this._desiredSize = size;

this._updateTransition(false);
var willAnimate = animated && !this.noAnimation && this._isDisplayed;
// If we can animate, must do some prep work.
if (willAnimate) {
// Animation will start at the current size.
Expand Down Expand Up @@ -262,6 +267,7 @@
this.setAttribute('aria-expanded', this.opened);
this.setAttribute('aria-hidden', !this.opened);

this._setTransitioning(true);
this.toggleClass('iron-collapse-closed', false);
this.toggleClass('iron-collapse-opened', false);
this.updateSize(this.opened ? 'auto' : '0px', true);
Expand All @@ -278,19 +284,13 @@
this.toggleClass('iron-collapse-opened', this.opened);
this._updateTransition(false);
this.notifyResize();
this._setTransitioning(false);
},

/**
* Simplistic heuristic to detect if element has a parent with display: none
*
* @private
*/
get _isDisplayed() {
var rect = this.getBoundingClientRect();
for (var prop in rect) {
if (rect[prop] !== 0) return true;
_onTransitionEnd: function(event) {
if (Polymer.dom(event).rootTarget === this) {
this._transitionEnd();
}
return false;
},

_calcSize: function() {
Expand Down
31 changes: 24 additions & 7 deletions app/bower_components/iron-collapse/test/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@

<test-fixture id="test">
<template>
<iron-collapse id="collapse" opened>
<iron-collapse opened>
<div style="height:100px;">
Lorem ipsum
</div>
</iron-collapse>
</template>
</test-fixture>

<test-fixture id="test-empty">
<template>
<iron-collapse id="collapse" opened>
</iron-collapse>
<test-fixture id="empty">
<template>
<iron-collapse opened></iron-collapse>
</template>
</test-fixture>

Expand All @@ -63,6 +62,10 @@
assert.isTrue(!collapse.noAnimation, '`noAnimation` is falsy');
});

test('not transitioning on attached', function() {
assert.isTrue(!collapse.transitioning, '`transitioning` is falsy');
});

test('horizontal attribute', function() {
assert.equal(collapse.horizontal, false);
});
Expand All @@ -75,13 +78,27 @@
collapse.opened = false;
// Animation got enabled.
assert.notEqual(collapse.style.transitionDuration, '0s');
assert.equal(collapse.transitioning, true, 'transitioning became true');
collapse.addEventListener('transitionend', function() {
// Animation disabled.
assert.equal(collapse.style.transitionDuration, '0s');
assert.equal(collapse.transitioning, false, 'transitioning became false');
done();
});
});

test('transitioning updated only during transitions between open/close states', function() {
var spy = sinon.spy();
collapse.addEventListener('transitioning-changed', spy);
collapse.noAnimation = true;
assert.equal(spy.callCount, 0, 'transitioning not affected by noAnimation');
collapse.horizontal = true;
assert.equal(spy.callCount, 0, 'transitioning not affected by horizontal');
collapse.opened = false;
assert.equal(spy.callCount, 2, 'transitioning changed twice');
assert.equal(collapse.transitioning, false, 'transitioning is false');
});

test('enableTransition(false) disables animations', function() {
collapse.enableTransition(false);
assert.isTrue(collapse.noAnimation, '`noAnimation` is true');
Expand Down Expand Up @@ -162,14 +179,14 @@
var collapse;

setup(function() {
collapse = fixture('test-empty');
collapse = fixture('empty');
});

test('empty&opened shows dynamically loaded content', function(done) {
flush(function () {
collapse.toggle();
collapse.toggle();
assert.equal(collapse.style.maxHeight, "");
assert.equal(collapse.style.maxHeight, '');
done();
});
});
Expand Down
12 changes: 12 additions & 0 deletions app/bower_components/iron-collapse/test/nested.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@
assert.equal(innerCollapse.getBoundingClientRect().height, 100);
});

test('notifyResize triggered only on element\'s animations', function(done) {
var spy = sinon.spy(outerCollapse, 'notifyResize');

outerCollapse.opened = true;
innerCollapse.opened = true;

setTimeout(function() {
assert.equal(spy.callCount, 1, 'notifyResize called once');
done();
}, 400);
});

});

suite('horizontal', function() {
Expand Down
8 changes: 4 additions & 4 deletions app/bower_components/iron-component-page/.bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"type": "git",
"url": "git:https://github.com/PolymerElements/iron-component-page.git"
},
"version": "1.1.7",
"version": "1.1.8",
"private": true,
"license": "http:https://polymer.github.io/LICENSE.txt",
"dependencies": {
Expand All @@ -36,11 +36,11 @@
"main": "iron-component-page.html",
"ignore": [],
"homepage": "https://github.com/PolymerElements/iron-component-page",
"_release": "1.1.7",
"_release": "1.1.8",
"_resolution": {
"type": "version",
"tag": "v1.1.7",
"commit": "fae66a11cdcc4091c9311867a3e5efbaa52797cf"
"tag": "v1.1.8",
"commit": "c9408d027934af35d0b3430409f97799c1b42111"
},
"_source": "git:https://github.com/PolymerElements/iron-component-page.git",
"_target": "^1.0.0",
Expand Down
13 changes: 7 additions & 6 deletions app/bower_components/iron-component-page/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ before_script:
- polylint
env:
global:
- secure: TFRxlioK3ZZiei0mBDkGWUqqsIHh03i+y46bmMarnrbinH0AtN+fYKt+VUkkFKMr34lSU42togi4h0MsxM++wn058zbU+tnHhBP70aofEFIKgJaeP2IgCuO9TIWbK5umZhqKS37wBlKor7UrGnjRGjk7CJlrwYfzWmYLtYQ1iTI=
- secure: BsHkstf+C2resrUoPg03ok//KVkUzeWMVV4eorzFdvKl48to9lEIuiWYICsc+5uKekK/OfkM7wF8rNiuc4qbRf7heVKAsG2W+/P0NS/KrKLGDu0ZSnhMUpY7Kng8Y9I6LnW3dJrr6YqZk61A2LwhZIC+IpnXicymmtDpfbsIF6M=
node_js: stable
- secure: >-
OqWtaAPVAWrMk+C50ECYQBxTBjJNnhVargB5yCMMhZdRruUV8qP64lI+rme+pPzLOOZZyjiepjvPycLxHe8ha8pW2FYxz4mpPwHjcgodEN+VypiXf7JtxfUXF2R7J6I0tI+oGlS/d9eJgl5HQmTjJqNjop6rTqCAH6tXuOo8PXs=
- secure: >-
SnvNLWCibiemlbhjr+r+lSRKZD1bbGuqGfp9kNGWDqjzMh8R2DuNNtp10vBlNDQiotkK/J9jTdq11ng1Brk2YGF/65TRI5Vj9VxfsOuKuzLAmNUlfteYFDI7PMVeeB9FcgC0b51DBXKeyNr/sD5VmUqUoIrtDfKUT1pHaMZHAjQ=
node_js: '6'
addons:
firefox: '46.0'
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
sauce_connect: true
script:
- xvfb-run wct
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s ''default''; fi'
dist: trusty
2 changes: 1 addition & 1 deletion app/bower_components/iron-component-page/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"type": "git",
"url": "git:https://github.com/PolymerElements/iron-component-page.git"
},
"version": "1.1.7",
"version": "1.1.8",
"private": true,
"license": "http:https://polymer.github.io/LICENSE.txt",
"dependencies": {
Expand Down
Loading