Merge lp:~vthompson/music-app/remix-retain-pagestack into lp:music-app/remix

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 731
Merged at revision: 729
Proposed branch: lp:~vthompson/music-app/remix-retain-pagestack
Merge into: lp:music-app/remix
Diff against target: 74 lines (+6/-21)
3 files modified
MusicNowPlaying.qml (+1/-12)
tests/autopilot/music_app/__init__.py (+0/-4)
tests/autopilot/music_app/tests/test_music.py (+5/-5)
To merge this branch: bzr merge lp:~vthompson/music-app/remix-retain-pagestack
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+241153@code.launchpad.net

Commit message

* Do not pop existing pages from page stack when returning from Now Playing/Queue

Description of the change

This small change will bring the user back to the last viewed page when returning from the Queue/Now Playing page. For instance, if the user is on the Album view (SongsPage) before entering the Now Playing page, they will return there when tapping the back button in the header.

To post a comment you must log in.
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Looks good so far, 1 inline comment.

review: Needs Fixing
729. By Victor Thompson

Remove custom backAction

730. By Victor Thompson

Remove go_back AP helper.

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

Update failing test

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
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, thanks for fixing the AP tests :)

review: Approve

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-10-28 02:05:16 +0000
3+++ MusicNowPlaying.qml 2014-11-07 23:08:40 +0000
4@@ -75,17 +75,6 @@
5 id: defaultState
6
7 name: "default"
8- backAction: Action {
9- iconName: "back";
10- objectName: "backButton"
11- onTriggered: {
12- mainPageStack.pop();
13-
14- while (mainPageStack.depth > 1) { // jump back to the tab layer if via SongsPage
15- mainPageStack.pop();
16- }
17- }
18- }
19 actions: [
20 Action {
21 objectName: "toggleView"
22@@ -123,7 +112,7 @@
23 text: i18n.tr("Clear queue")
24 visible: isListView
25 onTriggered: {
26- head.backAction.trigger()
27+ pageStack.pop()
28 trackQueue.clear()
29 }
30 }
31
32=== modified file 'tests/autopilot/music_app/__init__.py'
33--- tests/autopilot/music_app/__init__.py 2014-10-26 21:39:08 +0000
34+++ tests/autopilot/music_app/__init__.py 2014-11-07 23:08:40 +0000
35@@ -270,10 +270,6 @@
36 def click_toggle_view(self):
37 self.main_view.get_header().click_action_button("toggleView")
38
39- def go_back(self):
40- """Use custom back button to go back"""
41- self.main_view.get_header().click_custom_back_button()
42-
43 @ensure_now_playing_list
44 def get_track(self, i):
45 return (self.wait_select_single(ListItemWithActions,
46
47=== modified file 'tests/autopilot/music_app/tests/test_music.py'
48--- tests/autopilot/music_app/tests/test_music.py 2014-10-31 14:10:26 +0000
49+++ tests/autopilot/music_app/tests/test_music.py 2014-11-07 23:08:40 +0000
50@@ -104,7 +104,7 @@
51 Equals(self.tracks[0]["title"]))
52
53 # click on close button to close the page and now playing page
54- now_playing_page.go_back()
55+ self.app.main_view.go_back()
56
57 # click the play button (toolbar) to start playing
58 toolbar.click_play_button()
59@@ -358,11 +358,11 @@
60 self.assertThat(current_track.get_label_text("titleLabel"),
61 Equals(tracks[0]["title"]))
62
63- # click on close button to close nowplaying and songs page
64- now_playing_page.go_back()
65+ # click on close button to close nowplaying page
66+ self.app.main_view.go_back()
67
68- # check that the albums page is now visible
69- self.assertThat(albums_page.visible, Eventually(Equals(True)))
70+ # check that the songs page is now visible
71+ self.assertThat(songs_page.visible, Eventually(Equals(True)))
72
73 def test_add_songs_to_queue_from_songs_tab_and_play(self):
74 """tests navigating to the Songs tab and adding the library to the

Subscribers

People subscribed via source and target branches