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

Proposed by Andrew Hayzen on 2015-08-20
Status: Merged
Approved by: Victor Thompson on 2015-08-27
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 on 2015-08-26
Victor Thompson 2015-08-20 Approve on 2015-08-26
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.
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 on 2015-08-21

* Reset height when changing currentIndex

101. By Andrew Hayzen on 2015-08-24

* Animate and ensure location panes are scroll to the top

Victor Thompson (vthompson) wrote :

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

review: Approve
102. By Andrew Hayzen on 2015-08-26

* Merge of trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/components/DayDelegate.qml'
2--- app/components/DayDelegate.qml 2015-08-23 18:03:23 +0000
3+++ app/components/DayDelegate.qml 2015-08-26 20:35:40 +0000
4@@ -25,21 +25,14 @@
5 height: collapsedHeight
6
7 property int collapsedHeight: units.gu(8)
8- property int expandedHeight: collapsedHeight + units.gu(4) + extraInfoColumn.height
9+ property int expandedHeight: collapsedHeight + units.gu(4) + (expandedInfo.item ? expandedInfo.item.height : 0)
10
11 property alias day: dayLabel.text
12 property alias image: weatherImage.name
13 property alias high: highLabel.text
14 property alias low: lowLabel.text
15
16- property alias condition: conditionForecast.text
17- property alias chanceOfRain: chanceOfRainForecast.value
18- property alias humidity: humidityForecast.value
19- property alias pollen: pollenForecast.value
20- property alias sunrise: sunriseForecast.value
21- property alias sunset: sunsetForecast.value
22- property alias wind: windForecast.value
23- property alias uvIndex: uvIndexForecast.value
24+ property alias modelData: expandedInfo.modelData
25
26 state: "normal"
27 states: [
28@@ -49,6 +42,10 @@
29 target: dayDelegate
30 height: collapsedHeight
31 }
32+ PropertyChanges {
33+ target: expandedInfo
34+ opacity: 0
35+ }
36 },
37 State {
38 name: "expanded"
39@@ -68,9 +65,8 @@
40 from: "normal"
41 to: "expanded"
42 SequentialAnimation {
43- NumberAnimation {
44- easing.type: Easing.InOutQuad
45- properties: "height"
46+ ScriptAction {
47+ script: expandedInfo.active = true
48 }
49 NumberAnimation {
50 easing.type: Easing.InOutQuad
51@@ -86,9 +82,8 @@
52 easing.type: Easing.InOutQuad
53 properties: "opacity"
54 }
55- NumberAnimation {
56- easing.type: Easing.InOutQuad
57- properties: "height"
58+ ScriptAction {
59+ script: expandedInfo.active = false
60 }
61 }
62 }
63@@ -165,78 +160,27 @@
64 }
65 }
66
67- Item {
68+ Loader {
69 id: expandedInfo
70+ active: false
71 anchors {
72- bottom: parent.bottom
73+ bottomMargin: units.gu(2)
74 left: parent.left
75+ leftMargin: units.gu(2)
76 right: parent.right
77+ rightMargin: units.gu(2)
78 top: mainInfo.bottom
79- bottomMargin: units.gu(2)
80 }
81+ asynchronous: true
82 opacity: 0
83- visible: opacity !== 0
84-
85- Column {
86- id: extraInfoColumn
87- anchors {
88- centerIn: parent
89- }
90- spacing: units.gu(2)
91-
92- // FIXME: extended-infomation_* aren't actually on device
93-
94- // Overview text
95- Label {
96- id: conditionForecast
97- color: UbuntuColors.coolGrey
98- font.capitalization: Font.Capitalize
99- fontSize: "x-large"
100- horizontalAlignment: Text.AlignHCenter
101- width: parent.width
102- }
103-
104- ForecastDetailsDelegate {
105- id: chanceOfRainForecast
106- forecast: i18n.tr("Chance of rain")
107- imageSource: "../graphics/extended-information_chance-of-rain.svg"
108- }
109-
110- ForecastDetailsDelegate {
111- id: windForecast
112- forecast: i18n.tr("Winds")
113- imageSource: "../graphics/extended-information_wind.svg"
114- }
115-
116- ForecastDetailsDelegate {
117- id: uvIndexForecast
118- imageSource: "../graphics/extended-information_uv-level.svg"
119- forecast: i18n.tr("UV Index")
120- }
121-
122- ForecastDetailsDelegate {
123- id: pollenForecast
124- forecast: i18n.tr("Pollen")
125- // FIXME: need icon
126- }
127-
128- ForecastDetailsDelegate {
129- id: humidityForecast
130- forecast: i18n.tr("Humidity")
131- imageSource: "../graphics/extended-information_humidity.svg"
132- }
133-
134- ForecastDetailsDelegate {
135- id: sunriseForecast
136- forecast: i18n.tr("Sunrise")
137- imageSource: "../graphics/extended-information_sunrise.svg"
138- }
139-
140- ForecastDetailsDelegate {
141- id: sunsetForecast
142- forecast: i18n.tr("Sunset")
143- imageSource: "../graphics/extended-information_sunset.svg"
144- }
145+ source: "DayDelegateExtraInfo.qml"
146+
147+ property var modelData
148+ }
149+
150+ Behavior on height {
151+ NumberAnimation {
152+ easing.type: Easing.InOutQuad
153 }
154 }
155
156
157=== added file 'app/components/DayDelegateExtraInfo.qml'
158--- app/components/DayDelegateExtraInfo.qml 1970-01-01 00:00:00 +0000
159+++ app/components/DayDelegateExtraInfo.qml 2015-08-26 20:35:40 +0000
160@@ -0,0 +1,91 @@
161+/*
162+ * Copyright (C) 2015 Canonical Ltd
163+ *
164+ * This file is part of Ubuntu Weather App
165+ *
166+ * Ubuntu Weather App is free software: you can redistribute it and/or modify
167+ * it under the terms of the GNU General Public License version 3 as
168+ * published by the Free Software Foundation.
169+ *
170+ * Ubuntu Weather App is distributed in the hope that it will be useful,
171+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
172+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
173+ * GNU General Public License for more details.
174+ *
175+ * You should have received a copy of the GNU General Public License
176+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
177+ */
178+
179+import QtQuick 2.4
180+import Ubuntu.Components 1.2
181+
182+
183+Column {
184+ id: extraInfoColumn
185+ anchors {
186+ centerIn: parent
187+ }
188+ spacing: units.gu(2)
189+
190+ // FIXME: extended-infomation_* aren't actually on device
191+
192+ // Overview text
193+ Label {
194+ id: conditionForecast
195+ color: UbuntuColors.coolGrey
196+ font.capitalization: Font.Capitalize
197+ fontSize: "x-large"
198+ horizontalAlignment: Text.AlignHCenter
199+ text: modelData.condition
200+ width: parent.width
201+ }
202+
203+ ForecastDetailsDelegate {
204+ id: chanceOfRainForecast
205+ forecast: i18n.tr("Chance of rain")
206+ imageSource: "../graphics/extended-information_chance-of-rain.svg"
207+ value: modelData.chanceOfRain
208+ }
209+
210+ ForecastDetailsDelegate {
211+ id: windForecast
212+ forecast: i18n.tr("Winds")
213+ imageSource: "../graphics/extended-information_wind.svg"
214+ value: modelData.wind
215+ }
216+
217+ ForecastDetailsDelegate {
218+ id: uvIndexForecast
219+ imageSource: "../graphics/extended-information_uv-level.svg"
220+ forecast: i18n.tr("UV Index")
221+ value: modelData.uvIndex
222+ }
223+
224+ ForecastDetailsDelegate {
225+ id: pollenForecast
226+ forecast: i18n.tr("Pollen")
227+ // FIXME: need icon
228+ //value: modelData.pollen // TODO: extra from API
229+ }
230+
231+ ForecastDetailsDelegate {
232+ id: humidityForecast
233+ forecast: i18n.tr("Humidity")
234+ imageSource: "../graphics/extended-information_humidity.svg"
235+ value: modelData.humidity
236+ }
237+
238+ ForecastDetailsDelegate {
239+ id: sunriseForecast
240+ forecast: i18n.tr("Sunrise")
241+ imageSource: "../graphics/extended-information_sunrise.svg"
242+ value: modelData.sunrise
243+ }
244+
245+ ForecastDetailsDelegate {
246+ id: sunsetForecast
247+ forecast: i18n.tr("Sunset")
248+ imageSource: "../graphics/extended-information_sunset.svg"
249+ value: modelData.sunset
250+ }
251+}
252
253=== modified file 'app/components/HomeHourly.qml'
254--- app/components/HomeHourly.qml 2015-06-21 18:35:36 +0000
255+++ app/components/HomeHourly.qml 2015-08-26 20:35:40 +0000
256@@ -25,14 +25,14 @@
257 clip:true
258 height: parent ? parent.height : undefined
259 width: parent ? parent.width : undefined
260- model: forecasts.length
261+ model: hourlyForecastsData.length
262 orientation: ListView.Horizontal
263
264 property string currentDate: Qt.formatTime(new Date())
265
266 onVisibleChanged: {
267 if(visible) {
268- ListView.model = forecasts.length
269+ ListView.model = hourlyForecastsData.length
270 }
271 }
272
273@@ -46,7 +46,7 @@
274 delegate: Item {
275 id: delegate
276
277- property var hourData: forecasts[index]
278+ property var hourData: hourlyForecastsData[index]
279
280 height: parent.height
281 width: childrenRect.width
282@@ -84,7 +84,7 @@
283 anchors.horizontalCenter: parent.horizontalCenter
284 font.pixelSize: units.gu(3)
285 font.weight: Font.Light
286- text: Math.round(hourData[tempUnits].temp).toString()+settings.tempScale
287+ text: Math.round(hourData[hourlyTempUnits].temp).toString()+settings.tempScale
288 }
289 }
290
291
292=== modified file 'app/ui/HomePage.qml'
293--- app/ui/HomePage.qml 2015-07-30 04:10:44 +0000
294+++ app/ui/HomePage.qml 2015-08-26 20:35:40 +0000
295@@ -93,91 +93,58 @@
296 }
297
298 /*
299- Flickable to scroll the location vertically.
300- The respective contentHeight gets calculated after the Location is filled with data.
301+ ListView for locations with snap-scrolling horizontally.
302 */
303- Flickable {
304- id: locationFlickable
305- width: parent.width
306- height: parent.height
307-
308- // FIXME: not sure where the 3GU comes from, PullToRefresh or something in HomePage?
309- contentHeight: locationPages.currentItem ? locationPages.currentItem.childrenRect.height + units.gu(3) : 0
310- contentWidth: parent.width
311-
312- Behavior on contentHeight {
313- NumberAnimation {
314-
315- }
316- }
317-
318- PullToRefresh {
319- id: pullToRefresh
320- parent: locationFlickable
321- refreshing: false
322- onRefresh: {
323- locationPages.loaded = false
324- refreshing = true
325- refreshData(false, true)
326- }
327- }
328-
329- /*
330- ListView for locations with snap-scrolling horizontally.
331- */
332- ListView {
333- id: locationPages
334- objectName: "locationPages"
335- anchors.fill: parent
336- currentIndex: settings.current
337- delegate: LocationPane {}
338- height: childrenRect.height
339- highlightRangeMode: ListView.StrictlyEnforceRange
340- model: weatherApp.locationsList.length
341- orientation: ListView.Horizontal
342- // TODO with snapMode, currentIndex is not properly set and setting currentIndex fails
343- //snapMode: ListView.SnapOneItem
344- width: parent.width
345-
346- property bool loaded: false
347-
348- signal collapseOtherDelegates(int index)
349-
350- onCurrentIndexChanged: {
351- if (loaded) {
352- // FIXME: when a model is reloaded this causes the currentIndex to be lost
353- settings.current = currentIndex
354-
355- collapseOtherDelegates(-1) // collapse all
356- }
357- }
358- onModelChanged: {
359- currentIndex = settings.current
360-
361- if (model > 0) {
362- pullToRefresh.refreshing = false
363- loading = false
364- loaded = true
365- }
366- }
367- onVisibleChanged: {
368- if (!visible && loaded) {
369- collapseOtherDelegates(-1) // collapse all
370- }
371- }
372-
373- // TODO: workaround for not being able to use snapMode property
374- Component.onCompleted: {
375- var scaleFactor = units.gridUnit * 10;
376- maximumFlickVelocity = maximumFlickVelocity * scaleFactor;
377- flickDeceleration = flickDeceleration * scaleFactor;
378- }
379-
380- Connections {
381- target: settings
382- onCurrentChanged: {
383- locationPages.currentIndex = settings.current
384- }
385+ ListView {
386+ id: locationPages
387+ objectName: "locationPages"
388+ anchors.fill: parent
389+ contentHeight: parent.height
390+ currentIndex: settings.current
391+ delegate: LocationPane {}
392+ highlightRangeMode: ListView.StrictlyEnforceRange
393+ model: weatherApp.locationsList.length
394+ orientation: ListView.Horizontal
395+ // TODO with snapMode, currentIndex is not properly set and setting currentIndex fails
396+ //snapMode: ListView.SnapOneItem
397+
398+ property bool loaded: false
399+
400+ signal collapseOtherDelegates(int index)
401+
402+ onCurrentIndexChanged: {
403+ if (loaded) {
404+ // FIXME: when a model is reloaded this causes the currentIndex to be lost
405+ settings.current = currentIndex
406+
407+ collapseOtherDelegates(-1) // collapse all
408+ }
409+ }
410+ onModelChanged: {
411+ currentIndex = settings.current
412+
413+ if (model > 0) {
414+ loading = false
415+ loaded = true
416+ }
417+ }
418+ onVisibleChanged: {
419+ if (!visible && loaded) {
420+ collapseOtherDelegates(-1) // collapse all
421+ }
422+ }
423+
424+ // TODO: workaround for not being able to use snapMode property
425+ Component.onCompleted: {
426+ var scaleFactor = units.gridUnit * 10;
427+ maximumFlickVelocity = maximumFlickVelocity * scaleFactor;
428+ flickDeceleration = flickDeceleration * scaleFactor;
429+ }
430+
431+ Connections {
432+ target: settings
433+ onCurrentChanged: {
434+ locationPages.currentIndex = settings.current
435 }
436 }
437 }
438
439=== modified file 'app/ui/LocationPane.qml'
440--- app/ui/LocationPane.qml 2015-08-09 12:20:27 +0000
441+++ app/ui/LocationPane.qml 2015-08-26 20:35:40 +0000
442@@ -22,8 +22,16 @@
443 import "../components"
444 import "../data/suncalc.js" as SunCalc
445
446-Item {
447- id: locationItem
448+
449+ListView {
450+ id: mainPageWeekdayListView
451+ height: parent.height
452+ model: ListModel {
453+
454+ }
455+ objectName: "locationListView" + index
456+ width: weatherApp.width
457+
458 /*
459 Data properties
460 */
461@@ -35,11 +43,105 @@
462 property string icon
463 property string iconName
464
465- Component.onCompleted: renderData(index)
466-
467- width: locationPage.width
468- height: childrenRect.height
469- anchors.fill: parent.fill
470+ property var hourlyForecastsData
471+ property string hourlyTempUnits
472+
473+ delegate: DayDelegate {
474+ day: model.day
475+ high: model.high
476+ image: model.image
477+ low: model.low
478+
479+ modelData: model
480+ }
481+ header: Column {
482+ id: locationTop
483+
484+ anchors {
485+ left: parent.left
486+ right: parent.right
487+ margins: units.gu(2)
488+ }
489+ spacing: units.gu(1)
490+ onHeightChanged: mainPageWeekdayListView.contentY = -height
491+
492+ Row { // spacing at top
493+ height: units.gu(1)
494+ width: parent.width
495+ }
496+
497+ HeaderRow {
498+ id: headerRow
499+ locationName: mainPageWeekdayListView.name
500+ }
501+
502+ HomeGraphic {
503+ id: homeGraphic
504+ icon: mainPageWeekdayListView.icon
505+ MouseArea {
506+ anchors.fill: parent
507+ onClicked: {
508+ homeGraphic.visible = false;
509+ }
510+ }
511+ }
512+
513+ Loader {
514+ id: homeHourlyLoader
515+ active: !homeGraphic.visible
516+ asynchronous: true
517+ height: units.gu(32)
518+ source: "../components/HomeHourly.qml"
519+ visible: active
520+ width: parent.width
521+ }
522+
523+ HomeTempInfo {
524+ id: homeTempInfo
525+ description: conditionText
526+ high: mainPageWeekdayListView.todayMaxTemp
527+ low: mainPageWeekdayListView.todayMinTemp
528+ now: mainPageWeekdayListView.currentTemp
529+ }
530+
531+ // TODO: Migrate this to using the new SDK list item when possible.
532+ ListItem.ThinDivider {
533+ anchors {
534+ leftMargin: units.gu(-2);
535+ rightMargin: units.gu(-2)
536+ }
537+ }
538+
539+ NumberAnimation {
540+ id: scrollToTopAnimation
541+ target: mainPageWeekdayListView;
542+ property: "contentY";
543+ duration: 200;
544+ easing.type: Easing.InOutQuad
545+ to: -height
546+ }
547+
548+ Connections {
549+ target: locationPages
550+ onCurrentIndexChanged: {
551+ if (locationPages.currentIndex !== index) {
552+ scrollToTopAnimation.start()
553+ } else {
554+ mainPageWeekdayListView.contentY = -locationTop.height
555+ }
556+ }
557+ }
558+ }
559+
560+ PullToRefresh {
561+ id: pullToRefresh
562+ refreshing: false
563+ onRefresh: {
564+ locationPages.loaded = false
565+ refreshing = true
566+ refreshData(false, true)
567+ }
568+ }
569
570 function emptyIfUndefined(variable, append) {
571 if (append === undefined) {
572@@ -113,89 +215,10 @@
573
574 // set data for hourly forecasts
575 if(hourlyForecasts.length > 0) {
576- homeHourlyLoader.forecasts = hourlyForecasts;
577- homeHourlyLoader.tempUnits = tempUnits;
578- }
579- }
580-
581- Column {
582- id: locationTop
583-
584- anchors {
585- top: parent.top
586- left: parent.left
587- right: parent.right
588- margins: units.gu(2)
589- }
590- spacing: units.gu(1)
591-
592- HeaderRow {
593- id: headerRow
594- locationName: locationItem.name
595- }
596-
597- HomeGraphic {
598- id: homeGraphic
599- icon: locationItem.icon
600- MouseArea {
601- anchors.fill: parent
602- onClicked: {
603- homeGraphic.visible = false;
604- }
605- }
606- }
607-
608- Loader {
609- id: homeHourlyLoader
610- active: !homeGraphic.visible
611- asynchronous: true
612- height: units.gu(32)
613- source: "../components/HomeHourly.qml"
614- visible: active
615- width: parent.width
616-
617- property var forecasts: []
618- property string tempUnits: ""
619- }
620-
621- HomeTempInfo {
622- id: homeTempInfo
623- description: conditionText
624- high: locationItem.todayMaxTemp
625- low: locationItem.todayMinTemp
626- now: locationItem.currentTemp
627- }
628-
629- // TODO: Migrate this to using the new SDK list item when possible.
630- ListItem.ThinDivider { anchors { leftMargin: units.gu(-2); rightMargin: units.gu(-2) } }
631- }
632- Column {
633- id: weekdayColumn
634- objectName: "weekdayColumn" + index
635-
636- anchors.top: locationTop.bottom
637- height: childrenRect.height
638- width: parent.width
639-
640- Repeater {
641- id: mainPageWeekdayListView
642- model: ListModel{}
643- delegate: DayDelegate {
644- day: model.day
645- high: model.high
646- image: model.image
647- low: model.low
648-
649- condition: model.condition
650- chanceOfRain: model.chanceOfRain
651- humidity: model.humidity
652- // TODO: extra from API
653- //pollen: model.pollen
654- sunrise: model.sunrise
655- sunset: model.sunset
656- wind: model.wind
657- uvIndex: model.uvIndex
658- }
659- }
660- }
661+ hourlyForecastsData = hourlyForecasts;
662+ hourlyTempUnits = tempUnits;
663+ }
664+ }
665+
666+ Component.onCompleted: renderData(index)
667 }
668
669=== modified file 'debian/changelog'
670--- debian/changelog 2015-08-26 01:05:17 +0000
671+++ debian/changelog 2015-08-26 20:35:40 +0000
672@@ -38,6 +38,8 @@
673 * Create autopilot test which adds a location via cached results (LP: #1452497)
674 * Fix for racy search bar causing incorrect search query when typed quickly
675 * Fix for flaky test as get_location does not wait for location to be loaded (LP: #1485657)
676+ * Split day delegate extra info into a separate component that is loaded on demand
677+ * Use ListView per Location Pane so that scrolling vertically only affect the currently focused pane
678
679 [ Carla Sella ]
680 * Create autopilot test which shows the day delegate (LP: #1452491)
681
682=== modified file 'po/com.ubuntu.weather.pot'
683--- po/com.ubuntu.weather.pot 2015-08-17 15:52:27 +0000
684+++ po/com.ubuntu.weather.pot 2015-08-26 20:35:40 +0000
685@@ -8,7 +8,7 @@
686 msgstr ""
687 "Project-Id-Version: ubuntu-weather-app\n"
688 "Report-Msgid-Bugs-To: \n"
689-"POT-Creation-Date: 2015-08-12 00:11+0100\n"
690+"POT-Creation-Date: 2015-08-24 19:08+0100\n"
691 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
692 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
693 "Language-Team: LANGUAGE <LL@li.org>\n"
694@@ -18,31 +18,31 @@
695 "Content-Transfer-Encoding: 8bit\n"
696 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
697
698-#: ../app/components/DayDelegate.qml:200
699+#: ../app/components/DayDelegateExtraInfo.qml:44
700 msgid "Chance of rain"
701 msgstr ""
702
703-#: ../app/components/DayDelegate.qml:206
704+#: ../app/components/DayDelegateExtraInfo.qml:51
705 msgid "Winds"
706 msgstr ""
707
708-#: ../app/components/DayDelegate.qml:213
709+#: ../app/components/DayDelegateExtraInfo.qml:59
710 msgid "UV Index"
711 msgstr ""
712
713-#: ../app/components/DayDelegate.qml:218
714+#: ../app/components/DayDelegateExtraInfo.qml:65
715 msgid "Pollen"
716 msgstr ""
717
718-#: ../app/components/DayDelegate.qml:224
719+#: ../app/components/DayDelegateExtraInfo.qml:72
720 msgid "Humidity"
721 msgstr ""
722
723-#: ../app/components/DayDelegate.qml:230
724+#: ../app/components/DayDelegateExtraInfo.qml:79
725 msgid "Sunrise"
726 msgstr ""
727
728-#: ../app/components/DayDelegate.qml:236
729+#: ../app/components/DayDelegateExtraInfo.qml:86
730 msgid "Sunset"
731 msgstr ""
732
733@@ -98,19 +98,19 @@
734 msgid "Search city"
735 msgstr ""
736
737-#: ../app/ui/AddLocationPage.qml:293
738+#: ../app/ui/AddLocationPage.qml:295
739 msgid "No city found"
740 msgstr ""
741
742-#: ../app/ui/AddLocationPage.qml:306
743+#: ../app/ui/AddLocationPage.qml:308
744 msgid "Couldn't load weather data, please try later again!"
745 msgstr ""
746
747-#: ../app/ui/AddLocationPage.qml:316
748+#: ../app/ui/AddLocationPage.qml:318
749 msgid "Location already added."
750 msgstr ""
751
752-#: ../app/ui/AddLocationPage.qml:319
753+#: ../app/ui/AddLocationPage.qml:321
754 msgid "OK"
755 msgstr ""
756
757
758=== modified file 'tests/autopilot/ubuntu_weather_app/__init__.py'
759--- tests/autopilot/ubuntu_weather_app/__init__.py 2015-08-26 01:05:17 +0000
760+++ tests/autopilot/ubuntu_weather_app/__init__.py 2015-08-26 20:35:40 +0000
761@@ -144,10 +144,10 @@
762 def get_selected_location_index(self):
763 return self.get_location_pages().currentIndex
764
765- def get_daydelegate(self, weekdaycolumn, day):
766- weekdaycolumn = self.wait_select_single(
767- "QQuickColumn", objectName="weekdayColumn" + str(weekdaycolumn))
768- return weekdaycolumn.wait_select_single(
769+ def get_daydelegate(self, location, day):
770+ listview = self.wait_select_single(
771+ "LocationPane", objectName="locationListView" + str(location))
772+ return listview.wait_select_single(
773 "DayDelegate", objectName="dayDelegate" + str(day))
774
775 @click_object
776
777=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_home_page.py'
778--- tests/autopilot/ubuntu_weather_app/tests/test_home_page.py 2015-08-09 16:28:57 +0000
779+++ tests/autopilot/ubuntu_weather_app/tests/test_home_page.py 2015-08-26 20:35:40 +0000
780@@ -42,6 +42,10 @@
781 self.assertThat(day_delegate.state, Eventually(Equals("normal")))
782
783 home_page.click_daydelegate(day_delegate)
784+
785+ # Re-get daydelegate as change in loaders changes tree
786+ day_delegate = home_page.get_daydelegate(weekdaycolumn, day)
787+
788 day_delegate.height.wait_for(day_delegate.expandedHeight)
789 self.assertThat(day_delegate.state, Eventually(Equals("expanded")))
790 self.assertEqual(day_delegate.height, day_delegate.expandedHeight)

Subscribers

People subscribed via source and target branches

to all changes: