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
=== modified file 'MusicToolbar.qml'
--- MusicToolbar.qml 2014-05-04 05:30:54 +0000
+++ MusicToolbar.qml 2014-05-22 10:37:50 +0000
@@ -483,44 +483,6 @@
483 opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4483 opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4
484 }484 }
485 }485 }
486
487 /* Search button in wideAspect */
488 Item {
489 id: nowPlayingSearchButton
490 objectName: "searchShape"
491 anchors {
492 right: parent.right
493 rightMargin: units.gu(1)
494 verticalCenter: parent.verticalCenter
495 }
496 height: units.gu(6)
497 opacity: !emptyPage.noMusic ? 1 : .4
498 width: height
499 visible: wideAspect
500
501 function trigger() {
502 if (emptyPage.noMusic) {
503 return;
504 }
505
506 if (!searchSheet.sheetVisible) {
507 PopupUtils.open(searchSheet.sheet,
508 mainView, { title: i18n.tr("Search")} )
509 }
510 }
511
512 Image {
513 id: searchIcon
514 anchors {
515 horizontalCenter: parent.horizontalCenter
516 verticalCenter: parent.verticalCenter
517 }
518 height: units.gu(3)
519 opacity: !emptyPage.noMusic ? 1 : .4
520 source: Qt.resolvedUrl("images/search.svg")
521 width: height
522 }
523 }
524 }486 }
525487
526 /* Progress bar component */488 /* Progress bar component */
527489
=== modified file 'music-app.qml'
--- music-app.qml 2014-05-08 22:58:35 +0000
+++ music-app.qml 2014-05-22 10:37:50 +0000
@@ -138,6 +138,7 @@
138 // HUD Actions138 // HUD Actions
139 Action {139 Action {
140 id: searchAction140 id: searchAction
141 iconName: "search"
141 text: i18n.tr("Search")142 text: i18n.tr("Search")
142 keywords: i18n.tr("Search Track")143 keywords: i18n.tr("Search Track")
143 onTriggered: {144 onTriggered: {
@@ -198,6 +199,16 @@
198199
199 actions: [searchAction, nextAction, playsAction, prevAction, stopAction, backAction]200 actions: [searchAction, nextAction, playsAction, prevAction, stopAction, backAction]
200201
202 // TODO: when sdk supports move to global header item
203 ToolbarItems {
204 id: searchToolbarItem
205 ToolbarButton {
206 action: searchAction
207 }
208 opened: false
209 locked: true
210 }
211
201 // signal to open new URIs212 // signal to open new URIs
202 // TODO currently this only allows playing file:// URIs of known files213 // TODO currently this only allows playing file:// URIs of known files
203 // (already in the database), not e.g. http:// URIs or files in directories214 // (already in the database), not e.g. http:// URIs or files in directories
@@ -1070,6 +1081,7 @@
1070 // Tab content begins here1081 // Tab content begins here
1071 page: MusicStart {1082 page: MusicStart {
1072 id: musicStartPage1083 id: musicStartPage
1084 tools: searchToolbarItem
1073 }1085 }
1074 }1086 }
10751087
@@ -1087,6 +1099,7 @@
1087 // tab content1099 // tab content
1088 page: MusicArtists {1100 page: MusicArtists {
1089 id: musicArtistsPage1101 id: musicArtistsPage
1102 tools: searchToolbarItem
1090 }1103 }
1091 }1104 }
10921105
@@ -1104,6 +1117,7 @@
1104 // Tab content begins here1117 // Tab content begins here
1105 page: MusicAlbums {1118 page: MusicAlbums {
1106 id: musicAlbumsPage1119 id: musicAlbumsPage
1120 tools: searchToolbarItem
1107 }1121 }
1108 }1122 }
11091123
@@ -1121,6 +1135,7 @@
1121 // Tab content begins here1135 // Tab content begins here
1122 page: MusicTracks {1136 page: MusicTracks {
1123 id: musicTracksPage1137 id: musicTracksPage
1138 tools: searchToolbarItem
1124 }1139 }
1125 }1140 }
11261141
@@ -1139,6 +1154,7 @@
1139 // Tab content begins here1154 // Tab content begins here
1140 page: MusicPlaylists {1155 page: MusicPlaylists {
1141 id: musicPlaylistPage1156 id: musicPlaylistPage
1157 tools: searchToolbarItem
1142 }1158 }
1143 }1159 }
11441160
@@ -1200,6 +1216,7 @@
12001216
1201 MusicNowPlaying {1217 MusicNowPlaying {
1202 id: nowPlaying1218 id: nowPlaying
1219 tools: searchToolbarItem
1203 }1220 }
12041221
1205 MusicaddtoPlaylist {1222 MusicaddtoPlaylist {

Subscribers

People subscribed via source and target branches

to status/vote changes: