Merge lp:~vthompson/music-app/remix-add-to-playlist-001 into lp:music-app/remix
- remix-add-to-playlist-001
- Merge into remix
Status: | Merged |
---|---|
Approved by: | Andrew Hayzen |
Approved revision: | 687 |
Merged at revision: | 691 |
Proposed branch: | lp:~vthompson/music-app/remix-add-to-playlist-001 |
Merge into: | lp:music-app/remix |
Diff against target: |
273 lines (+21/-154) 5 files modified
MusicTracks.qml (+0/-1) MusicaddtoPlaylist.qml (+13/-37) common/CoverRow.qml (+0/-93) common/MusicRow.qml (+5/-20) tests/autopilot/music_app/__init__.py (+3/-3) |
To merge this branch: | bzr merge lp:~vthompson/music-app/remix-add-to-playlist-001 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Hayzen | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email:
|
This proposal supersedes a proposal from 2014-10-20.
Commit message
* Remove CoverRow
* Remove isPressedChanged workaround
* Remove MusicRow isSquare specialization
Description of the change
* Remove CoverRow
* Remove isPressedChanged workaround
* Remove MusicRow isSquare specialization
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:682
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrew Hayzen (ahayzen) wrote : | # |
1 inline comment and I think we need to discuss how the labels are positioned.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:683
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:684
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:685
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrew Hayzen (ahayzen) wrote : | # |
Looks good now :)
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
- 686. By Victor Thompson
-
Resolve conflicts and merge of remix
- 687. By Victor Thompson
-
Remove MusicRow
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:686
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:687
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrew Hayzen (ahayzen) wrote : | # |
Merge conflict resolution looks good :)
Preview Diff
1 | === modified file 'MusicTracks.qml' |
2 | --- MusicTracks.qml 2014-10-21 21:49:49 +0000 |
3 | +++ MusicTracks.qml 2014-10-22 16:32:59 +0000 |
4 | @@ -166,7 +166,6 @@ |
5 | id: musicRow |
6 | anchors.verticalCenter: parent.verticalCenter |
7 | covers: [{art: model.art}] |
8 | - isSquare: true |
9 | coverSize: units.gu(6) |
10 | spacing: units.gu(2) |
11 | column: Column { |
12 | |
13 | === modified file 'MusicaddtoPlaylist.qml' |
14 | --- MusicaddtoPlaylist.qml 2014-10-21 19:28:05 +0000 |
15 | +++ MusicaddtoPlaylist.qml 2014-10-22 16:32:59 +0000 |
16 | @@ -41,9 +41,9 @@ |
17 | title: i18n.tr("Select playlist") |
18 | visible: false |
19 | |
20 | - tools: ToolbarItems { |
21 | - ToolbarButton { |
22 | - action: Action { |
23 | + head { |
24 | + actions: [ |
25 | + Action { |
26 | objectName: "newPlaylistButton" |
27 | text: i18n.tr("New playlist") |
28 | iconName: "add" |
29 | @@ -52,7 +52,7 @@ |
30 | PopupUtils.open(newPlaylistDialog, mainView) |
31 | } |
32 | } |
33 | - } |
34 | + ] |
35 | } |
36 | |
37 | onVisibleChanged: { |
38 | @@ -61,25 +61,21 @@ |
39 | } |
40 | } |
41 | |
42 | - // show each playlist and make them chosable |
43 | - ListView { |
44 | + CardView { |
45 | id: addtoPlaylistView |
46 | - anchors { |
47 | - fill: parent |
48 | - } |
49 | - clip: true |
50 | - height: parent.width |
51 | + itemWidth: units.gu(12) |
52 | model: playlistModel.model |
53 | - objectName: "addToPlaylistListView" |
54 | - width: parent.width |
55 | - delegate: ListItem.Standard { |
56 | + objectName: "addToPlaylistCardView" |
57 | + delegate: Card { |
58 | id: playlist |
59 | - objectName: "addToPlaylistListItem" + index |
60 | - height: styleMusic.common.itemHeight |
61 | - |
62 | + coverSources: Playlists.getPlaylistCovers(playlist.name) |
63 | + objectName: "addToPlaylistCardItem" + index |
64 | property string name: model.name |
65 | property string count: model.count |
66 | |
67 | + primaryText: playlist.name |
68 | + secondaryText: i18n.tr("%1 song", "%1 songs", playlist.count).arg(playlist.count) |
69 | + |
70 | onClicked: { |
71 | for (var i=0; i < chosenElements.length; i++) { |
72 | console.debug("Debug: "+chosenElements[i].filename+" added to "+name) |
73 | @@ -91,26 +87,6 @@ |
74 | |
75 | musicToolbar.goBack(); // go back to the previous page |
76 | } |
77 | - |
78 | - MusicRow { |
79 | - id: musicRow |
80 | - covers: Playlists.getPlaylistCovers(playlist.name) |
81 | - column: Column { |
82 | - spacing: units.gu(1) |
83 | - Label { |
84 | - id: playlistCount |
85 | - color: styleMusic.common.subtitle |
86 | - fontSize: "x-small" |
87 | - text: i18n.tr("%1 song", "%1 songs", playlist.count).arg(playlist.count) |
88 | - } |
89 | - Label { |
90 | - id: playlistName |
91 | - color: styleMusic.common.music |
92 | - fontSize: "medium" |
93 | - text: playlist.name |
94 | - } |
95 | - } |
96 | - } |
97 | } |
98 | } |
99 | } |
100 | |
101 | === removed file 'common/CoverRow.qml' |
102 | --- common/CoverRow.qml 2014-10-20 14:52:22 +0000 |
103 | +++ common/CoverRow.qml 1970-01-01 00:00:00 +0000 |
104 | @@ -1,93 +0,0 @@ |
105 | -/* |
106 | - * Copyright (C) 2013, 2014 |
107 | - * Andrew Hayzen <ahayzen@gmail.com> |
108 | - * Nekhelesh Ramananthan <krnekhelesh@gmail.com> |
109 | - * Victor Thompson <victor.thompson@gmail.com> |
110 | - * |
111 | - * This program is free software; you can redistribute it and/or modify |
112 | - * it under the terms of the GNU General Public License as published by |
113 | - * the Free Software Foundation; version 3. |
114 | - * |
115 | - * This program is distributed in the hope that it will be useful, |
116 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
117 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
118 | - * GNU General Public License for more details. |
119 | - * |
120 | - * You should have received a copy of the GNU General Public License |
121 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
122 | - */ |
123 | - |
124 | -import QtQuick 2.3 |
125 | -import Ubuntu.Components 1.1 |
126 | - |
127 | -UbuntuShape { |
128 | - id: coverRow |
129 | - |
130 | - // Property (array) to store the cover images |
131 | - property var covers |
132 | - |
133 | - // Property to set the size of the cover image |
134 | - property int size |
135 | - |
136 | - // Property to get the playlist count to determine the visibility of a cover image |
137 | - property int count |
138 | - |
139 | - // Property to set the spacing size, default to units.gu(1) |
140 | - property var spacing: units.gu(1) |
141 | - |
142 | - // Property to determine if item should appear pressed |
143 | - property bool pressed: false |
144 | - |
145 | - width: size |
146 | - height: size |
147 | - radius: "medium" |
148 | - image: finalImageRender |
149 | - |
150 | - // Component to assemble the pictures in a row with appropriate spacing. |
151 | - Row { |
152 | - id: imageRow |
153 | - |
154 | - width: coverRow.size |
155 | - height: width |
156 | - |
157 | - spacing: -coverRow.size + coverRow.spacing |
158 | - |
159 | - Repeater { |
160 | - id: repeat |
161 | - model: coverRow.count == 0 ? 1 : coverRow.count |
162 | - delegate: Image { |
163 | - width: coverRow.size |
164 | - height: width |
165 | - source: coverRow.count !== 0 && coverRow.covers[index] !== "" && coverRow.covers[index] !== undefined |
166 | - ? (coverRow.covers[index].art !== undefined |
167 | - ? coverRow.covers[index].art |
168 | - : "image://albumart/artist=" + coverRow.covers[index].author + "&album=" + coverRow.covers[index].album) |
169 | - : Qt.resolvedUrl("../images/music-app-cover@30.png") |
170 | - sourceSize.height: height |
171 | - sourceSize.width: width |
172 | - onStatusChanged: { |
173 | - if (status === Image.Error) { |
174 | - source = Qt.resolvedUrl("../images/music-app-cover@30.png") |
175 | - } |
176 | - } |
177 | - } |
178 | - } |
179 | - } |
180 | - |
181 | - // Component to render the cover images as one image which is then passed as argument to the Ubuntu Shape widget. |
182 | - ShaderEffectSource { |
183 | - id: finalImageRender |
184 | - sourceItem: imageRow |
185 | - width: units.gu(0.1) |
186 | - height: width |
187 | - anchors.centerIn: parent |
188 | - hideSource: true |
189 | - } |
190 | - |
191 | - // TODO: If http://pad.lv/1354753 is fixed to expose whether the Shape should appear pressed, update this as well. |
192 | - onPressedChanged: { |
193 | - pressed ? borderSource = "radius_pressed.sci" |
194 | - : borderSource = "radius_idle.sci" |
195 | - } |
196 | -} |
197 | - |
198 | |
199 | === modified file 'common/MusicRow.qml' |
200 | --- common/MusicRow.qml 2014-10-20 15:39:09 +0000 |
201 | +++ common/MusicRow.qml 2014-10-22 16:32:59 +0000 |
202 | @@ -29,38 +29,24 @@ |
203 | rightMargin: units.gu(2) |
204 | } |
205 | |
206 | - property alias covers: coverRow.covers |
207 | + property alias covers: coverGrid.covers |
208 | property bool showCovers: true |
209 | - property bool isSquare: false |
210 | - property alias pressed: coverRow.pressed |
211 | property alias column: columnComponent.sourceComponent |
212 | property real coverSize: styleMusic.common.albumSize |
213 | |
214 | spacing: units.gu(1) |
215 | |
216 | - CoverRow { |
217 | - id: coverRow |
218 | - visible: showCovers && !isSquare |
219 | - anchors { |
220 | - top: parent.top |
221 | - topMargin: units.gu(1) |
222 | - } |
223 | - count: covers.length |
224 | - covers: [] |
225 | - size: coverSize |
226 | - } |
227 | - |
228 | CoverGrid { |
229 | - id: coverSquare |
230 | + id: coverGrid |
231 | anchors { |
232 | verticalCenter: parent.verticalCenter |
233 | topMargin: units.gu(0.5) |
234 | bottomMargin: units.gu(0.5) |
235 | leftMargin: units.gu(2) |
236 | } |
237 | - covers: coverRow.covers |
238 | + covers: [] |
239 | size: coverSize |
240 | - visible: showCovers && isSquare |
241 | + visible: showCovers |
242 | } |
243 | |
244 | Loader { |
245 | @@ -70,8 +56,7 @@ |
246 | topMargin: units.gu(1) |
247 | } |
248 | width: !showCovers ? parent.width - parent.spacing |
249 | - : (isSquare ? parent.width - coverSquare.width - parent.spacing |
250 | - : parent.width - coverRow.width - parent.spacing) |
251 | + : parent.width - coverGrid.width - parent.spacing |
252 | |
253 | onSourceComponentChanged: { |
254 | for (var i=0; i < item.children.length; i++) { |
255 | |
256 | === modified file 'tests/autopilot/music_app/__init__.py' |
257 | --- tests/autopilot/music_app/__init__.py 2014-10-17 01:27:33 +0000 |
258 | +++ tests/autopilot/music_app/__init__.py 2014-10-22 16:32:59 +0000 |
259 | @@ -204,11 +204,11 @@ |
260 | |
261 | def get_count(self): # careful not to conflict until Page11 is fixed |
262 | return self.wait_select_single( |
263 | - "QQuickListView", objectName="addToPlaylistListView").count |
264 | + "CardView", objectName="addToPlaylistCardView").count |
265 | |
266 | def get_playlist(self, i): |
267 | - return (self.wait_select_single("Standard", |
268 | - objectName="addToPlaylistListItem" + str(i))) |
269 | + return (self.wait_select_single("Card", |
270 | + objectName="addToPlaylistCardItem" + str(i))) |
271 | |
272 | |
273 | class Page11(MusicAlbums, MusicArtists, MusicTracks, MusicaddtoPlaylist): |
FAILED: Continuous integration, rev:681 91.189. 93.70:8080/ job/music- app-remix- ci/119/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 1081 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 1081/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/music- app-remix- utopic- amd64-ci/ 119
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/music- app-remix- ci/119/ rebuild
http://