Merge lp:~vthompson/music-app/music-uc1.3-sort-songs into lp:music-app

Proposed by Victor Thompson
Status: Work in progress
Proposed branch: lp:~vthompson/music-app/music-uc1.3-sort-songs
Merge into: lp:music-app
Prerequisite: lp:~vthompson/music-app/music-uc1.3
Diff against target: 294 lines (+67/-41)
3 files modified
app/ui/Songs.qml (+17/-0)
debian/changelog (+1/-0)
po/com.ubuntu.music.pot (+49/-41)
To merge this branch: bzr merge lp:~vthompson/music-app/music-uc1.3-sort-songs
Reviewer Review Type Date Requested Status
Andrew Hayzen Needs Information
Victor Thompson Needs Fixing
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+275634@code.launchpad.net

Commit message

* Use Page Head Section to allow Songs tab to be sorted.

Description of the change

* Use Page Head Section to allow Songs tab to be sorted.

The related bug [1] has initial approval for using these Sections in the Now Playing view. This change allows the Songs tab to be sorted by date added.

1 - https://bugs.launchpad.net/music-app/+bug/1447428

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

PASSED: Continuous integration, rev:908
http://91.189.93.70:8080/job/music-app-ci/1398/
Executed test runs:
    SUCCESS: http://91.189.93.70:8080/job/music-app-vivid-amd64-ci/250

Click here to trigger a rebuild:
http://91.189.93.70:8080/job/music-app-ci/1398/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Using this in the 'root' pages could be problematic when the convergence stuff lands [2] as it uses the head sections instead of tabs. As we would then have double sections it would look a bit weird, I think header actions would be preferable here.

1 - https://code.launchpad.net/~ahayzen/music-app/refactor-adaptive-page-layout

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

Agreed, since the converged view will use the sections for the different tabs/views we should find a different pattern for the sorting options.

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

My suggestion is:
Create a header action called "Sort..." then use a popup (like the one in the webbrowser when you press and hold a link) that gives the options "Alphabetical", "Date added" etc.

review: Needs Information

Unmerged revisions

908. By Victor Thompson

* Use Page Head Section to allow Songs tab to be sorted.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/ui/Songs.qml'
--- app/ui/Songs.qml 2015-10-24 18:37:51 +0000
+++ app/ui/Songs.qml 2015-10-24 18:37:51 +0000
@@ -53,6 +53,23 @@
53 }53 }
54 ]54 ]
5555
56 PageHeadSections {
57 id: defaultStateSections
58 model: [i18n.tr("Title"), i18n.tr("Date added")]
59 selectedIndex: 0
60 }
61
62 head {
63 sections {
64 model: defaultStateSections.model
65 selectedIndex: defaultStateSections.selectedIndex
66 onSelectedIndexChanged: {
67 songsModelFilter.sort.property = head.sections.selectedIndex == 0 ? "title" : "eTag"
68 songsModelFilter.sort.order = head.sections.selectedIndex == 0 ? Qt.AscendingOrder : Qt.DescendingOrder
69 }
70 }
71 }
72
56 // Hack for autopilot otherwise Albums appears as MusicPage73 // Hack for autopilot otherwise Albums appears as MusicPage
57 // due to bug 1341671 it is required that there is a property so that74 // due to bug 1341671 it is required that there is a property so that
58 // qml doesn't optimise using the parent type75 // qml doesn't optimise using the parent type
5976
=== modified file 'debian/changelog'
--- debian/changelog 2015-10-24 18:37:51 +0000
+++ debian/changelog 2015-10-24 18:37:51 +0000
@@ -6,6 +6,7 @@
6 [ Victor Thompson ]6 [ Victor Thompson ]
7 * Remove some deprecated code for the UbuntuShape image property.7 * Remove some deprecated code for the UbuntuShape image property.
8 * Update app to use the Ubuntu Components version 1.3 (LP: #1508363)8 * Update app to use the Ubuntu Components version 1.3 (LP: #1508363)
9 * Use Page Head Section to allow Songs tab to be sorted.
910
10 -- Bartosz Kosiorek <gang65@poczta.onet.pl> Tue, 08 Sep 2015 10:08:49 +020011 -- Bartosz Kosiorek <gang65@poczta.onet.pl> Tue, 08 Sep 2015 10:08:49 +0200
1112
1213
=== modified file 'po/com.ubuntu.music.pot'
--- po/com.ubuntu.music.pot 2015-08-21 19:41:03 +0000
+++ po/com.ubuntu.music.pot 2015-10-24 18:37:51 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: music-app\n"9"Project-Id-Version: music-app\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-08-21 20:40+0100\n"11"POT-Creation-Date: 2015-10-24 13:31-0500\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -37,7 +37,7 @@
37msgid "Cancel"37msgid "Cancel"
38msgstr ""38msgstr ""
3939
40#: ../app/components/Dialog/ContentHubWaitDialog.qml:3440#: ../app/components/Dialog/ContentHubWaitDialog.qml:33
41msgid "Waiting for file(s)..."41msgid "Waiting for file(s)..."
42msgstr ""42msgstr ""
4343
@@ -83,7 +83,7 @@
83msgstr ""83msgstr ""
8484
85#: ../app/components/Dialog/RemovePlaylistDialog.qml:3785#: ../app/components/Dialog/RemovePlaylistDialog.qml:37
86#: ../app/components/ListItemActions/Remove.qml:2886#: ../app/components/ListItemActions/Remove.qml:27
87msgid "Remove"87msgid "Remove"
88msgstr ""88msgstr ""
8989
@@ -180,11 +180,11 @@
180msgid "Shuffle"180msgid "Shuffle"
181msgstr ""181msgstr ""
182182
183#: ../app/components/Walkthrough/Slide1.qml:58183#: ../app/components/Walkthrough/Slide1.qml:59
184msgid "Welcome to Music"184msgid "Welcome to Music"
185msgstr ""185msgstr ""
186186
187#: ../app/components/Walkthrough/Slide1.qml:72187#: ../app/components/Walkthrough/Slide1.qml:73
188msgid ""188msgid ""
189"Enjoy your favorite music with Ubuntu's Music App. Take a short tour on how "189"Enjoy your favorite music with Ubuntu's Music App. Take a short tour on how "
190"to get started or press skip to start listening now."190"to get started or press skip to start listening now."
@@ -195,7 +195,7 @@
195msgstr ""195msgstr ""
196196
197#: ../app/components/Walkthrough/Slide2.qml:67197#: ../app/components/Walkthrough/Slide2.qml:67
198#: ../app/ui/LibraryEmptyState.qml:117198#: ../app/ui/LibraryEmptyState.qml:123
199msgid ""199msgid ""
200"Connect your device to any computer and simply drag files to the Music "200"Connect your device to any computer and simply drag files to the Music "
201"folder or insert removable media with music."201"folder or insert removable media with music."
@@ -213,84 +213,84 @@
213msgid "Start"213msgid "Start"
214msgstr ""214msgstr ""
215215
216#: ../app/components/Walkthrough/Walkthrough.qml:84216#: ../app/components/Walkthrough/Walkthrough.qml:120
217msgid "Skip"217msgid "Skip"
218msgstr ""218msgstr ""
219219
220#: ../app/music-app.qml:155220#: ../app/music-app.qml:156
221msgid "Next"221msgid "Next"
222msgstr ""222msgstr ""
223223
224#: ../app/music-app.qml:156224#: ../app/music-app.qml:157
225msgid "Next Track"225msgid "Next Track"
226msgstr ""226msgstr ""
227227
228#: ../app/music-app.qml:162228#: ../app/music-app.qml:163
229msgid "Pause"229msgid "Pause"
230msgstr ""230msgstr ""
231231
232#: ../app/music-app.qml:162232#: ../app/music-app.qml:163
233msgid "Play"233msgid "Play"
234msgstr ""234msgstr ""
235235
236#: ../app/music-app.qml:164236#: ../app/music-app.qml:165
237msgid "Pause Playback"237msgid "Pause Playback"
238msgstr ""238msgstr ""
239239
240#: ../app/music-app.qml:164240#: ../app/music-app.qml:165
241msgid "Continue or start playback"241msgid "Continue or start playback"
242msgstr ""242msgstr ""
243243
244#: ../app/music-app.qml:169244#: ../app/music-app.qml:170
245msgid "Back"245msgid "Back"
246msgstr ""246msgstr ""
247247
248#: ../app/music-app.qml:170248#: ../app/music-app.qml:171
249msgid "Go back to last page"249msgid "Go back to last page"
250msgstr ""250msgstr ""
251251
252#: ../app/music-app.qml:178252#: ../app/music-app.qml:179
253msgid "Previous"253msgid "Previous"
254msgstr ""254msgstr ""
255255
256#: ../app/music-app.qml:179256#: ../app/music-app.qml:180
257msgid "Previous Track"257msgid "Previous Track"
258msgstr ""258msgstr ""
259259
260#: ../app/music-app.qml:184260#: ../app/music-app.qml:185
261msgid "Stop"261msgid "Stop"
262msgstr ""262msgstr ""
263263
264#: ../app/music-app.qml:185264#: ../app/music-app.qml:186
265msgid "Stop Playback"265msgid "Stop Playback"
266msgstr ""266msgstr ""
267267
268#: ../app/music-app.qml:276 com.ubuntu.music_music.desktop.in.in.h:1268#: ../app/music-app.qml:277 com.ubuntu.music_music.desktop.in.in.h:1
269msgid "Music"269msgid "Music"
270msgstr ""270msgstr ""
271271
272#: ../app/music-app.qml:306272#: ../app/music-app.qml:307
273msgid "Debug: "273msgid "Debug: "
274msgstr ""274msgstr ""
275275
276#. TRANSLATORS: this appears in the header with limited space (around 20 characters)276#. TRANSLATORS: this appears in the header with limited space (around 20 characters)
277#: ../app/music-app.qml:371 ../app/music-app.qml:986277#: ../app/music-app.qml:372 ../app/music-app.qml:987
278#: ../app/ui/NowPlaying.qml:38278#: ../app/ui/NowPlaying.qml:38
279msgid "Now playing"279msgid "Now playing"
280msgstr ""280msgstr ""
281281
282#. TRANSLATORS: this appears in the header with limited space (around 20 characters)282#. TRANSLATORS: this appears in the header with limited space (around 20 characters)
283#: ../app/music-app.qml:371 ../app/music-app.qml:403 ../app/music-app.qml:987283#: ../app/music-app.qml:372 ../app/music-app.qml:404 ../app/music-app.qml:988
284#: ../app/music-app.qml:991 ../app/ui/NowPlaying.qml:40284#: ../app/music-app.qml:992 ../app/ui/NowPlaying.qml:40
285msgid "Queue"285msgid "Queue"
286msgstr ""286msgstr ""
287287
288#. TRANSLATORS: this appears in the header with limited space (around 20 characters)288#. TRANSLATORS: this appears in the header with limited space (around 20 characters)
289#: ../app/ui/AddToPlaylist.qml:46289#: ../app/ui/AddToPlaylist.qml:45
290msgid "Select playlist"290msgid "Select playlist"
291msgstr ""291msgstr ""
292292
293#: ../app/ui/AddToPlaylist.qml:94 ../app/ui/Playlists.qml:87293#: ../app/ui/AddToPlaylist.qml:93 ../app/ui/Playlists.qml:86
294#: ../app/ui/SongsView.qml:292 ../app/ui/SongsView.qml:293294#: ../app/ui/SongsView.qml:292 ../app/ui/SongsView.qml:293
295#, qt-format295#, qt-format
296msgid "%1 song"296msgid "%1 song"
@@ -300,12 +300,12 @@
300300
301#. TRANSLATORS: this is the name of the playlists page shown in the tab header.301#. TRANSLATORS: this is the name of the playlists page shown in the tab header.
302#. Remember to keep the translation short to fit the screen width302#. Remember to keep the translation short to fit the screen width
303#: ../app/ui/AddToPlaylist.qml:99 ../app/ui/Playlists.qml:38303#: ../app/ui/AddToPlaylist.qml:98 ../app/ui/Playlists.qml:37
304#: ../app/ui/SongsView.qml:103304#: ../app/ui/SongsView.qml:103
305msgid "Playlists"305msgid "Playlists"
306msgstr ""306msgstr ""
307307
308#: ../app/ui/AddToPlaylist.qml:109 ../app/ui/Recent.qml:37308#: ../app/ui/AddToPlaylist.qml:108 ../app/ui/Recent.qml:36
309#: ../app/ui/SongsView.qml:91309#: ../app/ui/SongsView.qml:91
310msgid "Recent"310msgid "Recent"
311msgstr ""311msgstr ""
@@ -314,35 +314,35 @@
314msgid "Albums"314msgid "Albums"
315msgstr ""315msgstr ""
316316
317#: ../app/ui/Albums.qml:72 ../app/ui/ArtistView.qml:129317#: ../app/ui/Albums.qml:72 ../app/ui/ArtistView.qml:128
318#: ../app/ui/ArtistView.qml:142 ../app/ui/Recent.qml:82318#: ../app/ui/ArtistView.qml:141 ../app/ui/Recent.qml:81
319#: ../app/ui/SongsView.qml:249319#: ../app/ui/SongsView.qml:249
320msgid "Unknown Album"320msgid "Unknown Album"
321msgstr ""321msgstr ""
322322
323#: ../app/ui/Albums.qml:73 ../app/ui/ArtistView.qml:85323#: ../app/ui/Albums.qml:73 ../app/ui/ArtistView.qml:84
324#: ../app/ui/ArtistView.qml:141 ../app/ui/Artists.qml:80324#: ../app/ui/ArtistView.qml:140 ../app/ui/Artists.qml:79
325#: ../app/ui/Recent.qml:83 ../app/ui/SongsView.qml:270325#: ../app/ui/Recent.qml:82 ../app/ui/SongsView.qml:270
326msgid "Unknown Artist"326msgid "Unknown Artist"
327msgstr ""327msgstr ""
328328
329#: ../app/ui/Albums.qml:83 ../app/ui/ArtistView.qml:140329#: ../app/ui/Albums.qml:83 ../app/ui/ArtistView.qml:139
330#: ../app/ui/Recent.qml:98330#: ../app/ui/Recent.qml:97
331msgid "Album"331msgid "Album"
332msgstr ""332msgstr ""
333333
334#: ../app/ui/ArtistView.qml:104334#: ../app/ui/ArtistView.qml:103
335#, qt-format335#, qt-format
336msgid "%1 album"336msgid "%1 album"
337msgid_plural "%1 albums"337msgid_plural "%1 albums"
338msgstr[0] ""338msgstr[0] ""
339msgstr[1] ""339msgstr[1] ""
340340
341#: ../app/ui/Artists.qml:38341#: ../app/ui/Artists.qml:37
342msgid "Artists"342msgid "Artists"
343msgstr ""343msgstr ""
344344
345#: ../app/ui/Artists.qml:108345#: ../app/ui/Artists.qml:107
346msgid "Artist"346msgid "Artist"
347msgstr ""347msgstr ""
348348
@@ -361,7 +361,7 @@
361msgid "Genre"361msgid "Genre"
362msgstr ""362msgstr ""
363363
364#: ../app/ui/LibraryEmptyState.qml:106364#: ../app/ui/LibraryEmptyState.qml:112
365msgid "No music found"365msgid "No music found"
366msgstr ""366msgstr ""
367367
@@ -370,8 +370,8 @@
370msgid "Clear queue"370msgid "Clear queue"
371msgstr ""371msgstr ""
372372
373#: ../app/ui/Playlists.qml:99 ../app/ui/Playlists.qml:100373#: ../app/ui/Playlists.qml:98 ../app/ui/Playlists.qml:99
374#: ../app/ui/Recent.qml:83 ../app/ui/Recent.qml:98 ../app/ui/SongsView.qml:67374#: ../app/ui/Recent.qml:82 ../app/ui/Recent.qml:97 ../app/ui/SongsView.qml:67
375#: ../app/ui/SongsView.qml:82 ../app/ui/SongsView.qml:114375#: ../app/ui/SongsView.qml:82 ../app/ui/SongsView.qml:114
376#: ../app/ui/SongsView.qml:154 ../app/ui/SongsView.qml:188376#: ../app/ui/SongsView.qml:154 ../app/ui/SongsView.qml:188
377#: ../app/ui/SongsView.qml:203 ../app/ui/SongsView.qml:222377#: ../app/ui/SongsView.qml:203 ../app/ui/SongsView.qml:222
@@ -385,6 +385,14 @@
385msgid "Songs"385msgid "Songs"
386msgstr ""386msgstr ""
387387
388#: ../app/ui/Songs.qml:58
389msgid "Title"
390msgstr ""
391
392#: ../app/ui/Songs.qml:58
393msgid "Date added"
394msgstr ""
395
388#: com.ubuntu.music_music.desktop.in.in.h:2396#: com.ubuntu.music_music.desktop.in.in.h:2
389msgid "A music application for Ubuntu"397msgid "A music application for Ubuntu"
390msgstr ""398msgstr ""

Subscribers

People subscribed via source and target branches