Merge lp:~ahayzen/ubuntu-weather-app/reboot-profile-homepage-001 into lp:ubuntu-weather-app

Proposed by Andrew Hayzen
Status: Merged
Approved by: Victor Thompson
Approved revision: 102
Merged at revision: 107
Proposed branch: lp:~ahayzen/ubuntu-weather-app/reboot-profile-homepage-001
Merge into: lp:ubuntu-weather-app
Diff against target: 790 lines (+307/-276)
9 files modified
app/components/DayDelegate.qml (+24/-80)
app/components/DayDelegateExtraInfo.qml (+91/-0)
app/components/HomeHourly.qml (+4/-4)
app/ui/HomePage.qml (+51/-84)
app/ui/LocationPane.qml (+115/-92)
debian/changelog (+2/-0)
po/com.ubuntu.weather.pot (+12/-12)
tests/autopilot/ubuntu_weather_app/__init__.py (+4/-4)
tests/autopilot/ubuntu_weather_app/tests/test_home_page.py (+4/-0)
To merge this branch: bzr merge lp:~ahayzen/ubuntu-weather-app/reboot-profile-homepage-001
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Victor Thompson Approve
Review via email: mp+268635@code.launchpad.net

Commit message

* Split day delegate extra info into a separate component that is loaded on demand
* Use ListView per Location Pane so that scrolling vertically only affect the currently focused pane

Description of the change

* Split day delegate extra info into a separate component that is loaded on demand
* Use ListView per Location Pane so that scrolling vertically only affect the currently focused pane

This improves the performance of scrolling up/down the homepage as it doesn't need to load the extra info for each delegate and it only scrolls the location pane in-view.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

One effect this has is that each location can now be staggered at different points scrolled down the page as you flip through. What do you think of resetting each "page" to the top when it is no longer the currentIndex? Before I'd normally scroll back up and then all pages would be scrolled up, but now that they are independent flipping through them is a bit odd when staggered.

review: Needs Information
100. By Andrew Hayzen

* Reset height when changing currentIndex

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
101. By Andrew Hayzen

* Animate and ensure location panes are scroll to the top

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

lgtm! The animation is kinda nice on the device. :)

review: Approve
102. By Andrew Hayzen

* Merge of trunk

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/components/DayDelegate.qml'
--- app/components/DayDelegate.qml 2015-08-23 18:03:23 +0000
+++ app/components/DayDelegate.qml 2015-08-26 20:35:40 +0000
@@ -25,21 +25,14 @@
25 height: collapsedHeight25 height: collapsedHeight
2626
27 property int collapsedHeight: units.gu(8)27 property int collapsedHeight: units.gu(8)
28 property int expandedHeight: collapsedHeight + units.gu(4) + extraInfoColumn.height28 property int expandedHeight: collapsedHeight + units.gu(4) + (expandedInfo.item ? expandedInfo.item.height : 0)
2929
30 property alias day: dayLabel.text30 property alias day: dayLabel.text
31 property alias image: weatherImage.name31 property alias image: weatherImage.name
32 property alias high: highLabel.text32 property alias high: highLabel.text
33 property alias low: lowLabel.text33 property alias low: lowLabel.text
3434
35 property alias condition: conditionForecast.text35 property alias modelData: expandedInfo.modelData
36 property alias chanceOfRain: chanceOfRainForecast.value
37 property alias humidity: humidityForecast.value
38 property alias pollen: pollenForecast.value
39 property alias sunrise: sunriseForecast.value
40 property alias sunset: sunsetForecast.value
41 property alias wind: windForecast.value
42 property alias uvIndex: uvIndexForecast.value
4336
44 state: "normal"37 state: "normal"
45 states: [38 states: [
@@ -49,6 +42,10 @@
49 target: dayDelegate42 target: dayDelegate
50 height: collapsedHeight43 height: collapsedHeight
51 }44 }
45 PropertyChanges {
46 target: expandedInfo
47 opacity: 0
48 }
52 },49 },
53 State {50 State {
54 name: "expanded"51 name: "expanded"
@@ -68,9 +65,8 @@
68 from: "normal"65 from: "normal"
69 to: "expanded"66 to: "expanded"
70 SequentialAnimation {67 SequentialAnimation {
71 NumberAnimation {68 ScriptAction {
72 easing.type: Easing.InOutQuad69 script: expandedInfo.active = true
73 properties: "height"
74 }70 }
75 NumberAnimation {71 NumberAnimation {
76 easing.type: Easing.InOutQuad72 easing.type: Easing.InOutQuad
@@ -86,9 +82,8 @@
86 easing.type: Easing.InOutQuad82 easing.type: Easing.InOutQuad
87 properties: "opacity"83 properties: "opacity"
88 }84 }
89 NumberAnimation {85 ScriptAction {
90 easing.type: Easing.InOutQuad86 script: expandedInfo.active = false
91 properties: "height"
92 }87 }
93 }88 }
94 }89 }
@@ -165,78 +160,27 @@
165 }160 }
166 }161 }
167162
168 Item {163 Loader {
169 id: expandedInfo164 id: expandedInfo
165 active: false
170 anchors {166 anchors {
171 bottom: parent.bottom167 bottomMargin: units.gu(2)
172 left: parent.left168 left: parent.left
169 leftMargin: units.gu(2)
173 right: parent.right170 right: parent.right
171 rightMargin: units.gu(2)
174 top: mainInfo.bottom172 top: mainInfo.bottom
175 bottomMargin: units.gu(2)
176 }173 }
174 asynchronous: true
177 opacity: 0175 opacity: 0
178 visible: opacity !== 0176 source: "DayDelegateExtraInfo.qml"
179177
180 Column {178 property var modelData
181 id: extraInfoColumn179 }
182 anchors {180
183 centerIn: parent181 Behavior on height {
184 }182 NumberAnimation {
185 spacing: units.gu(2)183 easing.type: Easing.InOutQuad
186
187 // FIXME: extended-infomation_* aren't actually on device
188
189 // Overview text
190 Label {
191 id: conditionForecast
192 color: UbuntuColors.coolGrey
193 font.capitalization: Font.Capitalize
194 fontSize: "x-large"
195 horizontalAlignment: Text.AlignHCenter
196 width: parent.width
197 }
198
199 ForecastDetailsDelegate {
200 id: chanceOfRainForecast
201 forecast: i18n.tr("Chance of rain")
202 imageSource: "../graphics/extended-information_chance-of-rain.svg"
203 }
204
205 ForecastDetailsDelegate {
206 id: windForecast
207 forecast: i18n.tr("Winds")
208 imageSource: "../graphics/extended-information_wind.svg"
209 }
210
211 ForecastDetailsDelegate {
212 id: uvIndexForecast
213 imageSource: "../graphics/extended-information_uv-level.svg"
214 forecast: i18n.tr("UV Index")
215 }
216
217 ForecastDetailsDelegate {
218 id: pollenForecast
219 forecast: i18n.tr("Pollen")
220 // FIXME: need icon
221 }
222
223 ForecastDetailsDelegate {
224 id: humidityForecast
225 forecast: i18n.tr("Humidity")
226 imageSource: "../graphics/extended-information_humidity.svg"
227 }
228
229 ForecastDetailsDelegate {
230 id: sunriseForecast
231 forecast: i18n.tr("Sunrise")
232 imageSource: "../graphics/extended-information_sunrise.svg"
233 }
234
235 ForecastDetailsDelegate {
236 id: sunsetForecast
237 forecast: i18n.tr("Sunset")
238 imageSource: "../graphics/extended-information_sunset.svg"
239 }
240 }184 }
241 }185 }
242186
243187
=== added file 'app/components/DayDelegateExtraInfo.qml'
--- app/components/DayDelegateExtraInfo.qml 1970-01-01 00:00:00 +0000
+++ app/components/DayDelegateExtraInfo.qml 2015-08-26 20:35:40 +0000
@@ -0,0 +1,91 @@
1/*
2 * Copyright (C) 2015 Canonical Ltd
3 *
4 * This file is part of Ubuntu Weather App
5 *
6 * Ubuntu Weather App is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 3 as
8 * published by the Free Software Foundation.
9 *
10 * Ubuntu Weather App is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.4
20import Ubuntu.Components 1.2
21
22
23Column {
24 id: extraInfoColumn
25 anchors {
26 centerIn: parent
27 }
28 spacing: units.gu(2)
29
30 // FIXME: extended-infomation_* aren't actually on device
31
32 // Overview text
33 Label {
34 id: conditionForecast
35 color: UbuntuColors.coolGrey
36 font.capitalization: Font.Capitalize
37 fontSize: "x-large"
38 horizontalAlignment: Text.AlignHCenter
39 text: modelData.condition
40 width: parent.width
41 }
42
43 ForecastDetailsDelegate {
44 id: chanceOfRainForecast
45 forecast: i18n.tr("Chance of rain")
46 imageSource: "../graphics/extended-information_chance-of-rain.svg"
47 value: modelData.chanceOfRain
48 }
49
50 ForecastDetailsDelegate {
51 id: windForecast
52 forecast: i18n.tr("Winds")
53 imageSource: "../graphics/extended-information_wind.svg"
54 value: modelData.wind
55 }
56
57 ForecastDetailsDelegate {
58 id: uvIndexForecast
59 imageSource: "../graphics/extended-information_uv-level.svg"
60 forecast: i18n.tr("UV Index")
61 value: modelData.uvIndex
62 }
63
64 ForecastDetailsDelegate {
65 id: pollenForecast
66 forecast: i18n.tr("Pollen")
67 // FIXME: need icon
68 //value: modelData.pollen // TODO: extra from API
69 }
70
71 ForecastDetailsDelegate {
72 id: humidityForecast
73 forecast: i18n.tr("Humidity")
74 imageSource: "../graphics/extended-information_humidity.svg"
75 value: modelData.humidity
76 }
77
78 ForecastDetailsDelegate {
79 id: sunriseForecast
80 forecast: i18n.tr("Sunrise")
81 imageSource: "../graphics/extended-information_sunrise.svg"
82 value: modelData.sunrise
83 }
84
85 ForecastDetailsDelegate {
86 id: sunsetForecast
87 forecast: i18n.tr("Sunset")
88 imageSource: "../graphics/extended-information_sunset.svg"
89 value: modelData.sunset
90 }
91}
092
=== modified file 'app/components/HomeHourly.qml'
--- app/components/HomeHourly.qml 2015-06-21 18:35:36 +0000
+++ app/components/HomeHourly.qml 2015-08-26 20:35:40 +0000
@@ -25,14 +25,14 @@
25 clip:true25 clip:true
26 height: parent ? parent.height : undefined26 height: parent ? parent.height : undefined
27 width: parent ? parent.width : undefined27 width: parent ? parent.width : undefined
28 model: forecasts.length28 model: hourlyForecastsData.length
29 orientation: ListView.Horizontal29 orientation: ListView.Horizontal
3030
31 property string currentDate: Qt.formatTime(new Date())31 property string currentDate: Qt.formatTime(new Date())
3232
33 onVisibleChanged: {33 onVisibleChanged: {
34 if(visible) {34 if(visible) {
35 ListView.model = forecasts.length35 ListView.model = hourlyForecastsData.length
36 }36 }
37 }37 }
3838
@@ -46,7 +46,7 @@
46 delegate: Item {46 delegate: Item {
47 id: delegate47 id: delegate
4848
49 property var hourData: forecasts[index]49 property var hourData: hourlyForecastsData[index]
5050
51 height: parent.height51 height: parent.height
52 width: childrenRect.width52 width: childrenRect.width
@@ -84,7 +84,7 @@
84 anchors.horizontalCenter: parent.horizontalCenter84 anchors.horizontalCenter: parent.horizontalCenter
85 font.pixelSize: units.gu(3)85 font.pixelSize: units.gu(3)
86 font.weight: Font.Light86 font.weight: Font.Light
87 text: Math.round(hourData[tempUnits].temp).toString()+settings.tempScale87 text: Math.round(hourData[hourlyTempUnits].temp).toString()+settings.tempScale
88 }88 }
89 }89 }
9090
9191
=== modified file 'app/ui/HomePage.qml'
--- app/ui/HomePage.qml 2015-07-30 04:10:44 +0000
+++ app/ui/HomePage.qml 2015-08-26 20:35:40 +0000
@@ -93,91 +93,58 @@
93 }93 }
9494
95 /*95 /*
96 Flickable to scroll the location vertically.96 ListView for locations with snap-scrolling horizontally.
97 The respective contentHeight gets calculated after the Location is filled with data.
98 */97 */
99 Flickable {98 ListView {
100 id: locationFlickable99 id: locationPages
101 width: parent.width100 objectName: "locationPages"
102 height: parent.height101 anchors.fill: parent
103102 contentHeight: parent.height
104 // FIXME: not sure where the 3GU comes from, PullToRefresh or something in HomePage?103 currentIndex: settings.current
105 contentHeight: locationPages.currentItem ? locationPages.currentItem.childrenRect.height + units.gu(3) : 0104 delegate: LocationPane {}
106 contentWidth: parent.width105 highlightRangeMode: ListView.StrictlyEnforceRange
107106 model: weatherApp.locationsList.length
108 Behavior on contentHeight {107 orientation: ListView.Horizontal
109 NumberAnimation {108 // TODO with snapMode, currentIndex is not properly set and setting currentIndex fails
110109 //snapMode: ListView.SnapOneItem
111 }110
112 }111 property bool loaded: false
113112
114 PullToRefresh {113 signal collapseOtherDelegates(int index)
115 id: pullToRefresh114
116 parent: locationFlickable115 onCurrentIndexChanged: {
117 refreshing: false116 if (loaded) {
118 onRefresh: {117 // FIXME: when a model is reloaded this causes the currentIndex to be lost
119 locationPages.loaded = false118 settings.current = currentIndex
120 refreshing = true119
121 refreshData(false, true)120 collapseOtherDelegates(-1) // collapse all
122 }121 }
123 }122 }
124123 onModelChanged: {
125 /*124 currentIndex = settings.current
126 ListView for locations with snap-scrolling horizontally.125
127 */126 if (model > 0) {
128 ListView {127 loading = false
129 id: locationPages128 loaded = true
130 objectName: "locationPages"129 }
131 anchors.fill: parent130 }
132 currentIndex: settings.current131 onVisibleChanged: {
133 delegate: LocationPane {}132 if (!visible && loaded) {
134 height: childrenRect.height133 collapseOtherDelegates(-1) // collapse all
135 highlightRangeMode: ListView.StrictlyEnforceRange134 }
136 model: weatherApp.locationsList.length135 }
137 orientation: ListView.Horizontal136
138 // TODO with snapMode, currentIndex is not properly set and setting currentIndex fails137 // TODO: workaround for not being able to use snapMode property
139 //snapMode: ListView.SnapOneItem138 Component.onCompleted: {
140 width: parent.width139 var scaleFactor = units.gridUnit * 10;
141140 maximumFlickVelocity = maximumFlickVelocity * scaleFactor;
142 property bool loaded: false141 flickDeceleration = flickDeceleration * scaleFactor;
143142 }
144 signal collapseOtherDelegates(int index)143
145144 Connections {
146 onCurrentIndexChanged: {145 target: settings
147 if (loaded) {146 onCurrentChanged: {
148 // FIXME: when a model is reloaded this causes the currentIndex to be lost147 locationPages.currentIndex = settings.current
149 settings.current = currentIndex
150
151 collapseOtherDelegates(-1) // collapse all
152 }
153 }
154 onModelChanged: {
155 currentIndex = settings.current
156
157 if (model > 0) {
158 pullToRefresh.refreshing = false
159 loading = false
160 loaded = true
161 }
162 }
163 onVisibleChanged: {
164 if (!visible && loaded) {
165 collapseOtherDelegates(-1) // collapse all
166 }
167 }
168
169 // TODO: workaround for not being able to use snapMode property
170 Component.onCompleted: {
171 var scaleFactor = units.gridUnit * 10;
172 maximumFlickVelocity = maximumFlickVelocity * scaleFactor;
173 flickDeceleration = flickDeceleration * scaleFactor;
174 }
175
176 Connections {
177 target: settings
178 onCurrentChanged: {
179 locationPages.currentIndex = settings.current
180 }
181 }148 }
182 }149 }
183 }150 }
184151
=== modified file 'app/ui/LocationPane.qml'
--- app/ui/LocationPane.qml 2015-08-09 12:20:27 +0000
+++ app/ui/LocationPane.qml 2015-08-26 20:35:40 +0000
@@ -22,8 +22,16 @@
22import "../components"22import "../components"
23import "../data/suncalc.js" as SunCalc23import "../data/suncalc.js" as SunCalc
2424
25Item {25
26 id: locationItem26ListView {
27 id: mainPageWeekdayListView
28 height: parent.height
29 model: ListModel {
30
31 }
32 objectName: "locationListView" + index
33 width: weatherApp.width
34
27 /*35 /*
28 Data properties36 Data properties
29 */37 */
@@ -35,11 +43,105 @@
35 property string icon43 property string icon
36 property string iconName44 property string iconName
3745
38 Component.onCompleted: renderData(index)46 property var hourlyForecastsData
3947 property string hourlyTempUnits
40 width: locationPage.width48
41 height: childrenRect.height49 delegate: DayDelegate {
42 anchors.fill: parent.fill50 day: model.day
51 high: model.high
52 image: model.image
53 low: model.low
54
55 modelData: model
56 }
57 header: Column {
58 id: locationTop
59
60 anchors {
61 left: parent.left
62 right: parent.right
63 margins: units.gu(2)
64 }
65 spacing: units.gu(1)
66 onHeightChanged: mainPageWeekdayListView.contentY = -height
67
68 Row { // spacing at top
69 height: units.gu(1)
70 width: parent.width
71 }
72
73 HeaderRow {
74 id: headerRow
75 locationName: mainPageWeekdayListView.name
76 }
77
78 HomeGraphic {
79 id: homeGraphic
80 icon: mainPageWeekdayListView.icon
81 MouseArea {
82 anchors.fill: parent
83 onClicked: {
84 homeGraphic.visible = false;
85 }
86 }
87 }
88
89 Loader {
90 id: homeHourlyLoader
91 active: !homeGraphic.visible
92 asynchronous: true
93 height: units.gu(32)
94 source: "../components/HomeHourly.qml"
95 visible: active
96 width: parent.width
97 }
98
99 HomeTempInfo {
100 id: homeTempInfo
101 description: conditionText
102 high: mainPageWeekdayListView.todayMaxTemp
103 low: mainPageWeekdayListView.todayMinTemp
104 now: mainPageWeekdayListView.currentTemp
105 }
106
107 // TODO: Migrate this to using the new SDK list item when possible.
108 ListItem.ThinDivider {
109 anchors {
110 leftMargin: units.gu(-2);
111 rightMargin: units.gu(-2)
112 }
113 }
114
115 NumberAnimation {
116 id: scrollToTopAnimation
117 target: mainPageWeekdayListView;
118 property: "contentY";
119 duration: 200;
120 easing.type: Easing.InOutQuad
121 to: -height
122 }
123
124 Connections {
125 target: locationPages
126 onCurrentIndexChanged: {
127 if (locationPages.currentIndex !== index) {
128 scrollToTopAnimation.start()
129 } else {
130 mainPageWeekdayListView.contentY = -locationTop.height
131 }
132 }
133 }
134 }
135
136 PullToRefresh {
137 id: pullToRefresh
138 refreshing: false
139 onRefresh: {
140 locationPages.loaded = false
141 refreshing = true
142 refreshData(false, true)
143 }
144 }
43145
44 function emptyIfUndefined(variable, append) {146 function emptyIfUndefined(variable, append) {
45 if (append === undefined) {147 if (append === undefined) {
@@ -113,89 +215,10 @@
113215
114 // set data for hourly forecasts216 // set data for hourly forecasts
115 if(hourlyForecasts.length > 0) {217 if(hourlyForecasts.length > 0) {
116 homeHourlyLoader.forecasts = hourlyForecasts;218 hourlyForecastsData = hourlyForecasts;
117 homeHourlyLoader.tempUnits = tempUnits;219 hourlyTempUnits = tempUnits;
118 }220 }
119 }221 }
120222
121 Column {223 Component.onCompleted: renderData(index)
122 id: locationTop
123
124 anchors {
125 top: parent.top
126 left: parent.left
127 right: parent.right
128 margins: units.gu(2)
129 }
130 spacing: units.gu(1)
131
132 HeaderRow {
133 id: headerRow
134 locationName: locationItem.name
135 }
136
137 HomeGraphic {
138 id: homeGraphic
139 icon: locationItem.icon
140 MouseArea {
141 anchors.fill: parent
142 onClicked: {
143 homeGraphic.visible = false;
144 }
145 }
146 }
147
148 Loader {
149 id: homeHourlyLoader
150 active: !homeGraphic.visible
151 asynchronous: true
152 height: units.gu(32)
153 source: "../components/HomeHourly.qml"
154 visible: active
155 width: parent.width
156
157 property var forecasts: []
158 property string tempUnits: ""
159 }
160
161 HomeTempInfo {
162 id: homeTempInfo
163 description: conditionText
164 high: locationItem.todayMaxTemp
165 low: locationItem.todayMinTemp
166 now: locationItem.currentTemp
167 }
168
169 // TODO: Migrate this to using the new SDK list item when possible.
170 ListItem.ThinDivider { anchors { leftMargin: units.gu(-2); rightMargin: units.gu(-2) } }
171 }
172 Column {
173 id: weekdayColumn
174 objectName: "weekdayColumn" + index
175
176 anchors.top: locationTop.bottom
177 height: childrenRect.height
178 width: parent.width
179
180 Repeater {
181 id: mainPageWeekdayListView
182 model: ListModel{}
183 delegate: DayDelegate {
184 day: model.day
185 high: model.high
186 image: model.image
187 low: model.low
188
189 condition: model.condition
190 chanceOfRain: model.chanceOfRain
191 humidity: model.humidity
192 // TODO: extra from API
193 //pollen: model.pollen
194 sunrise: model.sunrise
195 sunset: model.sunset
196 wind: model.wind
197 uvIndex: model.uvIndex
198 }
199 }
200 }
201}224}
202225
=== modified file 'debian/changelog'
--- debian/changelog 2015-08-26 01:05:17 +0000
+++ debian/changelog 2015-08-26 20:35:40 +0000
@@ -38,6 +38,8 @@
38 * Create autopilot test which adds a location via cached results (LP: #1452497)38 * Create autopilot test which adds a location via cached results (LP: #1452497)
39 * Fix for racy search bar causing incorrect search query when typed quickly39 * Fix for racy search bar causing incorrect search query when typed quickly
40 * Fix for flaky test as get_location does not wait for location to be loaded (LP: #1485657)40 * Fix for flaky test as get_location does not wait for location to be loaded (LP: #1485657)
41 * Split day delegate extra info into a separate component that is loaded on demand
42 * Use ListView per Location Pane so that scrolling vertically only affect the currently focused pane
4143
42 [ Carla Sella ]44 [ Carla Sella ]
43 * Create autopilot test which shows the day delegate (LP: #1452491)45 * Create autopilot test which shows the day delegate (LP: #1452491)
4446
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-08-17 15:52:27 +0000
+++ po/com.ubuntu.weather.pot 2015-08-26 20:35:40 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: ubuntu-weather-app\n"9"Project-Id-Version: ubuntu-weather-app\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-08-12 00:11+0100\n"11"POT-Creation-Date: 2015-08-24 19:08+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,31 +18,31 @@
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
19"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"19"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
2020
21#: ../app/components/DayDelegate.qml:20021#: ../app/components/DayDelegateExtraInfo.qml:44
22msgid "Chance of rain"22msgid "Chance of rain"
23msgstr ""23msgstr ""
2424
25#: ../app/components/DayDelegate.qml:20625#: ../app/components/DayDelegateExtraInfo.qml:51
26msgid "Winds"26msgid "Winds"
27msgstr ""27msgstr ""
2828
29#: ../app/components/DayDelegate.qml:21329#: ../app/components/DayDelegateExtraInfo.qml:59
30msgid "UV Index"30msgid "UV Index"
31msgstr ""31msgstr ""
3232
33#: ../app/components/DayDelegate.qml:21833#: ../app/components/DayDelegateExtraInfo.qml:65
34msgid "Pollen"34msgid "Pollen"
35msgstr ""35msgstr ""
3636
37#: ../app/components/DayDelegate.qml:22437#: ../app/components/DayDelegateExtraInfo.qml:72
38msgid "Humidity"38msgid "Humidity"
39msgstr ""39msgstr ""
4040
41#: ../app/components/DayDelegate.qml:23041#: ../app/components/DayDelegateExtraInfo.qml:79
42msgid "Sunrise"42msgid "Sunrise"
43msgstr ""43msgstr ""
4444
45#: ../app/components/DayDelegate.qml:23645#: ../app/components/DayDelegateExtraInfo.qml:86
46msgid "Sunset"46msgid "Sunset"
47msgstr ""47msgstr ""
4848
@@ -98,19 +98,19 @@
98msgid "Search city"98msgid "Search city"
99msgstr ""99msgstr ""
100100
101#: ../app/ui/AddLocationPage.qml:293101#: ../app/ui/AddLocationPage.qml:295
102msgid "No city found"102msgid "No city found"
103msgstr ""103msgstr ""
104104
105#: ../app/ui/AddLocationPage.qml:306105#: ../app/ui/AddLocationPage.qml:308
106msgid "Couldn't load weather data, please try later again!"106msgid "Couldn't load weather data, please try later again!"
107msgstr ""107msgstr ""
108108
109#: ../app/ui/AddLocationPage.qml:316109#: ../app/ui/AddLocationPage.qml:318
110msgid "Location already added."110msgid "Location already added."
111msgstr ""111msgstr ""
112112
113#: ../app/ui/AddLocationPage.qml:319113#: ../app/ui/AddLocationPage.qml:321
114msgid "OK"114msgid "OK"
115msgstr ""115msgstr ""
116116
117117
=== modified file 'tests/autopilot/ubuntu_weather_app/__init__.py'
--- tests/autopilot/ubuntu_weather_app/__init__.py 2015-08-26 01:05:17 +0000
+++ tests/autopilot/ubuntu_weather_app/__init__.py 2015-08-26 20:35:40 +0000
@@ -144,10 +144,10 @@
144 def get_selected_location_index(self):144 def get_selected_location_index(self):
145 return self.get_location_pages().currentIndex145 return self.get_location_pages().currentIndex
146146
147 def get_daydelegate(self, weekdaycolumn, day):147 def get_daydelegate(self, location, day):
148 weekdaycolumn = self.wait_select_single(148 listview = self.wait_select_single(
149 "QQuickColumn", objectName="weekdayColumn" + str(weekdaycolumn))149 "LocationPane", objectName="locationListView" + str(location))
150 return weekdaycolumn.wait_select_single(150 return listview.wait_select_single(
151 "DayDelegate", objectName="dayDelegate" + str(day))151 "DayDelegate", objectName="dayDelegate" + str(day))
152152
153 @click_object153 @click_object
154154
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_home_page.py'
--- tests/autopilot/ubuntu_weather_app/tests/test_home_page.py 2015-08-09 16:28:57 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/test_home_page.py 2015-08-26 20:35:40 +0000
@@ -42,6 +42,10 @@
42 self.assertThat(day_delegate.state, Eventually(Equals("normal")))42 self.assertThat(day_delegate.state, Eventually(Equals("normal")))
4343
44 home_page.click_daydelegate(day_delegate)44 home_page.click_daydelegate(day_delegate)
45
46 # Re-get daydelegate as change in loaders changes tree
47 day_delegate = home_page.get_daydelegate(weekdaycolumn, day)
48
45 day_delegate.height.wait_for(day_delegate.expandedHeight)49 day_delegate.height.wait_for(day_delegate.expandedHeight)
46 self.assertThat(day_delegate.state, Eventually(Equals("expanded")))50 self.assertThat(day_delegate.state, Eventually(Equals("expanded")))
47 self.assertEqual(day_delegate.height, day_delegate.expandedHeight)51 self.assertEqual(day_delegate.height, day_delegate.expandedHeight)

Subscribers

People subscribed via source and target branches

to all changes: