1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-02-18 13:20:10 -05:00
parent 02e924e3c5
commit 05b25af69f
55 changed files with 1554 additions and 907 deletions

View file

@ -1,6 +1,6 @@
{
"name": "iron-resizable-behavior",
"version": "1.0.2",
"version": "1.0.3",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Coordinates the flow of resizeable elements",
"private": true,
@ -24,15 +24,16 @@
"devDependencies": {
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"ignore": [],
"homepage": "https://github.com/polymerelements/iron-resizable-behavior",
"_release": "1.0.2",
"_release": "1.0.3",
"_resolution": {
"type": "version",
"tag": "v1.0.2",
"commit": "85de8ba28be2bf17c81d6436ef1119022b003674"
"tag": "v1.0.3",
"commit": "dda1df6aaf452aedf3e52ff0cf69e72439452216"
},
"_source": "git://github.com/polymerelements/iron-resizable-behavior.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,25 @@
language: node_js
sudo: false
before_script:
- npm install -g bower polylint web-component-tester
- bower install
- polylint
env:
global:
- secure: fs6PoLBRc5z3vn6PWJTkxmGWTHnHVcXx2c7sb7wUlLFLjWUegb93X5gAUhAQvvLvFYT8uMYxT7sNsP15O16CH9OWS8h6ZbgaPp61zRJXvGN+pOtohOloanjzANzsYNFsV3LKEFg8/BULqQAKkRAdsg4hXfMWDzPvCGl1++y5mGc=
- secure: gm+c5R0tFY/GJfKOnfV3J0IADe7QSzo5wZvRq4wZnroK9gBixuI66fq0dhRFtMjkc3dip1h+iqwmRqY8bKoMriCcl8J8ya7mG92sUTz57H7Sr6hxoYDdT4v+JUrQ+iZmTczh77IAQDZrAnxQIeEnBsLezidZD4b+EAYCICvL9WE=
- CXX=g++-4.8
node_js: stable
addons:
firefox: latest
apt:
sources:
- google-chrome
- ubuntu-toolchain-r-test
packages:
- google-chrome-stable
- g++-4.8
sauce_connect: true
script:
- xvfb-run wct
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"

View file

@ -0,0 +1,77 @@
<!--
This file is autogenerated based on
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
If you edit that file, it will get updated everywhere else.
If you edit this file, your changes will get overridden :)
You can however override the jsbin link with one that's customized to this
specific element:
jsbin=https://jsbin.com/cagaye/edit?html,output
-->
# Polymer Elements
## Guide for Contributors
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
### Filing Issues
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
1. **Who will use the feature?** _“As someone filling out a form…”_
2. **When will they use the feature?** _“When I enter an invalid value…”_
3. **What is the users goal?** _“I want to be visually notified that the value needs to be corrected…”_
**If you are filing an issue to report a bug**, please provide:
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
```markdown
The `paper-foo` element causes the page to turn pink when clicked.
## Expected outcome
The page stays the same color.
## Actual outcome
The page turns pink.
## Steps to reproduce
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
3. Click the `paper-foo` element.
```
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
### Submitting Pull Requests
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
When submitting pull requests, please provide:
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
```markdown
(For a single issue)
Fixes #20
(For multiple issues)
Fixes #32, fixes #40
```
2. **A succinct description of the design** used to fix any related issues. For example:
```markdown
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
```
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so dont be afraid to ask us if you need help with that!

View file

@ -1,6 +1,6 @@
{
"name": "iron-resizable-behavior",
"version": "1.0.2",
"version": "1.0.3",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Coordinates the flow of resizeable elements",
"private": true,
@ -24,7 +24,8 @@
"devDependencies": {
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}
},
"ignore": []
}

View file

@ -17,11 +17,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* size or hidden state of their children) and "resizables" (elements that need to be
* notified when they are resized or un-hidden by their parents in order to take
* action on their new measurements).
*
* Elements that perform measurement should add the `IronResizableBehavior` behavior to
* their element definition and listen for the `iron-resize` event on themselves.
* This event will be fired when they become showing after having been hidden,
* when they are resized explicitly by another resizable, or when the window has been
* resized.
*
* Note, the `iron-resize` event is non-bubbling.
*
* @polymerBehavior Polymer.IronResizableBehavior

View file

@ -82,7 +82,7 @@ Notes on Polyfill compatibility in tests:
suite('x-resizer-parent', function() {
test('notify resizables from window', function(done) {
test('notify resizables from window', function() {
var listeners = [
ListenForResize(testEl.$.parent),
ListenForResize(testEl.$.child1a),
@ -91,22 +91,13 @@ Notes on Polyfill compatibility in tests:
ListenForResize(testEl.$.shadow1d.$.resizable)
];
setTimeout(function() {
try {
window.dispatchEvent(new CustomEvent('resize', { bubbles: false }));
window.dispatchEvent(new CustomEvent('resize', { bubbles: false }));
expect(pendingNotifications).to.be.eql(0);
expect(pendingNotifications).to.be.eql(0);
RemoveListeners(listeners);
done();
} catch (e) {
done(e);
}
}, 0);
RemoveListeners(listeners);
});
test('notify resizables from parent', function(done) {
test('notify resizables from parent', function() {
var listeners = [
ListenForResize(testEl.$.parent),
ListenForResize(testEl.$.child1a),
@ -115,43 +106,33 @@ Notes on Polyfill compatibility in tests:
ListenForResize(testEl.$.shadow1d.$.resizable)
];
setTimeout(function() {
try {
testEl.$.parent.notifyResize();
expect(pendingNotifications).to.be.eql(0);
RemoveListeners(listeners);
done();
} catch (e) {
done(e);
}
}, 0);
testEl.$.parent.notifyResize();
expect(pendingNotifications).to.be.eql(0);
RemoveListeners(listeners);
});
test('detach resizables then notify parent', function(done) {
var listeners = [
ListenForResize(testEl.$.parent),
ListenForResize(testEl.$.child1a, false),
ListenForResize(testEl.$.child1b),
ListenForResize(testEl.$.shadow1c.$.resizable, false),
ListenForResize(testEl.$.shadow1d.$.resizable)
];
test('detach resizables then notify parent', function() {
sinon.spy(testEl.$.child1a, 'notifyResize');
sinon.spy(testEl.$.shadow1c.$.resizable, 'notifyResize');
sinon.spy(testEl.$.child1b, 'notifyResize');
sinon.spy(testEl.$.shadow1d.$.resizable, 'notifyResize');
var el = Polymer.dom(testEl.root).querySelector('#child1a');
var firstElementToRemove = testEl.$.child1a;
var firstElementParent = Polymer.dom(firstElementToRemove).parentNode;
var secondElementToRemove = testEl.$.shadow1c.$.resizable;
var secondElementParent = Polymer.dom(secondElementToRemove).parentNode;
el.parentNode.removeChild(el);
el = Polymer.dom(testEl.root).querySelector('#shadow1c');
el.parentNode.removeChild(el);
Polymer.dom(firstElementParent).removeChild(firstElementToRemove);
Polymer.dom(secondElementParent).removeChild(secondElementToRemove);
setTimeout(function() {
try {
testEl.$.parent.notifyResize();
expect(pendingNotifications).to.be.eql(0);
RemoveListeners(listeners);
done();
} catch (e) {
done(e);
}
}, 0);
Polymer.dom.flush();
testEl.$.parent.notifyResize();
expect(testEl.$.child1a.notifyResize.callCount).to.be.equal(0);
expect(testEl.$.shadow1c.$.resizable.notifyResize.callCount).to.be.equal(0);
expect(testEl.$.child1b.notifyResize.callCount).to.be.equal(1);
expect(testEl.$.shadow1d.$.resizable.notifyResize.callCount).to.be.equal(1);
});
test('detach parent then notify window', function(done) {
@ -183,7 +164,7 @@ Notes on Polyfill compatibility in tests:
suite('x-resizer-parent-filtered', function() {
test('notify resizables from window', function(done) {
test('notify resizables from window', function() {
var listeners = [
ListenForResize(testEl.$.parentFiltered),
ListenForResize(testEl.$.child2a),
@ -194,19 +175,12 @@ Notes on Polyfill compatibility in tests:
testEl.$.parentFiltered.active = testEl.$.child2a;
setTimeout(function() {
try {
window.dispatchEvent(new CustomEvent('resize', { bubbles: false }));
expect(pendingNotifications).to.be.eql(0);
RemoveListeners(listeners);
done();
} catch (e) {
done(e);
}
}, 0);
window.dispatchEvent(new CustomEvent('resize', { bubbles: false }));
expect(pendingNotifications).to.be.eql(0);
RemoveListeners(listeners);
});
test('notify resizables from parent', function(done) {
test('notify resizables from parent', function() {
var listeners = [
ListenForResize(testEl.$.parentFiltered),
ListenForResize(testEl.$.child2a),
@ -217,19 +191,12 @@ Notes on Polyfill compatibility in tests:
testEl.$.parentFiltered.active = testEl.$.child2a;
setTimeout(function() {
try {
testEl.$.parentFiltered.notifyResize();
expect(pendingNotifications).to.be.eql(0);
RemoveListeners(listeners);
done();
} catch (e) {
done(e);
}
}, 0);
testEl.$.parentFiltered.notifyResize();
expect(pendingNotifications).to.be.eql(0);
RemoveListeners(listeners);
});
test('detach resizables then notify parent', function(done) {
test('detach resizables then notify parent', function() {
var listeners = [
ListenForResize(testEl.$.parentFiltered),
ListenForResize(testEl.$.child2a, false),
@ -245,16 +212,9 @@ Notes on Polyfill compatibility in tests:
testEl.$.parentFiltered.active = testEl.$.shadow2d.$.resizable;
setTimeout(function() {
try {
testEl.$.parentFiltered.notifyResize();
expect(pendingNotifications).to.be.eql(0);
RemoveListeners(listeners);
done();
} catch (e) {
done(e);
}
}, 0);
testEl.$.parentFiltered.notifyResize();
expect(pendingNotifications).to.be.eql(0);
RemoveListeners(listeners);
});
});
});

View file

@ -1,5 +1,4 @@
<!doctype html>
<!--
<!DOCTYPE html><!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@ -7,10 +6,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
--><html><head>
<meta charset="utf-8">
<title>Tests</title>
@ -20,13 +16,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<body>
<script>
WCT.loadSuites([
'basic.html',
'iron-resizable-behavior.html'
'iron-resizable-behavior.html',
'basic.html?dom=shadow',
'iron-resizable-behavior.html?dom=shadow'
]);
</script>
</body>
</html>
</body></html>

View file

@ -74,6 +74,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
suite('window\'s resize', function() {
test('causes all iron-resize events to fire once', function() {
window.dispatchEvent(new CustomEvent('resize'));
Polymer.dom.flush();
expect(resizable.ironResizeCount).to.be.equal(2);
expect(resizable.$.childResizable1.ironResizeCount).to.be.equal(2);
expect(resizable.$.childResizable2.ironResizeCount).to.be.equal(2);