Merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/new-empty-state into lp:ubuntu-docviewer-app

Proposed by Stefano Verzegnassi
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 280
Merged at revision: 286
Proposed branch: lp:~verzegnassi-stefano/ubuntu-docviewer-app/new-empty-state
Merge into: lp:ubuntu-docviewer-app
Diff against target: 276 lines (+86/-96)
4 files modified
po/com.ubuntu.docviewer.pot (+8/-8)
src/app/qml/common/EmptyState.qml (+35/-23)
src/app/qml/documentPage/DocumentEmptyState.qml (+43/-64)
src/app/qml/documentPage/SearchEmptyState.qml (+0/-1)
To merge this branch: bzr merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/new-empty-state
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Needs Fixing
Nicholas Skaggs (community) Needs Fixing
Roman Shchekin Approve
Review via email: mp+283802@code.launchpad.net

Commit message

Apply new style for empty state everywhere

Description of the change

Apply new style for empty state everywhere

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

http://people.canonical.com/~alan/screenshots/device-2016-01-29-124151.png

Looks great.

One minor nitpick on the wording, I'd probably go with:-

"No documents found" (plural)

and

"... insert removable media containing documents." (rather than 'with').

review: Approve
Revision history for this message
Roman Shchekin (mrqtros) wrote :

LGTM

review: Approve
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :

FAILED: Autolanding.
Merging failed. More details in the following jenkins job:
https://core-apps-jenkins.ubuntu.com/job/run-ap-tests-autolanding/821/
Executed test runs:
    None: https://core-apps-jenkins.ubuntu.com/job/generic-land-mp/1523/console

review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://core-apps-jenkins.ubuntu.com/job/docviewer-app-autolanding/140/
Executed test runs:
    None: https://core-apps-jenkins.ubuntu.com/job/generic-land-mp/1529/console

review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://core-apps-jenkins.ubuntu.com/job/docviewer-app-autolanding/143/
Executed test runs:
    None: https://core-apps-jenkins.ubuntu.com/job/generic-land-mp/1534/console

review: Needs Fixing (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Merging 'lp:ubuntu-docviewer-app/reboot' in to 'build_dir'.
Text conflict in po/com.ubuntu.docviewer.pot
1 conflicts encountered.
bzr: ERROR: Conflicts from merge

review: Needs Fixing
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Text conflict...

Building tree.
Retrieving 'lp:~verzegnassi-stefano/ubuntu-docviewer-app/new-empty-state' to put at 'build_dir'.
Merging 'lp:ubuntu-docviewer-app/reboot' in to 'build_dir'.
Text conflict in po/com.ubuntu.docviewer.pot
1 conflicts encountered.
bzr: ERROR: Conflicts from merge
Build step 'Execute shell' marked build as failure

review: Needs Fixing
280. By Stefano Verzegnassi

Merged trunk, updated .pot

Revision history for this message
Jenkins Bot (ubuntu-core-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
1=== modified file 'po/com.ubuntu.docviewer.pot'
2--- po/com.ubuntu.docviewer.pot 2016-01-29 12:23:24 +0000
3+++ po/com.ubuntu.docviewer.pot 2016-02-02 11:34:49 +0000
4@@ -8,7 +8,7 @@
5 msgstr ""
6 "Project-Id-Version: \n"
7 "Report-Msgid-Bugs-To: \n"
8-"POT-Creation-Date: 2016-01-29 13:22+0100\n"
9+"POT-Creation-Date: 2016-02-02 12:33+0100\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13@@ -178,14 +178,14 @@
14 msgid "Share"
15 msgstr ""
16
17-#: ../src/app/qml/documentPage/DocumentEmptyState.qml:75
18-msgid "No document found"
19+#: ../src/app/qml/documentPage/DocumentEmptyState.qml:27
20+msgid "No documents found"
21 msgstr ""
22
23-#: ../src/app/qml/documentPage/DocumentEmptyState.qml:84
24+#: ../src/app/qml/documentPage/DocumentEmptyState.qml:28
25 msgid ""
26 "Connect your device to any computer and simply drag files to the Documents "
27-"folder or insert removable media with documents."
28+"folder or insert removable media containing documents."
29 msgstr ""
30
31 #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings.
32@@ -216,7 +216,7 @@
33 msgstr ""
34
35 #: ../src/app/qml/documentPage/DocumentPage.qml:23
36-#: /tmp/uitk-bottom-edge-build/po/com.ubuntu.docviewer.desktop.in.in.h:3
37+#: /tmp/new-empty-state-build/po/com.ubuntu.docviewer.desktop.in.in.h:3
38 msgid "Documents"
39 msgstr ""
40
41@@ -449,10 +449,10 @@
42 msgid "copy %1"
43 msgstr ""
44
45-#: /tmp/uitk-bottom-edge-build/po/com.ubuntu.docviewer.desktop.in.in.h:1
46+#: /tmp/new-empty-state-build/po/com.ubuntu.docviewer.desktop.in.in.h:1
47 msgid "Document Viewer"
48 msgstr ""
49
50-#: /tmp/uitk-bottom-edge-build/po/com.ubuntu.docviewer.desktop.in.in.h:2
51+#: /tmp/new-empty-state-build/po/com.ubuntu.docviewer.desktop.in.in.h:2
52 msgid "documents;viewer;pdf;reader;"
53 msgstr ""
54
55=== modified file 'src/app/qml/common/EmptyState.qml'
56--- src/app/qml/common/EmptyState.qml 2015-11-01 16:50:23 +0000
57+++ src/app/qml/common/EmptyState.qml 2016-02-02 11:34:49 +0000
58@@ -1,5 +1,5 @@
59 /*
60- * Copyright (C) 2014 Canonical Ltd
61+ * Copyright (C) 2014, 2015, 2016 Canonical Ltd
62 *
63 * This file is part of Ubuntu Clock App
64 *
65@@ -24,39 +24,51 @@
66 icon, title and subtitle to describe the empty state.
67 */
68
69-Item {
70+Column {
71 id: emptyState
72+ spacing: units.gu(4)
73+ width: units.gu(36)
74
75 // Public APIs
76+ default property alias iconPlaceholder: iconContainer.data
77 property alias iconName: emptyIcon.name
78 property alias title: emptyLabel.text
79 property alias subTitle: emptySublabel.text
80
81- height: childrenRect.height
82-
83- Icon {
84- id: emptyIcon
85- anchors.horizontalCenter: parent.horizontalCenter
86- height: units.gu(10)
87- width: height
88- color: "#BBBBBB"
89+ Item {
90+ width: childrenRect.width
91+ height: childrenRect.height
92+ Icon {
93+ id: emptyIcon
94+ height: visible ? units.gu(10) : 0
95+ width: visible ? height : 0
96+ color: "#BBBBBB"
97+ visible: name || source
98+ }
99+ Row {
100+ id: iconContainer
101+ anchors.horizontalCenter: parent.horizontalCenter
102+ }
103 }
104
105 Label {
106 id: emptyLabel
107- anchors.top: emptyIcon.bottom
108- anchors.topMargin: units.gu(5)
109- anchors.horizontalCenter: parent.horizontalCenter
110+ width: parent.width
111+ horizontalAlignment: Text.AlignLeft
112+ textSize: Label.XLarge
113+
114+ elide: Text.ElideRight
115+ wrapMode: Text.WordWrap
116+ maximumLineCount: 2
117+ }
118+
119+ Label {
120+ id: emptySublabel
121+ width: parent.width
122+ horizontalAlignment: Text.AlignLeft
123 textSize: Label.Large
124- font.bold: true
125- }
126-
127- Label {
128- id: emptySublabel
129- anchors.top: emptyLabel.bottom
130-
131- width: parent.width
132- wrapMode: Text.Wrap
133- horizontalAlignment: Text.AlignHCenter
134+
135+ elide: Text.ElideRight
136+ wrapMode: Text.WordWrap
137 }
138 }
139
140=== modified file 'src/app/qml/documentPage/DocumentEmptyState.qml'
141--- src/app/qml/documentPage/DocumentEmptyState.qml 2015-12-10 16:53:39 +0000
142+++ src/app/qml/documentPage/DocumentEmptyState.qml 2016-02-02 11:34:49 +0000
143@@ -1,5 +1,5 @@
144 /*
145- Copyright (C) 2015 Stefano Verzegnassi
146+ Copyright (C) 2015, 2016 Stefano Verzegnassi
147
148 This program is free software: you can redistribute it and/or modify
149 it under the terms of the GNU General Public License 3 as published by
150@@ -17,73 +17,52 @@
151 import QtQuick 2.4
152 import Ubuntu.Components 1.3
153
154+import "../common"
155+
156 Item {
157 anchors.fill: parent
158
159- Column {
160+ EmptyState {
161 anchors.centerIn: parent
162- spacing: units.gu(4)
163- width: units.gu(36)
164-
165- Row {
166- anchors.horizontalCenter: parent.horizontalCenter
167-
168- Item {
169- height: parent.height
170- width: imageEmptyDownload.width + units.gu(2)
171-
172- Image {
173- id: imageEmptyDownload
174- anchors.centerIn: parent
175- antialiasing: true
176- fillMode: Image.PreserveAspectFit
177- height: units.gu(10)
178- smooth: true
179- source: Qt.resolvedUrl("graphics/document_download_icon.png")
180- }
181- }
182-
183- Item {
184- height: parent.height
185- width: units.gu(7)
186-
187- Image {
188- anchors.centerIn: parent
189- antialiasing: true
190- fillMode: Image.PreserveAspectFit
191- height: units.gu(6)
192- smooth: true
193- source: Qt.resolvedUrl("graphics/div.png")
194- }
195- }
196-
197- Image {
198- anchors.verticalCenter: parent.verticalCenter
199- antialiasing: true
200- fillMode: Image.PreserveAspectFit
201- height: units.gu(7)
202- smooth: true
203- source: Qt.resolvedUrl("graphics/sd_phone_icon.png")
204- }
205- }
206-
207- Label {
208- elide: Text.ElideRight
209- fontSize: "x-large"
210- horizontalAlignment: Text.AlignLeft
211- maximumLineCount: 2
212- text: i18n.tr("No document found")
213- width: parent.width
214- wrapMode: Text.WordWrap
215- }
216-
217- Label {
218- elide: Text.ElideRight
219- fontSize: "large"
220- horizontalAlignment: Text.AlignLeft
221- text: i18n.tr("Connect your device to any computer and simply drag files to the Documents folder or insert removable media with documents.")
222- width: parent.width
223- wrapMode: Text.WordWrap
224+ title: i18n.tr("No documents found")
225+ subTitle: i18n.tr("Connect your device to any computer and simply drag files to the Documents folder or insert removable media containing documents.")
226+
227+ Item {
228+ height: parent.height
229+ width: imageEmptyDownload.width + units.gu(2)
230+
231+ Image {
232+ id: imageEmptyDownload
233+ anchors.centerIn: parent
234+ antialiasing: true
235+ fillMode: Image.PreserveAspectFit
236+ height: units.gu(10)
237+ smooth: true
238+ source: Qt.resolvedUrl("graphics/document_download_icon.png")
239+ }
240+ }
241+
242+ Item {
243+ height: parent.height
244+ width: units.gu(7)
245+
246+ Image {
247+ anchors.centerIn: parent
248+ antialiasing: true
249+ fillMode: Image.PreserveAspectFit
250+ height: units.gu(6)
251+ smooth: true
252+ source: Qt.resolvedUrl("graphics/div.png")
253+ }
254+ }
255+
256+ Image {
257+ anchors.verticalCenter: parent.verticalCenter
258+ antialiasing: true
259+ fillMode: Image.PreserveAspectFit
260+ height: units.gu(7)
261+ smooth: true
262+ source: Qt.resolvedUrl("graphics/sd_phone_icon.png")
263 }
264 }
265 }
266
267=== modified file 'src/app/qml/documentPage/SearchEmptyState.qml'
268--- src/app/qml/documentPage/SearchEmptyState.qml 2015-11-01 16:50:23 +0000
269+++ src/app/qml/documentPage/SearchEmptyState.qml 2016-02-02 11:34:49 +0000
270@@ -27,6 +27,5 @@
271 iconName: "search"
272
273 anchors.centerIn: parent
274- width: parent.width
275 }
276 }

Subscribers

People subscribed via source and target branches