Merge lp:~ahayzen/music-app/search-toolbar-item into lp:music-app/trusty

Proposed by Andrew Hayzen
Status: Work in progress
Proposed branch: lp:~ahayzen/music-app/search-toolbar-item
Merge into: lp:music-app/trusty
Diff against target: 125 lines (+17/-38)
2 files modified
MusicToolbar.qml (+0/-38)
music-app.qml (+17/-0)
To merge this branch: bzr merge lp:~ahayzen/music-app/search-toolbar-item
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Andrew Hayzen Needs Fixing
Review via email: mp+218614@code.launchpad.net

Commit message

* Add search button to header items

Description of the change

* Add search button to header items

This is what the application looks like when running staging [0], should the search button be removed from the toolbar as it now exists twice?

TESTING
branch this to a known location eg for me ~/Workspace/sdk/music-app-search-toolbar-item
Then branch the SDK staging to another known location eg ~/Workspace/sdk/ubuntu-ui-toolkit-staging
Start a terminal in the staging directory and run the following
sudo apt-get build-dep ubuntu-ui-toolkit
qmake
make
source export_modules_dir.sh
qmlscene ~/Workspace/sdk/music-app-search-toolbar-item/music-app.qml

0 - https://docs.google.com/file/d/0B3XynHVKfrvMbHkydWlpWF9FQkE/edit

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 :

We should try to detect the 14.10 SDK vs the 14.04 SDK via 'header.useDepcrecatedToolbar' or similar, as we had done previously. Perhaps we should use this to create a 'useUtopicSDK' so the code that depends on these switches makes more sense. That way we can hide the toolbar's search button that shows up on the desktop/tablet.

I think, overall, we should wait until this lands in the Utopic images before we land this so we can test it on the device without setting up a PPA or testing via a silo.

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

I agree we should continue to support 14.04 if possible, detecting the (lack of) new tool bar and reacting accordingly. However I wouldn't want us to end up with an unmaintainable mess that could result in supporting older versions. So think carefully about each of these cases.

455. By Andrew Hayzen

* Remove search button from toolbar

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

Ok as we are not supporting trusty mobile and only trusty+PPA we can assume that the new header components will exist.

Therefore I have removed the old search button as it is not needed any more.

However until the header parts land in the SDK i'll block myself

review: Needs Fixing
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 :

This functionality landed in the Utopic r25 image:

http://people.canonical.com/~ogra/touch-image-stats/25.changes

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

I think this should land as I believe it is more important to support search on Utopic mobile now that the HUD is gone than it is to support search in Trusty desktop with the non-PPA SDK.

However, I'd like to audit the Trusty release a bit more just in case we want to halt updating the Core Apps PPA prior to landing this.

456. By Andrew Hayzen

* Merge of trunk

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
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

#blocked waiting for mediascanner2 branch to land.

Unmerged revisions

456. By Andrew Hayzen

* Merge of trunk

455. By Andrew Hayzen

* Remove search button from toolbar

454. By Andrew Hayzen

* Add search button to header items

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MusicToolbar.qml'
2--- MusicToolbar.qml 2014-05-04 05:30:54 +0000
3+++ MusicToolbar.qml 2014-05-22 10:37:50 +0000
4@@ -483,44 +483,6 @@
5 opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4
6 }
7 }
8-
9- /* Search button in wideAspect */
10- Item {
11- id: nowPlayingSearchButton
12- objectName: "searchShape"
13- anchors {
14- right: parent.right
15- rightMargin: units.gu(1)
16- verticalCenter: parent.verticalCenter
17- }
18- height: units.gu(6)
19- opacity: !emptyPage.noMusic ? 1 : .4
20- width: height
21- visible: wideAspect
22-
23- function trigger() {
24- if (emptyPage.noMusic) {
25- return;
26- }
27-
28- if (!searchSheet.sheetVisible) {
29- PopupUtils.open(searchSheet.sheet,
30- mainView, { title: i18n.tr("Search")} )
31- }
32- }
33-
34- Image {
35- id: searchIcon
36- anchors {
37- horizontalCenter: parent.horizontalCenter
38- verticalCenter: parent.verticalCenter
39- }
40- height: units.gu(3)
41- opacity: !emptyPage.noMusic ? 1 : .4
42- source: Qt.resolvedUrl("images/search.svg")
43- width: height
44- }
45- }
46 }
47
48 /* Progress bar component */
49
50=== modified file 'music-app.qml'
51--- music-app.qml 2014-05-08 22:58:35 +0000
52+++ music-app.qml 2014-05-22 10:37:50 +0000
53@@ -138,6 +138,7 @@
54 // HUD Actions
55 Action {
56 id: searchAction
57+ iconName: "search"
58 text: i18n.tr("Search")
59 keywords: i18n.tr("Search Track")
60 onTriggered: {
61@@ -198,6 +199,16 @@
62
63 actions: [searchAction, nextAction, playsAction, prevAction, stopAction, backAction]
64
65+ // TODO: when sdk supports move to global header item
66+ ToolbarItems {
67+ id: searchToolbarItem
68+ ToolbarButton {
69+ action: searchAction
70+ }
71+ opened: false
72+ locked: true
73+ }
74+
75 // signal to open new URIs
76 // TODO currently this only allows playing file:// URIs of known files
77 // (already in the database), not e.g. http:// URIs or files in directories
78@@ -1070,6 +1081,7 @@
79 // Tab content begins here
80 page: MusicStart {
81 id: musicStartPage
82+ tools: searchToolbarItem
83 }
84 }
85
86@@ -1087,6 +1099,7 @@
87 // tab content
88 page: MusicArtists {
89 id: musicArtistsPage
90+ tools: searchToolbarItem
91 }
92 }
93
94@@ -1104,6 +1117,7 @@
95 // Tab content begins here
96 page: MusicAlbums {
97 id: musicAlbumsPage
98+ tools: searchToolbarItem
99 }
100 }
101
102@@ -1121,6 +1135,7 @@
103 // Tab content begins here
104 page: MusicTracks {
105 id: musicTracksPage
106+ tools: searchToolbarItem
107 }
108 }
109
110@@ -1139,6 +1154,7 @@
111 // Tab content begins here
112 page: MusicPlaylists {
113 id: musicPlaylistPage
114+ tools: searchToolbarItem
115 }
116 }
117
118@@ -1200,6 +1216,7 @@
119
120 MusicNowPlaying {
121 id: nowPlaying
122+ tools: searchToolbarItem
123 }
124
125 MusicaddtoPlaylist {

Subscribers

People subscribed via source and target branches

to status/vote changes: