Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit c132494

Browse files
committed
Remove deprecated polymer-google-jsapi
1 parent 3d79f4f commit c132494

File tree

4 files changed

+21
-50
lines changed

4 files changed

+21
-50
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"speech-mic": "Polymer/speech-mic#master",
1515
"polymer-ui-animated-pages": "Polymer/polymer-ui-animated-pages#master",
1616
"polymer-animation": "Polymer/polymer-animation#master",
17-
"polymer-google-jsapi": "Polymer/polymer-google-jsapi#master",
17+
"google-apis": "Polymer/google-apis/#master",
1818
"cool-clock": "Polymer/cool-clock#master",
1919
"polymer-stock": "Polymer/polymer-stock#master",
2020
"wu-weather": "Polymer/wu-weather#master"

elements/css/pi-items-view.css

+13-17
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
* license that can be found in the LICENSE file.
55
*/
66

7-
[showing=false] {
8-
display: none;
9-
}
10-
117
#container {
128
overflow: hidden;
139
padding: 4px 0 0 4px;
@@ -47,18 +43,20 @@
4743
background-repeat: no-repeat;
4844
background-size: cover;
4945
background-position: center;
50-
height: 190px;
46+
height: 140px;
5147
}
5248

5349
.title {
5450
font-weight: normal;
55-
font-size: 18px;
51+
font-size: 14px;
5652
opacity: .8;
5753
padding: 8px;
5854
overflow: hidden;
5955
}
6056

61-
/* TODO(sorvell): not convenient to use core-align-center for this */
57+
/* TODO(sorvell): not convenient to use core-align-center for this
58+
vertically center
59+
*/
6260
.topics .title {
6361
-webkit-align-items: center;
6462
align-items: center;
@@ -68,12 +66,16 @@
6866
display: inline;
6967
}
7068

71-
.stories .image {
72-
height: 140px;
69+
.topics .image {
70+
height: 190px;
7371
}
7472

75-
.stories .title {
76-
font-size: 14px;
73+
.topics .title {
74+
font-size: 18px;
75+
}
76+
77+
.topics .source.core-h {
78+
display: none !important;
7779
}
7880

7981
.unread-count {
@@ -82,10 +84,6 @@
8284
color: #aaa;
8385
}
8486

85-
.topics .source.core-h {
86-
display: none !important;
87-
}
88-
8987
.source {
9088
font-size: 12px;
9189
opacity: .5;
@@ -110,8 +108,6 @@
110108
font-weight: 400;
111109
}
112110

113-
114-
115111
/* grid layout */
116112

117113

elements/pi-feed-viewer.html

-26
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,6 @@
1818
<template>
1919
<link rel="stylesheet" href="css/pi-feed-viewer.css">
2020

21-
<!-- <polymer-ui-animated-pages id="panels" class="feed-viewer-panels" selected="{{panel}}" valueattr="id"
22-
on-polymer-pages-animation-end="{{panelSelected}}" directional transition="{{$.hslide}}">
23-
<pi-items-view id="topics" layout="{{topicsLayout}}" items="{{topics}}" view="topics" selected="{{topic}}"></pi-items-view>
24-
<pi-items-view id="stories" layout="{{layout}}" items="{{stories}}" view="flex" selected="{{story}}"></pi-items-view>
25-
<pi-story id="story" story="{{story}}" on-flick="{{storyFlickHandler}}" on-keydown="{{storyKeydownHandler}}"></pi-story>
26-
</polymer-ui-animated-pages>
27-
28-
<polymer-animation-group id="hslide" duration="0.3" easing="ease-in-out">
29-
<polymer-animation>
30-
<polymer-animation-keyframe>
31-
<polymer-animation-prop name="transform" value="scale(1)"></polymer-animation-prop>
32-
</polymer-animation-keyframe>
33-
<polymer-animation-keyframe>
34-
<polymer-animation-prop name="transform" value="scale(0.8)"></polymer-animation-prop>
35-
</polymer-animation-keyframe>
36-
</polymer-animation>
37-
<polymer-animation>
38-
<polymer-animation-keyframe>
39-
<polymer-animation-prop name="transform" value="translateX(100%)"></polymer-animation-prop>
40-
</polymer-animation-keyframe>
41-
<polymer-animation-keyframe>
42-
<polymer-animation-prop name="transform" value="translateX(0)"></polymer-animation-prop>
43-
</polymer-animation-keyframe>
44-
</polymer-animation>
45-
</polymer-animation-group> -->
46-
4721
<core-pages id="panels" class="feed-viewer-panels" selected="{{panel}}" valueattr="id"
4822
on-core-select="{{panelSelected}}">
4923
<pi-items-view id="topics" layout="{{topicsLayout}}" items="{{topics}}" view="topics" selected="{{topic}}"></pi-items-view>

elements/pi-gfeeds.html

+7-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* license that can be found in the LICENSE file.
66
*/
77
-->
8-
<link rel="import" href="../components/polymer-google-jsapi/polymer-google-jsapi.html">
8+
<link rel="import" href="../components/google-apis/google-apis.html">
99

1010
<polymer-element name="pi-gfeeds" attributes="feed query results loading count">
1111
<template>
@@ -14,11 +14,12 @@
1414
display: none;
1515
}
1616
</style>
17+
1718
</template>
1819
<script>
1920
(function() {
2021
// TODO(ffu): integrate the ability to load a specific api like feeds
21-
// into polymer-google-jsapi.
22+
// into google-jsapi.
2223
var feedsCallbacks = [];
2324
var feedsApiLoading = false;
2425

@@ -38,8 +39,8 @@
3839
callback();
3940
} else {
4041
if (!feedsApiLoading) {
41-
var loader = document.createElement('polymer-google-jsapi');
42-
loader.addEventListener('polymer-google-jsapi-loaded', function() {
42+
var loader = document.createElement('google-jsapi');
43+
loader.addEventListener('api-load', function() {
4344
google.load('feeds', '1', {callback: feedsApiLoaded});
4445
});
4546
feedsApiLoading = true;
@@ -51,7 +52,7 @@
5152
}
5253

5354
Polymer('pi-gfeeds', {
54-
count: 24,
55+
count: 27,
5556
created: function() {
5657
this.pendingFeeds = [];
5758
},
@@ -84,7 +85,7 @@
8485
queryChanged: function() {
8586
if (this.query) {
8687
this.loading = true;
87-
this.feedsReady(this.asyncMethod.bind(this, 'findFeeds'));
88+
this.findFeeds();
8889
}
8990
},
9091
findFeeds: function() {

0 commit comments

Comments
 (0)