Merge lp:~renatofilho/address-book-app/fix-1367325 into lp:~phablet-team/address-book-app/staging

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Arthur Mello
Approved revision: 299
Merged at revision: 300
Proposed branch: lp:~renatofilho/address-book-app/fix-1367325
Merge into: lp:~phablet-team/address-book-app/staging
Diff against target: 38 lines (+28/-0)
1 file modified
src/imports/ContactList/ContactListPage.qml (+28/-0)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/fix-1367325
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Arthur Mello (community) Approve
Review via email: mp+234863@code.launchpad.net

Commit message

Implemented empty state message on contact list, based on messaging app.

Description of the change

HOW TO TEST
===========

Make sure that you contact list is empty.
1 - Open the address-book-app
2 - After the spinner run for a while the empty message should appear
3 - Create a new contact
4 - Go back to contact list, the list should show the contact and the "empty" message should disappear.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Arthur Mello (artmello) wrote :

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/ContactList/ContactListPage.qml'
2--- src/imports/ContactList/ContactListPage.qml 2014-09-03 02:25:00 +0000
3+++ src/imports/ContactList/ContactListPage.qml 2014-09-16 18:24:18 +0000
4@@ -584,6 +584,34 @@
5 id: keyboard
6 }
7
8+ Column {
9+ id: emptyStateScreen
10+ anchors.centerIn: parent
11+ height: childrenRect.height
12+ width: childrenRect.width
13+ spacing: units.gu(2)
14+
15+ visible: (contactList.count === 0 && !indicator.visible)
16+ Icon {
17+ id: emptyStateIcon
18+ anchors.horizontalCenter: emptyStateLabel.horizontalCenter
19+ height: units.gu(5)
20+ width: units.gu(5)
21+ opacity: 0.3
22+ name: "contact"
23+ }
24+ Label {
25+ id: emptyStateLabel
26+ width: mainPage.width - units.gu(12)
27+ height: paintedHeight
28+ text: i18n.tr("Create a new contact by swiping up from the bottom of the screen.")
29+ color: "#5d5d5d"
30+ fontSize: "x-large"
31+ wrapMode: Text.WordWrap
32+ horizontalAlignment: Text.AlignHCenter
33+ }
34+ }
35+
36 Connections {
37 target: mainPage.contactModel
38 onContactsChanged: {

Subscribers

People subscribed via source and target branches