Merge lp:~vthompson/ubuntu-weather-app/reboot-empty-state into lp:ubuntu-weather-app

Proposed by Victor Thompson
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 57
Merged at revision: 55
Proposed branch: lp:~vthompson/ubuntu-weather-app/reboot-empty-state
Merge into: lp:ubuntu-weather-app
Diff against target: 118 lines (+39/-12)
5 files modified
app/ubuntu-weather-app.qml (+24/-8)
app/ui/AddLocationPage.qml (+0/-1)
po/com.ubuntu.weather.pot (+5/-1)
tests/autopilot/ubuntu_weather_app/__init__.py (+5/-0)
tests/autopilot/ubuntu_weather_app/tests/test_weather.py (+5/-2)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/reboot-empty-state
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nekhelesh Ramananthan (community) Approve
Review via email: mp+261916@code.launchpad.net

Commit message

Initial empty state

Description of the change

This mp introduces a simple 5 second timer and label that is displayed to the user while the Location is being determined.

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
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
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
Nekhelesh Ramananthan (nik90) wrote :

Simple and very effective! Very nice! Just a minor thing, since this code is essential run once in the lifetime of the app, it would have been nice to have it in a Loader. But I guess this can be done in a future MP.

Approving!

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

Seems to be a conflict in po/com.ubuntu.weather.pot. Pls merge trunk and push again.

57. By Victor Thompson

Merge trunk and resolve conflict.

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/ubuntu-weather-app.qml'
--- app/ubuntu-weather-app.qml 2015-06-21 13:28:09 +0000
+++ app/ubuntu-weather-app.qml 2015-06-21 16:06:11 +0000
@@ -64,14 +64,6 @@
64 Component.onCompleted: {64 Component.onCompleted: {
65 storage.getLocations(fillPages);65 storage.getLocations(fillPages);
66 refreshData();66 refreshData();
67
68 /*
69 TODO: Also add a check to determine if current location can be
70 resolved.
71 */
72 if (locationsList.length == 0) {
73 mainPageStack.push(Qt.resolvedUrl("ui/AddLocationPage.qml"));
74 }
75 }67 }
7668
77 /*69 /*
@@ -163,6 +155,30 @@
163 }155 }
164 }156 }
165157
158 Column {
159 anchors.centerIn: parent
160 spacing: units.gu(4)
161 visible: (locationsList == null || locationsList.length == 0) && mainPageStack.depth == 1
162 z: 1000
163
164 Label {
165 id: emptyStateLabel
166 anchors.horizontalCenter: parent.horizontalCenter
167 text: i18n.tr("Searching for current location...")
168 }
169
170 Button {
171 id: emptyStateButton
172 objectName: "emptyStateButton"
173
174 anchors.horizontalCenter: parent.horizontalCenter
175
176 text: i18n.tr("Add a manual location")
177
178 onTriggered: mainPageStack.push(Qt.resolvedUrl("ui/AddLocationPage.qml"));
179 }
180 }
181
166 Data.Storage {182 Data.Storage {
167 id: storage183 id: storage
168184
169185
=== modified file 'app/ui/AddLocationPage.qml'
--- app/ui/AddLocationPage.qml 2015-06-18 01:42:03 +0000
+++ app/ui/AddLocationPage.qml 2015-06-21 16:06:11 +0000
@@ -44,7 +44,6 @@
44 backAction: Action {44 backAction: Action {
45 iconName: "back"45 iconName: "back"
46 text: i18n.tr("Back")46 text: i18n.tr("Back")
47 visible: locationsList.length > 0
48 onTriggered: mainPageStack.pop()47 onTriggered: mainPageStack.pop()
49 }48 }
50 actions: [49 actions: [
5150
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-06-18 01:42:03 +0000
+++ po/com.ubuntu.weather.pot 2015-06-21 16:06:11 +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-06-09 19:05-0500\n"11"POT-Creation-Date: 2015-06-14 16:44-0500\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"
@@ -66,6 +66,10 @@
66msgid "Cancel selection"66msgid "Cancel selection"
67msgstr ""67msgstr ""
6868
69#: ../app/ubuntu-weather-app.qml:177
70msgid "Searching for current location..."
71msgstr ""
72
69#: ../app/ui/AddLocationPage.qml:3073#: ../app/ui/AddLocationPage.qml:30
70msgid "Select a city"74msgid "Select a city"
71msgstr ""75msgstr ""
7276
=== modified file 'tests/autopilot/ubuntu_weather_app/__init__.py'
--- tests/autopilot/ubuntu_weather_app/__init__.py 2015-06-03 17:49:50 +0000
+++ tests/autopilot/ubuntu_weather_app/__init__.py 2015-06-21 16:06:11 +0000
@@ -32,6 +32,11 @@
32 return self.main_view.wait_select_single(32 return self.main_view.wait_select_single(
33 AddLocationPage, objectName="addLocationPage")33 AddLocationPage, objectName="addLocationPage")
3434
35 def click_add_location_button(self):
36 add_location_button = self.main_view.wait_select_single(
37 "Button", objectName="emptyStateButton")
38 self.app.pointing_device.click_object(add_location_button)
39
3540
36class Page(UbuntuUIToolkitCustomProxyObjectBase):41class Page(UbuntuUIToolkitCustomProxyObjectBase):
37 """Autopilot helper for Pages."""42 """Autopilot helper for Pages."""
3843
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_weather.py'
--- tests/autopilot/ubuntu_weather_app/tests/test_weather.py 2015-05-29 02:38:23 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/test_weather.py 2015-06-21 16:06:11 +0000
@@ -24,8 +24,11 @@
24 def setUp(self):24 def setUp(self):
25 super(TestMainWindow, self).setUp()25 super(TestMainWindow, self).setUp()
2626
27 def test_add_location_page_start(self):27 def test_add_location_button(self):
28 """ tests that the add location page is shown on startup"""28 """ tests that the add location page is shown after the Add Location
29 button is clicked """
30
31 self.app.click_add_location_button()
2932
30 add_location_page = self.app.get_add_location_page()33 add_location_page = self.app.get_add_location_page()
3134

Subscribers

People subscribed via source and target branches

to all changes: