Merge lp:~vthompson/music-app/remix-empty-states-001 into lp:music-app/remix

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 682
Merged at revision: 688
Proposed branch: lp:~vthompson/music-app/remix-empty-states-001
Merge into: lp:music-app/remix
Diff against target: 103 lines (+63/-3)
2 files modified
LibraryListModel.qml (+1/-0)
music-app.qml (+62/-3)
To merge this branch: bzr merge lp:~vthompson/music-app/remix-empty-states-001
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+238929@code.launchpad.net

Commit message

Initial empty state prototype

Description of the change

This is the first drop additional empty state pages for 1) playlists, 2) recent items.

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)
679. By Victor Thompson

merge of remix and fix issues

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
680. By Victor Thompson

Wait until model is loaded before showing empty state

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
681. By Victor Thompson

Fix bad check

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
Andrew Hayzen (ahayzen) wrote :

Please apply this diff to remove the flicker

=== modified file LibraryListModel.qml
--- LibraryListModel.qml 2014-09-20 10:50:45 +0000
+++ LibraryListModel.qml 2014-10-21 21:36:46 +0000
@@ -33,6 +33,7 @@
     property var param: null
     property bool canLoad: true
     property bool preLoadComplete: false
+ property alias workerComplete: worker.completed

     onCanLoadChanged: {
         /* If canLoad has been set back to true then check if there are any

=== modified file music-app.qml
--- music-app.qml 2014-10-21 18:30:27 +0000
+++ music-app.qml 2014-10-21 21:36:46 +0000
@@ -1156,8 +1156,8 @@
         visible: noMusic || noPlaylists || noRecent

         property bool noMusic: allSongsModel.rowCount === 0 && allSongsModel.status === SongsModel.Ready && loadedUI
- property bool noPlaylists: playlistModel.model.count === 0 && playlistModel.complete
- property bool noRecent: recentModel.model.count === 0 && recentModel.complete
+ property bool noPlaylists: playlistModel.model.count === 0 && playlistModel.workerComplete
+ property bool noRecent: recentModel.model.count === 0 && recentModel.workerComplete
 tools: ToolbarItems {
             back: null
             locked: true

review: Needs Fixing
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

1 inline comment

682. By Victor Thompson

update checks to prevent flicker

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
Andrew Hayzen (ahayzen) wrote :

LGTM the flicker has gone :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'LibraryListModel.qml'
2--- LibraryListModel.qml 2014-09-20 10:50:45 +0000
3+++ LibraryListModel.qml 2014-10-21 21:58:19 +0000
4@@ -29,6 +29,7 @@
5 property var linkLibraryListModel: libraryListModelItem
6 }
7 property alias count: libraryModel.count
8+ property alias workerComplete: worker.completed
9 property var query: null
10 property var param: null
11 property bool canLoad: true
12
13=== modified file 'music-app.qml'
14--- music-app.qml 2014-10-21 14:59:51 +0000
15+++ music-app.qml 2014-10-21 21:58:19 +0000
16@@ -1170,10 +1170,11 @@
17 Page {
18 id: emptyPage
19 title: i18n.tr("Music")
20- visible: noMusic
21+ visible: noMusic || noPlaylists || noRecent
22
23 property bool noMusic: allSongsModel.rowCount === 0 && allSongsModel.status === SongsModel.Ready && loadedUI
24-
25+ property bool noPlaylists: playlistModel.model.count === 0 && playlistModel.workerComplete
26+ property bool noRecent: recentModel.model.count === 0 && recentModel.workerComplete
27 tools: ToolbarItems {
28 back: null
29 locked: true
30@@ -1185,7 +1186,8 @@
31 id: libraryEmpty
32 anchors.fill: parent
33 anchors.topMargin: -emptyPage.header.height
34- color: styleMusic.libraryEmpty.backgroundColor
35+ color: mainView.backgroundColor
36+ visible: emptyPage.noMusic
37
38 Column {
39 anchors.centerIn: parent
40@@ -1206,6 +1208,63 @@
41 }
42 }
43 }
44+
45+ // Overlay to show when no playlists are on the device
46+ Rectangle {
47+ id: playlistsEmpty
48+ anchors.fill: parent
49+ anchors.topMargin: -emptyPage.header.height
50+ color: mainView.backgroundColor
51+ visible: emptyPage.noPlaylists && !emptyPage.noMusic && tabs.selectedTab.index === 4
52+
53+ Column {
54+ anchors.centerIn: parent
55+
56+ Label {
57+ anchors.horizontalCenter: parent.horizontalCenter
58+ color: styleMusic.libraryEmpty.labelColor
59+ fontSize: "large"
60+ font.bold: true
61+ text: i18n.tr("No playlists found")
62+ }
63+
64+ Label {
65+ anchors.horizontalCenter: parent.horizontalCenter
66+ color: styleMusic.libraryEmpty.labelColor
67+ fontSize: "medium"
68+ text: i18n.tr("Click the + to create a playlist")
69+ }
70+ }
71+ }
72+
73+ // Overlay to show when no recent items are on the device
74+ Rectangle {
75+ id: recentEmpty
76+ anchors.fill: parent
77+ anchors.topMargin: -emptyPage.header.height
78+ color: mainView.backgroundColor
79+ visible: emptyPage.noRecent && !emptyPage.noMusic && tabs.selectedTab.index === 0
80+
81+ Column {
82+ anchors.centerIn: parent
83+
84+ Label {
85+ anchors.horizontalCenter: parent.horizontalCenter
86+ color: styleMusic.libraryEmpty.labelColor
87+ fontSize: "large"
88+ font.bold: true
89+ text: i18n.tr("No recent albums or playlists found")
90+ }
91+
92+ Label {
93+ anchors.horizontalCenter: parent.horizontalCenter
94+ color: styleMusic.libraryEmpty.labelColor
95+ fontSize: "medium"
96+ text: i18n.tr("Play some music to see your favorites")
97+ }
98+ }
99+ }
100+
101 }
102
103 LoadingSpinnerComponent {

Subscribers

People subscribed via source and target branches