add critic rating column

This commit is contained in:
Luke Pulverenti 2016-03-24 22:54:38 -04:00
parent ef206ec9a5
commit fbd1d13138
12 changed files with 92 additions and 60 deletions

View file

@ -1,6 +1,6 @@
{
"name": "iron-menu-behavior",
"version": "1.1.4",
"version": "1.1.5",
"description": "Provides accessible menu behavior",
"authors": "The Polymer Authors",
"keywords": [
@ -34,11 +34,11 @@
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.1.4",
"_release": "1.1.5",
"_resolution": {
"type": "version",
"tag": "v1.1.4",
"commit": "637c4ae4654b53d4ca29ba97239c1ffba13cfc93"
"tag": "v1.1.5",
"commit": "e17b3bdb124e42202d50e7c60b0cf02d9bcb201d"
},
"_source": "git://github.com/polymerelements/iron-menu-behavior.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,33 @@
<!-- Instructions: https://github.com/PolymerElements/iron-menu-behavior/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The page turns pink. -->
### Live Demo
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
### Steps to reproduce
<!-- Example
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
3. Click the `paper-foo` element.
-->
### Browsers Affected
<!-- Check all that apply -->
- [ ] Chrome
- [ ] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [ ] Edge
- [ ] IE 11
- [ ] IE 10

View file

@ -1,6 +1,6 @@
{
"name": "iron-menu-behavior",
"version": "1.1.4",
"version": "1.1.5",
"description": "Provides accessible menu behavior",
"authors": "The Polymer Authors",
"keywords": [

View file

@ -77,6 +77,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @param {string|number} value the value to select.
*/
select: function(value) {
// Cancel automatically focusing a default item if the menu received focus
// through a user action selecting a particular item.
if (this._defaultFocusAsync) {
this.cancelAsync(this._defaultFocusAsync);
this._defaultFocusAsync = null;
@ -247,8 +249,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
return;
}
this.blur();
// clear the cached focus item
this._defaultFocusAsync = this.async(function() {
// focus the selected item when the menu receives focus, or the first item
@ -259,11 +259,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
if (selectedItem) {
this._setFocusedItem(selectedItem);
} else {
} else if (this.items[0]) {
this._setFocusedItem(this.items[0]);
}
// async 1ms to wait for `select` to get called from `_itemActivate`
}, 1);
});
},
/**

View file

@ -46,7 +46,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="nested">
<template>
<test-menu>
@ -59,10 +58,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="empty">
<template>
<test-menu></test-menu>
</template>
</test-fixture>
<script>
suite('menu a11y tests', function() {
test('menu has role="menu"', function() {
var menu = fixture('basic');
assert.equal(menu.getAttribute('role'), 'menu', 'has role="menu"');
@ -71,65 +74,60 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
test('first item gets focus when menu is focused', function(done) {
var menu = fixture('basic');
MockInteractions.focus(menu);
setTimeout(function() {
Polymer.Base.async(function() {
var ownerRoot = Polymer.dom(menu.firstElementChild).getOwnerRoot() || document;
var activeElement = Polymer.dom(ownerRoot).activeElement;
assert.equal(activeElement, menu.firstElementChild, 'menu.firstElementChild is focused');
done();
// wait for async in _onFocus
}, 200);
});
});
test('selected item gets focus when menu is focused', function(done) {
var menu = fixture('basic');
menu.selected = 1;
MockInteractions.focus(menu);
setTimeout(function() {
Polymer.Base.async(function() {
var ownerRoot = Polymer.dom(menu.selectedItem).getOwnerRoot() || document;
var activeElement = Polymer.dom(ownerRoot).activeElement;
assert.equal(activeElement, menu.selectedItem, 'menu.selectedItem is focused');
done();
// wait for async in _onFocus
}, 200);
});
});
test('focusing non-item content does not auto-focus an item', function(done) {
var menu = fixture('basic');
menu.extraContent.focus();
setTimeout(function() {
Polymer.Base.async(function() {
var menuOwnerRoot = Polymer.dom(menu.extraContent).getOwnerRoot() || document;
var menuActiveElement = Polymer.dom(menuOwnerRoot).activeElement;
assert.equal(menuActiveElement, menu.extraContent, 'menu.extraContent is focused');
assert.equal(Polymer.dom(document).activeElement, menu, 'menu is document.activeElement');
done();
// wait for async in _onFocus
}, 200);
});
});
test('last activated item in a multi select menu is focused', function(done) {
var menu = fixture('multi');
menu.selected = 0;
menu.items[1].click();
setTimeout(function() {
Polymer.Base.async(function() {
var ownerRoot = Polymer.dom(menu.items[1]).getOwnerRoot() || document;
var activeElement = Polymer.dom(ownerRoot).activeElement;
assert.equal(activeElement, menu.items[1], 'menu.items[1] is focused');
done();
// wait for async in _onFocus
}, 200);
});
});
test('deselection in a multi select menu focuses deselected item', function(done) {
var menu = fixture('multi');
menu.selected = 0;
menu.items[0].click();
setTimeout(function() {
Polymer.Base.async(function() {
var ownerRoot = Polymer.dom(menu.items[0]).getOwnerRoot() || document;
var activeElement = Polymer.dom(ownerRoot).activeElement;
assert.equal(activeElement, menu.items[0], 'menu.items[0] is focused');
done();
// wait for async in _onFocus
}, 200);
});
});
test('keyboard events should not bubble', function(done) {
@ -155,16 +153,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// esc
MockInteractions.keyDownOn(menu.firstElementChild, 27);
setTimeout(function() {
Polymer.Base.async(function() {
assert.equal(menu.firstElementChild.tagName, 'TEST-MENU');
assert.equal(keyCounter, 0);
done();
}, 200);
});
});
});
test('empty menus don\'t unfocus themselves', function(done) {
var menu = fixture('empty');
menu.focus();
Polymer.Base.async(function() {
assert.equal(Polymer.dom(document).activeElement, menu);
done();
});
});
});
</script>
</body>
</html>

View file

@ -69,57 +69,52 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
test('first item gets focus when menubar is focused', function(done) {
var menubar = fixture('basic');
MockInteractions.focus(menubar);
setTimeout(function() {
Polymer.Base.async(function() {
assert.equal(Polymer.dom(document).activeElement, menubar.firstElementChild, 'document.activeElement is first item')
done();
// wait for async in _onFocus
}, 200);
});
});
test('selected item gets focus when menubar is focused', function(done) {
var menubar = fixture('basic');
menubar.selected = 1;
MockInteractions.focus(menubar);
setTimeout(function() {
Polymer.Base.async(function() {
assert.equal(Polymer.dom(document).activeElement, menubar.selectedItem, 'document.activeElement is selected item');
done();
// wait for async in _onFocus
}, 200);
});
});
test('focusing non-item content does not auto-focus an item', function(done) {
var menubar = fixture('basic');
menubar.extraContent.focus();
setTimeout(function() {
Polymer.Base.async(function() {
var ownerRoot = Polymer.dom(menubar.extraContent).getOwnerRoot() || document;
var activeElement = Polymer.dom(ownerRoot).activeElement;
assert.equal(activeElement, menubar.extraContent, 'menubar.extraContent is focused');
assert.equal(Polymer.dom(document).activeElement, menubar, 'menubar is document.activeElement');
done();
// wait for async in _onFocus
}, 200);
});
});
test('last activated item in a multi select menubar is focused', function(done) {
var menubar = fixture('multi');
menubar.selected = 0;
menubar.items[1].click();
setTimeout(function() {
Polymer.Base.async(function() {
assert.equal(Polymer.dom(document).activeElement, menubar.items[1], 'document.activeElement is last activated item');
done();
// wait for async in _onFocus
}, 200);
});
});
test('deselection in a multi select menubar focuses deselected item', function(done) {
var menubar = fixture('multi');
menubar.selected = 0;
menubar.items[0].click();
setTimeout(function() {
Polymer.Base.async(function() {
assert.equal(Polymer.dom(document).activeElement, menubar.items[0], 'document.activeElement is last activated item');
done();
// wait for async in _onFocus
}, 200);
});
});
suite('left / right keys are reversed when the menubar has RTL directionality', function() {

View file

@ -1,6 +1,6 @@
{
"name": "iron-overlay-behavior",
"version": "1.5.2",
"version": "1.5.3",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Provides a behavior for making an element an overlay",
"private": true,
@ -35,11 +35,11 @@
},
"ignore": [],
"homepage": "https://github.com/polymerelements/iron-overlay-behavior",
"_release": "1.5.2",
"_release": "1.5.3",
"_resolution": {
"type": "version",
"tag": "v1.5.2",
"commit": "740705930a3d30c8381e75f379aeea5eae89847b"
"tag": "v1.5.3",
"commit": "49d4c3fb1525aa14911cbda46f0997641c93bbe0"
},
"_source": "git://github.com/polymerelements/iron-overlay-behavior.git",
"_target": "^1.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "iron-overlay-behavior",
"version": "1.5.2",
"version": "1.5.3",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Provides a behavior for making an element an overlay",
"private": true,

View file

@ -329,7 +329,7 @@ context. You should place this element as a child of `<body>` whenever possible.
this._renderClosed();
}
this._openChangedAsync = null;
}, 1);
});
},
_canceledChanged: function() {

View file

@ -54,7 +54,7 @@
"tag": "v1.1.10",
"commit": "d8e201099b4b2987bea1dbcf5804c0383544bbfd"
},
"_source": "git://github.com/PolymerElements/paper-input.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/paper-input"
"_source": "git://github.com/polymerelements/paper-input.git",
"_target": "^1.0.9",
"_originalSource": "polymerelements/paper-input"
}

View file

@ -490,8 +490,8 @@ paper-dropdown-menu {
display: block;
}
paper-dialog paper-radio-group paper-radio-button {
padding: 6px 12px;
paper-radio-group > * {
padding: .5em;
}
.likePaperText {

View file

@ -9,7 +9,7 @@
<a href="#" data-role="button" onclick="Dashboard.navigate('userparentalcontrol.html', true);">${TabParentalControl}</a>
<a href="#" data-role="button" onclick="Dashboard.navigate('userpassword.html', true);">${TabPassword}</a>
</div>
<p class="lnkEditUserPreferencesContainer">
<p class="lnkEditUserPreferencesContainer hide">
<a class="lnkEditUserPreferences" href="#" target="_blank">${ButtonEditOtherUserPreferences}</a>
</p>
<form class="editUserProfileForm">