Merge lp:~ibelieve/music-app/improved-nomusic-msg into lp:music-app/trusty

Proposed by Michael Spencer
Status: Merged
Approved by: Victor Thompson
Approved revision: 353
Merged at revision: 357
Proposed branch: lp:~ibelieve/music-app/improved-nomusic-msg
Merge into: lp:music-app/trusty
Diff against target: 127 lines (+55/-22)
1 file modified
music-app.qml (+55/-22)
To merge this branch: bzr merge lp:~ibelieve/music-app/improved-nomusic-msg
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+207795@code.launchpad.net

Commit message

Improved the no music message

Description of the change

Currently, when there is no music available, a message is displayed explaining what needs to happen. This doesn't make much sense without a message explaining the problem.

This adds a large & bold header stating that there is no music available. This follows the design used in Friends when no accounts are set up.

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
Victor Thompson (vthompson) wrote :

Thanks Michael! Could you also see what it might take to disable tab navigation while in this state? I think that is also something that should change in relation to the empty state.

review: Needs Fixing
353. By Michael Spencer

Only display the Music tab when there is no music

Revision history for this message
Michael Spencer (ibelieve) wrote :

The last commit should do what you want. It works the same way that Friends works, by pushing a separate page if there is no music. The back button is removed, so the only way to get the page to go away is to add music.

Which brings up the question, must the app be restarted, or will the app recognize music if it is added? I'm running Ubuntu in a development VM, so I have no easy way to test this.

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
Victor Thompson (vthompson) wrote :

Currently the app only loads the views upon initialization, so the app would need to be restarted.

review: Approve
Revision history for this message
Victor Thompson (vthompson) wrote :

However, if this changes in the future, it is nice that the property change to noMusic will still allow us to go back to the normal state.

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

Looks much better than before, the only issue I can see is that if noMusic is calculated as True to start with (so it never changes from false to true) it creates some strange results. This could become more of an issue when we move away from Grilo and we don't get the delay of griloModel.loaded.

Otherwise is there any reason this hasn't been merged?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'music-app.qml'
2--- music-app.qml 2014-02-20 12:06:40 +0000
3+++ music-app.qml 2014-02-22 17:46:43 +0000
4@@ -1116,6 +1116,56 @@
5
6 PageStack {
7 id: pageStack
8+
9+ Page {
10+ id: emptyPage
11+ title: i18n.tr("Music")
12+ visible: false
13+
14+ property bool noMusic: griloModel.count === 0 && griloModel.loaded === true
15+
16+ onNoMusicChanged: {
17+ if (noMusic)
18+ pageStack.push(emptyPage)
19+ else if (pageStack.currentPage == emptyPage)
20+ pageStack.pop()
21+ }
22+
23+ tools: ToolbarItems {
24+ back: null
25+ locked: true
26+ opened: false
27+ }
28+
29+ // Overlay to show when no tracks detected on the device
30+ Rectangle {
31+ id: libraryEmpty
32+ anchors.fill: parent
33+ anchors.topMargin: -emptyPage.header.height
34+ color: styleMusic.libraryEmpty.backgroundColor
35+
36+ Column {
37+ anchors.centerIn: parent
38+
39+
40+ Label {
41+ anchors.horizontalCenter: parent.horizontalCenter
42+ color: styleMusic.libraryEmpty.labelColor
43+ fontSize: "large"
44+ font.bold: true
45+ text: "No music found"
46+ }
47+
48+ Label {
49+ anchors.horizontalCenter: parent.horizontalCenter
50+ color: styleMusic.libraryEmpty.labelColor
51+ fontSize: "medium"
52+ text: "Please import music and restart the app"
53+ }
54+ }
55+ }
56+ }
57+
58 Tabs {
59 id: tabs
60 anchors {
61@@ -1132,7 +1182,7 @@
62 id: startTab
63 objectName: "starttab"
64 anchors.fill: parent
65- title: i18n.tr("Music")
66+ title: page.title
67
68 // Tab content begins here
69 page: MusicStart {
70@@ -1149,7 +1199,7 @@
71 id: artistsTab
72 objectName: "artiststab"
73 anchors.fill: parent
74- title: i18n.tr("Artists")
75+ title: page.title
76
77 // tab content
78 page: MusicArtists {
79@@ -1166,7 +1216,7 @@
80 id: albumsTab
81 objectName: "albumstab"
82 anchors.fill: parent
83- title: i18n.tr("Albums")
84+ title: page.title
85
86 // Tab content begins here
87 page: MusicAlbums {
88@@ -1183,7 +1233,7 @@
89 id: tracksTab
90 objectName: "trackstab"
91 anchors.fill: parent
92- title: i18n.tr("Songs")
93+ title: page.title
94
95 // Tab content begins here
96 page: MusicTracks {
97@@ -1201,7 +1251,7 @@
98 id: playlistTab
99 objectName: "playlisttab"
100 anchors.fill: parent
101- title: i18n.tr("Playlists")
102+ title: page.title
103
104 // Tab content begins here
105 page: MusicPlaylists {
106@@ -1270,21 +1320,4 @@
107 return minutes + ":" + (seconds<10 ? "0"+seconds : seconds);
108 }
109
110- // Overlay to show when no tracks detected on the device
111- Rectangle {
112- id: libraryEmpty
113- anchors.fill: parent
114- color: styleMusic.libraryEmpty.backgroundColor
115- visible: griloModel.count === 0 && griloModel.loaded === true
116-
117- Label {
118- anchors.horizontalCenter: parent.horizontalCenter
119- anchors.verticalCenter: parent.verticalCenter
120- color: styleMusic.libraryEmpty.labelColor
121- fontSize: "medium"
122- text: "Please import music and restart the app"
123- }
124-
125- }
126-
127 } // end of main view

Subscribers

People subscribed via source and target branches

to status/vote changes: