Skip to content

Commit 24b44b5

Browse files
authored
Merge pull request #16 from Download/upgrade-to-1.8.0
1.8.0: Upgrade to Polymer 1.8.0 Fixes #15
2 parents 2773add + 38a5838 commit 24b44b5

File tree

525 files changed

+96017
-25385
lines changed

Some content is hidden

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

525 files changed

+96017
-25385
lines changed

Diff for: README.md

+793-793
Large diffs are not rendered by default.

Diff for: bower.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "polymer-cdn",
3-
"version": "1.7.0.2",
3+
"version": "1.8.0",
44
"main": "polymer.js",
55
"homepage": "https://github.com/Download/polymer-cdn",
66
"authors": [
@@ -30,10 +30,6 @@
3030
"app-elements": "polymerelements/app-elements#latest",
3131
"google-web-components": "GoogleWebComponents/google-web-components#latest",
3232
"molecules": "polymerelements/molecules#latest",
33-
"polymerfire": "firebase/polymerfire#0.10.2"
34-
},
35-
"resolutions": {
36-
"polymerfire": "0.10.2",
37-
"firebase": ">= 3.5.1 < 4.0"
33+
"polymerfire": "firebase/polymerfire#latest"
3834
}
3935
}

Diff for: lib/app-elements/.bower.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "app-elements",
3-
"version": "0.10.0",
3+
"version": "0.10.1",
44
"homepage": "https://github.com/PolymerElements/app-elements",
55
"authors": [
66
"The Polymer Authors"
@@ -11,7 +11,8 @@
1111
"keywords": [
1212
"web-components",
1313
"polymer",
14-
"app"
14+
"app",
15+
"element-collection"
1516
],
1617
"license": "http://polymer.github.io/LICENSE.txt",
1718
"private": true,
@@ -24,16 +25,16 @@
2425
],
2526
"dependencies": {
2627
"app-layout": "PolymerElements/app-layout#^0.10.0",
27-
"app-localize-behavior": "PolymerElements/app-localize-behavior#^0.9.0",
28+
"app-localize-behavior": "PolymerElements/app-localize-behavior#^0.10.0",
2829
"app-pouchdb": "PolymerElements/app-pouchdb#^0.9.0",
2930
"app-route": "PolymerElements/app-route#^0.9.0",
3031
"app-storage": "PolymerElements/app-storage#^0.9.0"
3132
},
32-
"_release": "0.10.0",
33+
"_release": "0.10.1",
3334
"_resolution": {
3435
"type": "version",
35-
"tag": "v0.10.0",
36-
"commit": "75855bc1478e03442376250b3d01c0cfc92fd8b5"
36+
"tag": "v0.10.1",
37+
"commit": "e06b2f179425b8b2c4361d9f54186c16d9024251"
3738
},
3839
"_source": "git://github.com/polymerelements/app-elements.git",
3940
"_target": "*",

Diff for: lib/app-elements/app-elements.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<link rel="import" href="../app-pouchdb/app-pouchdb-conflict-resolution.html">
1717
<link rel="import" href="../app-pouchdb/app-pouchdb-sync.html">
1818
<link rel="import" href="../app-storage/app-network-status-behavior.html">
19-
<link rel="import" href="../app-storage/app-localstorage-document/app-localstorage-document.html">
19+
<link rel="import" href="../app-storage/app-localstorage/app-localstorage-document.html">
2020
<link rel="import" href="../app-storage/app-indexeddb-mirror/app-indexeddb-mirror.html">
2121
<link rel="import" href="../app-route/app-location.html">
2222
<link rel="import" href="../app-route/app-route.html">

Diff for: lib/app-elements/bower.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "app-elements",
3-
"version": "0.10.0",
3+
"version": "0.10.1",
44
"homepage": "https://github.com/PolymerElements/app-elements",
55
"authors": [
66
"The Polymer Authors"
@@ -11,7 +11,8 @@
1111
"keywords": [
1212
"web-components",
1313
"polymer",
14-
"app"
14+
"app",
15+
"element-collection"
1516
],
1617
"license": "http://polymer.github.io/LICENSE.txt",
1718
"private": true,
@@ -24,7 +25,7 @@
2425
],
2526
"dependencies": {
2627
"app-layout": "PolymerElements/app-layout#^0.10.0",
27-
"app-localize-behavior": "PolymerElements/app-localize-behavior#^0.9.0",
28+
"app-localize-behavior": "PolymerElements/app-localize-behavior#^0.10.0",
2829
"app-pouchdb": "PolymerElements/app-pouchdb#^0.9.0",
2930
"app-route": "PolymerElements/app-route#^0.9.0",
3031
"app-storage": "PolymerElements/app-storage#^0.9.0"

Diff for: lib/app-layout/.bower.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "app-layout",
3-
"version": "0.10.5",
3+
"version": "0.10.7",
44
"description": "A set of layout elements for your app",
55
"authors": [
66
"The Polymer Authors"
@@ -42,11 +42,11 @@
4242
},
4343
"ignore": [],
4444
"private": true,
45-
"_release": "0.10.5",
45+
"_release": "0.10.7",
4646
"_resolution": {
4747
"type": "version",
48-
"tag": "v0.10.5",
49-
"commit": "df716eeaca72fb44608dc7032ec3c601af6e405b"
48+
"tag": "v0.10.7",
49+
"commit": "a28a9ac9e5937ac1bab83939f00256d232c91b65"
5050
},
5151
"_source": "git://github.com/PolymerElements/app-layout.git",
5252
"_target": "^0.10.0",

Diff for: lib/app-layout/.travis.yml

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
language: node_js
22
sudo: required
33
dist: trusty
4-
node_js: stable
4+
node_js: '6'
55
addons:
6-
sauce_connect: true
7-
firefox: '46.0'
6+
firefox: latest
87
apt:
98
sources:
10-
- google-chrome
9+
- google-chrome
1110
packages:
12-
- google-chrome-stable
11+
- google-chrome-stable
1312
before_script:
14-
- npm install -g bower polylint web-component-tester
15-
- bower install
13+
- npm install -g bower polylint web-component-tester
14+
- bower install
1615
script:
17-
- xvfb-run wct
18-
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'default'; fi
16+
- xvfb-run wct
17+
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s ''default''; fi'
1918
env:
2019
global:
21-
- secure: aLLRRtzSz/QImXYAEO7lBZcmp8xhXH28J6HONXOboy8H2eQmie0kAG8EIL1EYw1OMomAwawvh9BMJqhJHiLg23h6+asXdEaYefF+QDKIKh11dCZFUPJ71DAwKOLQpL+3D4iV/Wmndr4dIEGASCUdPufoBbmG1ZVY5dGkQYG8TO7mAOwzCciP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ru4iE3XW5U4+8Eg4SulLXd8DybQ3hzMIEmapPU7T/EO/xpIe1hIfVbJBY0LB4Ri5GGCK00OEDEcHSSJmubJ4usn2jitAyfztXg8BLEg8d/1BSTmAF+l7gUKgqhJ968Prc09EUdnyBPwRmnt1sPcZpDaDZuegg+y5Gx3qmWuqDAVSsHw08BbtK37ppHFRwswtRUMFOQKuOQXM74uI10BOWshONGitqKNYFvXniZxqO7Ezc/LSAfxSn278ews/KRNl/elGLgOtw92cJPXw515h56FvWb7gc1cm5WtJir2NwX7KlhHU3IPoDYq3QDKKQ63sPmUGPhCBAtfBGRDd5Os1MbcoyChpMr4osxHv03PNvQPY5hKjg2mUnb5QwMpJiEPs70CLXdx8Q7psX56RKjDHunFpXf5M4/SQIEmVFVi2PLoUymWlpvdBc=

Diff for: lib/app-layout/README.md

+70-14
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# App Layout [![Build Status](https://travis-ci.org/PolymerElements/app-layout.svg?branch=master)](https://travis-ci.org/PolymerElements/app-layout) [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://beta.webcomponents.org/element/PolymerElements/app-layout)
22

3-
[<img src="https://app-layout-assets.appspot.com/assets/docs/app-layout.png" width="300" height="210">](https://polymerelements.github.io/app-layout/)
3+
A collection of elements, along with guidelines and templates that can be used to structure your app’s layout.
44

55
<!---
66
```
7-
<custom-element-demo>
7+
<custom-element-demo height="368">
88
<template>
99
<script src="../webcomponentsjs/webcomponents-lite.min.js"></script>
1010
<link rel="import" href="app-drawer/app-drawer.html">
@@ -15,15 +15,22 @@
1515
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
1616
<link rel="import" href="../paper-progress/paper-progress.html">
1717
<style is="custom-style">
18-
body {
18+
html, body {
1919
margin: 0;
2020
font-family: 'Roboto', 'Noto', sans-serif;
2121
-webkit-font-smoothing: antialiased;
22+
background: #f1f1f1;
23+
max-height: 368px;
2224
}
2325
app-toolbar {
2426
background-color: #4285f4;
2527
color: #fff;
2628
}
29+
30+
paper-icon-button {
31+
--paper-icon-button-ink-color: white;
32+
}
33+
2734
paper-icon-button + [main-title] {
2835
margin-left: 24px;
2936
}
@@ -46,6 +53,9 @@
4653
background-color: #B0BEC5;
4754
}
4855
}
56+
sample-content {
57+
padding-top: 64px;
58+
}
4959
</style>
5060
<next-code-block></next-code-block>
5161
</template>
@@ -67,11 +77,21 @@
6777
<sample-content size="10"></sample-content>
6878
```
6979

70-
https://polymerelements.github.io/app-layout/
80+
## Install
81+
82+
```bash
83+
$ bower install PolymerElements/app-layout --save
84+
```
85+
86+
## Import
87+
88+
```html
89+
<link rel="import" href="/bower_components/app-layout/app-layout.html">
90+
```
7191

72-
For additional documentation, please check out [Responsive app layout](https://www.polymer-project.org/1.0/toolbox/app-layout).
92+
## What is inside
7393

74-
A set of layout elements for your app. It includes:
94+
### Elements
7595

7696
- [app-box](/app-box) - A container element that can have scroll effects - visual effects based on scroll position.
7797

@@ -89,14 +109,50 @@ A set of layout elements for your app. It includes:
89109

90110
- [app-toolbar](/app-toolbar) - A horizontal toolbar containing items that can be used for label, navigation, search and actions.
91111

92-
### Install
112+
### Templates
93113

94-
```bash
95-
$ bower install PolymerElements/app-layout --save
96-
```
114+
The templates are a means to define, illustrate and share best practices in App Layout. Pick a template and customize it:
97115

98-
### Import
116+
- **Getting started**
117+
([Demo](https://polymerelements.github.io/app-layout/templates/getting-started) - [Source](/templates/getting-started))
99118

100-
```html
101-
<link rel="import" href="/bower_components/app-layout/app-layout.html">
102-
```
119+
- **Landing page**
120+
([Demo](https://polymerelements.github.io/app-layout/templates/landing-page) - [Source](/templates/landing-page))
121+
122+
- **Publishing: Zuperkülblog**
123+
([Demo](https://polymerelements.github.io/app-layout/templates/publishing) - [Source](/templates/publishing))
124+
125+
- **Shop: Shrine**
126+
([Demo](https://polymerelements.github.io/app-layout/templates/shrine) - [Source](/templates/shrine))
127+
128+
- **Blog: Pesto**
129+
([Demo](https://polymerelements.github.io/app-layout/templates/pesto) - [Source](/templates/pesto))
130+
131+
- **Scroll effects: Test drive**
132+
([Demo](https://polymerelements.github.io/app-layout/templates/test-drive) - [Source](/templates/test-drive))
133+
134+
### Patterns
135+
136+
Sample code for various UI patterns:
137+
138+
- **Transform navigation:**
139+
As more screen space is available, side navigation can transform into tabs.
140+
([Demo](https://polymerelements.github.io/app-layout/patterns/transform-navigation/index.html) - [Source](/patterns/transform-navigation/x-app.html))
141+
142+
- **Expand Card:**
143+
Content cards may expand to take up more horizontal space.
144+
([Demo](https://polymerelements.github.io/app-layout/patterns/expand-card/index.html) - [Source](/patterns/expand-card/index.html))
145+
146+
## Users
147+
148+
Here are some web apps built with App Layout:
149+
150+
- [Google I/O 2016](https://events.google.com/io2016/)
151+
- [Polymer summit](https://www.polymer-project.org/summit)
152+
- [Pica](https://frankiefu.github.io/pica/)
153+
154+
## Tools and References
155+
156+
- [Responsive App Layout](https://www.polymer-project.org/1.0/toolbox/app-layout)
157+
- [Polymer App Toolbox](https://www.polymer-project.org/1.0/toolbox/)
158+
- [Material Design Adaptive UI Pattern](https://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-patterns)

Diff for: lib/app-layout/app-drawer/app-drawer.html

+26-27
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@
236236
noFocusTrap: {
237237
type: Boolean,
238238
value: false
239+
},
240+
241+
/**
242+
* Disables swiping on the drawer.
243+
*/
244+
disableSwipe: {
245+
type: Boolean,
246+
value: false
239247
}
240248
},
241249

@@ -265,14 +273,6 @@
265273
Polymer.RenderStatus.afterNextRender(this, function() {
266274
this._styleTransitionDuration(this.transitionDuration);
267275
this._boundEscKeydownHandler = this._escKeydownHandler.bind(this);
268-
this._resetDrawerState();
269-
270-
// contentContainer will transition on opened state changed, and scrim will
271-
// transition on persistent state changed when opened - these are the
272-
// transitions we are interested in.
273-
this.$.scrim.addEventListener('transitionend', this._transitionend.bind(this));
274-
this.$.contentContainer.addEventListener('transitionend', this._transitionend.bind(this));
275-
276276
this.addEventListener('keydown', this._tabKeydownHandler.bind(this))
277277

278278
// Only listen for horizontal track so you can vertically scroll inside the drawer.
@@ -353,7 +353,7 @@
353353
},
354354

355355
_track: function(event) {
356-
if (this.persistent) {
356+
if (this.persistent || this.disableSwipe) {
357357
return;
358358
}
359359

@@ -429,8 +429,9 @@
429429
}
430430

431431
if (isInEndState) {
432-
// Reset drawer state now since there will be no transitionend event.
433-
this._resetDrawerState();
432+
this.debounce('_resetDrawerState', this._resetDrawerState);
433+
} else {
434+
this.debounce('_resetDrawerState', this._resetDrawerState, this.transitionDuration);
434435
}
435436

436437
this._styleTransitionDuration(this.transitionDuration);
@@ -502,21 +503,12 @@
502503

503504
// Calculate the amount of time needed to finish the transition based on the
504505
// initial slope of the timing function.
505-
this._styleTransitionDuration(this._FLING_INITIAL_SLOPE * dx / velocity);
506+
var t = this._FLING_INITIAL_SLOPE * dx / velocity
507+
this._styleTransitionDuration(t);
506508
this._styleTransitionTimingFunction(this._FLING_TIMING_FUNCTION);
507509

508510
this._resetDrawerTranslate();
509-
},
510-
511-
_transitionend: function() {
512-
// If the drawer was flinging, we need to reset the style attributes.
513-
if (this._drawerState === this._DRAWER_STATE.FLINGING) {
514-
this._styleTransitionDuration(this.transitionDuration);
515-
this._styleTransitionTimingFunction('');
516-
this.style.visibility = '';
517-
}
518-
519-
this._resetDrawerState();
511+
this.debounce('_resetDrawerState', this._resetDrawerState, t);
520512
},
521513

522514
_styleTransitionDuration: function(duration) {
@@ -551,6 +543,14 @@
551543

552544
_resetDrawerState: function() {
553545
var oldState = this._drawerState;
546+
547+
// If the drawer was flinging, we need to reset the style attributes.
548+
if (oldState === this._DRAWER_STATE.FLINGING) {
549+
this._styleTransitionDuration(this.transitionDuration);
550+
this._styleTransitionTimingFunction('');
551+
this.style.visibility = '';
552+
}
553+
554554
if (this.opened) {
555555
this._drawerState = this.persistent ?
556556
this._DRAWER_STATE.OPENED_PERSISTENT : this._DRAWER_STATE.OPENED;
@@ -637,10 +637,9 @@
637637
},
638638

639639
_openedPersistentChanged: function() {
640-
if (this.transitionDuration === 0) {
641-
// Reset drawer state now since there will be no transitionend event.
642-
this._resetDrawerState();
643-
}
640+
// Use a debounce timer instead of transitionend since transitionend won't fire when
641+
// app-drawer is display: none.
642+
this.debounce('_resetDrawerState', this._resetDrawerState, this.transitionDuration);
644643
},
645644

646645
_MIN_FLING_THRESHOLD: 0.2,

0 commit comments

Comments
 (0)