Merge lp:~ahayzen/music-app/now-playing-to-tab into lp:music-app/trusty

Proposed by Andrew Hayzen
Status: Rejected
Rejected by: Andrew Hayzen
Proposed branch: lp:~ahayzen/music-app/now-playing-to-tab
Merge into: lp:music-app/trusty
Diff against target: 222 lines (+43/-86)
3 files modified
MusicNowPlaying.qml (+22/-77)
MusicToolbar.qml (+2/-2)
music-app.qml (+19/-7)
To merge this branch: bzr merge lp:~ahayzen/music-app/now-playing-to-tab
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
Victor Thompson Needs Information
Review via email: mp+209140@code.launchpad.net

Commit message

* Move now playing into its own tab

Description of the change

Move now playing into its own tab

To post a comment you must log in.
Revision history for this message
Victor Thompson (vthompson) wrote :

Let's not merge this until we've reviewed the community design(s).

review: Needs Information
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

364. By Andrew Hayzen

* Add empty state to now playing page

363. By Andrew Hayzen

* Fix for missed case of showing nowPlaying

362. By Andrew Hayzen

* Remove back page as now using tabs

361. By Andrew Hayzen

* Initial changes to move now playing to tab

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MusicNowPlaying.qml'
2--- MusicNowPlaying.qml 2014-02-22 22:12:21 +0000
3+++ MusicNowPlaying.qml 2014-03-03 22:50:43 +0000
4@@ -31,22 +31,12 @@
5 id: nowPlaying
6 objectName: "nowplayingpage"
7 anchors.fill: parent
8- title: i18n.tr("Queue")
9- visible: false
10+ title: i18n.tr("Now Playing")
11
12 onVisibleChanged: {
13 if (visible === true)
14 {
15- header.hide();
16- header.opacity = 0;
17- header.enabled = false;
18- musicToolbar.setPage(nowPlaying, musicToolbar.currentPage);
19- }
20- else
21- {
22- header.enabled = true;
23- header.opacity = 1;
24- header.show();
25+ musicToolbar.setPage(nowPlaying);
26 }
27 }
28
29@@ -89,17 +79,36 @@
30 customdebug("MusicQueue update currentIndex: " + file);
31 }
32
33+ Column {
34+ anchors.centerIn: parent
35+ visible: trackQueue.isEmpty === true
36+ Label {
37+ anchors.horizontalCenter: parent.horizontalCenter
38+ color: styleMusic.libraryEmpty.labelColor
39+ fontSize: "large"
40+ font.bold: true
41+ text: "No songs queued"
42+ }
43+
44+ Label {
45+ anchors.horizontalCenter: parent.horizontalCenter
46+ color: styleMusic.libraryEmpty.labelColor
47+ fontSize: "medium"
48+ text: "Tap on a song to start playing"
49+ }
50+ }
51+
52 ListView {
53 id: queuelist
54 objectName: "queuelist"
55 anchors.fill: parent
56 anchors.bottomMargin: musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight
57- anchors.topMargin: nowPlayingBackButton.height
58 spacing: units.gu(1)
59 delegate: queueDelegate
60 model: trackQueue.model
61 highlightFollowsCurrentItem: false
62 state: "normal"
63+ visible: trackQueue.isEmpty === false
64 states: [
65 State {
66 name: "normal"
67@@ -803,68 +812,4 @@
68 }
69 }
70 }
71-
72- Rectangle {
73- id: nowPlayingBackButton
74- anchors.left: parent.left
75- anchors.right: parent.right
76- color: styleMusic.toolbar.fullBackgroundColor
77- height: units.gu(3.1)
78-
79- state: musicToolbar.opened ? "shown" : "hidden"
80- states: [
81- State {
82- name: "shown"
83- PropertyChanges {
84- target: nowPlayingBackButton
85- y: 0
86- }
87- },
88- State {
89- name: "hidden"
90- PropertyChanges {
91- target: nowPlayingBackButton
92- y: -height
93- }
94- }
95- ]
96-
97- transitions: Transition {
98- from: "hidden,shown"
99- to: "shown,hidden"
100- NumberAnimation {
101- duration: 100
102- properties: "y"
103- }
104- }
105-
106- Image {
107- id: expandItem
108- anchors.horizontalCenter: parent.horizontalCenter
109- anchors.verticalCenter: parent.verticalCenter
110- source: "images/dropdown-menu.svg"
111- height: units.gu(2)
112- width: height
113- }
114-
115- MouseArea {
116- objectName: "nowPlayingBackButtonObject"
117- anchors.fill: parent
118-
119- onClicked: {
120- collapseSwipeDelete(-1); // collapse all expands
121- musicToolbar.goBack();
122- }
123- }
124-
125- /* Border at the bottom */
126- Rectangle {
127- anchors.bottom: parent.bottom
128- anchors.left: parent.left
129- anchors.right: parent.right
130- color: styleMusic.common.white
131- height: units.gu(0.1)
132- opacity: 0.2
133- }
134- }
135 }
136
137=== modified file 'MusicToolbar.qml'
138--- MusicToolbar.qml 2014-02-22 19:59:15 +0000
139+++ MusicToolbar.qml 2014-03-03 22:50:43 +0000
140@@ -479,7 +479,7 @@
141 MouseArea {
142 anchors.fill: parent
143 onClicked: {
144- nowPlaying.visible = true
145+ tabs.selectedTabIndex = nowPlayingTab.index;
146 }
147 }
148
149@@ -614,7 +614,7 @@
150 }
151 enabled: !trackQueue.isEmpty
152 onClicked: {
153- nowPlaying.visible = true;
154+ tabs.selectedTabIndex = nowPlayingTab.index;
155 }
156 }
157
158
159=== modified file 'music-app.qml'
160--- music-app.qml 2014-02-24 00:16:55 +0000
161+++ music-app.qml 2014-03-03 22:50:43 +0000
162@@ -471,7 +471,7 @@
163 player.pause()
164 } else { // We are not on the now playing page
165 // Show the Now Playing page and make sure the track is visible
166- nowPlaying.visible = true;
167+ tabs.selectedTabIndex = nowPlayingTab.index;
168 nowPlaying.ensureVisibleIndex = index;
169
170 musicToolbar.showToolbar();
171@@ -482,7 +482,7 @@
172 player.play()
173
174 // Show the Now Playing page and make sure the track is visible
175- nowPlaying.visible = true;
176+ tabs.selectedTabIndex = nowPlayingTab.index;
177 nowPlaying.ensureVisibleIndex = index;
178
179 musicToolbar.showToolbar();
180@@ -526,7 +526,7 @@
181 if (play === true)
182 {
183 // Show the Now Playing page and make sure the track is visible
184- nowPlaying.visible = true;
185+ tabs.selectedTabIndex = nowPlayingTab.index;
186 nowPlaying.ensureVisibleIndex = index;
187
188 musicToolbar.showToolbar();
189@@ -1265,6 +1265,22 @@
190 }
191 }
192
193+ Tab {
194+ property bool populated: true
195+ property var loader: []
196+ property bool loading: false
197+ property var model: []
198+ id: nowPlayingTab
199+ anchors {
200+ fill: parent
201+ }
202+ objectName: "nowplayingtab"
203+ title: page.title
204+ page: MusicNowPlaying {
205+ id: nowPlaying
206+ }
207+ }
208+
209 // Set the models in the tab to allow/disallow loading
210 function allowLoading(tabToLoad, state)
211 {
212@@ -1311,10 +1327,6 @@
213 } // end of tabs
214 }
215
216- MusicNowPlaying {
217- id: nowPlaying
218- }
219-
220 MusicaddtoPlaylist {
221 id: addtoPlaylist
222 }

Subscribers

People subscribed via source and target branches

to status/vote changes: