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

Proposed by Victor Thompson on 2015-07-30
Status: Merged
Approved by: Victor Thompson on 2015-08-07
Approved revision: 80
Merged at revision: 83
Proposed branch: lp:~vthompson/ubuntu-weather-app/reboot-locationspage-empty-state
Merge into: lp:ubuntu-weather-app
Diff against target: 135 lines (+61/-5)
5 files modified
app/components/LocationsPageEmptyStateComponent.qml (+40/-0)
app/ui/HomePage.qml (+1/-1)
app/ui/LocationsPage.qml (+10/-0)
debian/changelog (+2/-0)
po/com.ubuntu.weather.pot (+8/-4)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/reboot-locationspage-empty-state
Reviewer Review Type Date Requested Status
Victor Thompson Approve on 2015-08-07
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-08-07
Andrew Hayzen 2015-07-30 Approve on 2015-08-06
Review via email: mp+266350@code.launchpad.net

Commit message

* Rename EmptyStateComponent to HomePageEmptyStateComponent
* Add a LocationsPageEmptyStateComponent

Description of the change

* Rename EmptyStateComponent to HomePageEmptyStateComponent
* Add a LocationsPageEmptyStateComponent

To post a comment you must log in.
Andrew Hayzen (ahayzen) wrote :

Hah I was going to do this as well, great minds think alike :-)

One inline comment

review: Needs Fixing
Andrew Hayzen (ahayzen) wrote :

LGTM, thanks for the extra fixes :-)

review: Approve
79. By Victor Thompson on 2015-08-07

Regenerate pot file

80. By Victor Thompson on 2015-08-07

Merge of trunk and resolve conflicts

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== renamed file 'app/components/EmptyStateComponent.qml' => 'app/components/HomePageEmptyStateComponent.qml'
2=== added file 'app/components/LocationsPageEmptyStateComponent.qml'
3--- app/components/LocationsPageEmptyStateComponent.qml 1970-01-01 00:00:00 +0000
4+++ app/components/LocationsPageEmptyStateComponent.qml 2015-08-07 01:23:00 +0000
5@@ -0,0 +1,40 @@
6+/*
7+ * Copyright (C) 2015 Canonical Ltd
8+ *
9+ * This file is part of Ubuntu Weather App
10+ *
11+ * Ubuntu Weather App is free software: you can redistribute it and/or modify
12+ * it under the terms of the GNU General Public License version 3 as
13+ * published by the Free Software Foundation.
14+ *
15+ * Ubuntu Weather App is distributed in the hope that it will be useful,
16+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+ * GNU General Public License for more details.
19+ *
20+ * You should have received a copy of the GNU General Public License
21+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
22+ */
23+
24+import QtQuick 2.4
25+import Ubuntu.Components 1.2
26+import "../components"
27+
28+
29+Item {
30+ anchors {
31+ fill: parent
32+ margins: units.gu(2)
33+ }
34+
35+ Label {
36+ id: emptyStateLabel
37+ anchors {
38+ centerIn: parent
39+ }
40+ horizontalAlignment: Text.AlignHCenter
41+ text: i18n.tr("No locations found. Tap the plus icon to search for one.")
42+ width: parent.width - units.gu(4)
43+ wrapMode: Text.WordWrap
44+ }
45+}
46
47=== modified file 'app/ui/HomePage.qml'
48--- app/ui/HomePage.qml 2015-07-29 21:34:56 +0000
49+++ app/ui/HomePage.qml 2015-08-07 01:23:00 +0000
50@@ -192,7 +192,7 @@
51 fill: parent
52 }
53 asynchronous: true
54- source: "../components/EmptyStateComponent.qml"
55+ source: "../components/HomePageEmptyStateComponent.qml"
56 visible: status === Loader.Ready && active
57 }
58 }
59
60=== modified file 'app/ui/LocationsPage.qml'
61--- app/ui/LocationsPage.qml 2015-08-02 13:43:34 +0000
62+++ app/ui/LocationsPage.qml 2015-08-07 01:23:00 +0000
63@@ -250,6 +250,16 @@
64 }
65 }
66
67+ Loader {
68+ active: locationsList === null || locationsList.length === 0
69+ anchors {
70+ fill: parent
71+ }
72+ asynchronous: true
73+ source: "../components/LocationsPageEmptyStateComponent.qml"
74+ visible: status === Loader.Ready && active
75+ }
76+
77 function populateLocationsModel() {
78 currentLocationModel.clear()
79 locationsModel.clear()
80
81=== modified file 'debian/changelog'
82--- debian/changelog 2015-08-07 00:12:11 +0000
83+++ debian/changelog 2015-08-07 01:23:00 +0000
84@@ -9,6 +9,8 @@
85 * Default to OWM if the key file for TWC is blank.
86 * Add sunrise and sunset icons from the spec
87 * Fix the CMakeLists.txt to include the app icon
88+ * Rename EmptyStateComponent to HomePageEmptyStateComponent
89+ * Add a LocationsPageEmptyStateComponent
90
91 [ Andrew Hayzen ]
92 * Add mocked locations for autopilot and add a test using the data
93
94=== modified file 'po/com.ubuntu.weather.pot'
95--- po/com.ubuntu.weather.pot 2015-08-06 00:10:53 +0000
96+++ po/com.ubuntu.weather.pot 2015-08-07 01:23:00 +0000
97@@ -8,7 +8,7 @@
98 msgstr ""
99 "Project-Id-Version: ubuntu-weather-app\n"
100 "Report-Msgid-Bugs-To: \n"
101-"POT-Creation-Date: 2015-08-06 01:02+0100\n"
102+"POT-Creation-Date: 2015-08-06 19:16-0500\n"
103 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
104 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
105 "Language-Team: LANGUAGE <LL@li.org>\n"
106@@ -46,15 +46,15 @@
107 msgid "Sunset"
108 msgstr ""
109
110-#: ../app/components/EmptyStateComponent.qml:51
111+#: ../app/components/HomePageEmptyStateComponent.qml:51
112 msgid "Searching for current location..."
113 msgstr ""
114
115-#: ../app/components/EmptyStateComponent.qml:52
116+#: ../app/components/HomePageEmptyStateComponent.qml:52
117 msgid "Cannot determine your location"
118 msgstr ""
119
120-#: ../app/components/EmptyStateComponent.qml:62
121+#: ../app/components/HomePageEmptyStateComponent.qml:62
122 msgid "Manually add a location by swiping up from the bottom of the display"
123 msgstr ""
124
125@@ -66,6 +66,10 @@
126 msgid "Remove"
127 msgstr ""
128
129+#: ../app/components/LocationsPageEmptyStateComponent.qml:36
130+msgid "No locations found. Tap the plus icon to search for one."
131+msgstr ""
132+
133 #: ../app/components/MultiSelectHeadState.qml:27
134 msgid "Select All"
135 msgstr ""

Subscribers

People subscribed via source and target branches

to all changes: