Merge lp:~aacid/unity8/showSearchOnSearchQueryChange into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 1090
Merged at revision: 1098
Proposed branch: lp:~aacid/unity8/showSearchOnSearchQueryChange
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/unfocusSearchEntryOnHistoryPick
Diff against target: 36 lines (+15/-0)
2 files modified
qml/Components/PageHeader.qml (+6/-0)
tests/qmltests/Components/tst_PageHeader.qml (+9/-0)
To merge this branch: bzr merge lp:~aacid/unity8/showSearchOnSearchQueryChange
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michael Zanetti (community) Approve
Review via email: mp+228454@code.launchpad.net

Commit message

Show search field if the search query changes

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
Prerequisite

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
It has been requested by design

To post a comment you must log in.
Revision history for this message
Michael Zanetti (mzanetti) wrote :

It adds a tiny oddity:
* Go to clickscope
* start a search
* click on App store

=> now, on clicking the back button it first hides the search, and only a second click goes back to the clickscope.

Approving nevertheless as this is really minor and the gain of this merge is much bigger. In case we fix/workaround this oddity I'm fine with that being a separate fix at a later point.

 * Did you perform an exploratory manual test run of the code change and any related functionality?

Yes.

 * Did CI run pass? If not, please explain why.

Not yet, but signs are good :)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
1091. By Albert Astals Cid

Merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Components/PageHeader.qml'
--- qml/Components/PageHeader.qml 2014-07-30 07:49:12 +0000
+++ qml/Components/PageHeader.qml 2014-07-30 07:49:12 +0000
@@ -44,6 +44,12 @@
44 signal backClicked()44 signal backClicked()
4545
46 onScopeStyleChanged: refreshLogo()46 onScopeStyleChanged: refreshLogo()
47 onSearchQueryChanged: {
48 // Make sure we are at the search page if the search query changes behind our feet
49 if (searchQuery) {
50 headerContainer.showSearch = true;
51 }
52 }
4753
48 function triggerSearch() {54 function triggerSearch() {
49 if (searchEntryEnabled) {55 if (searchEntryEnabled) {
5056
=== modified file 'tests/qmltests/Components/tst_PageHeader.qml'
--- tests/qmltests/Components/tst_PageHeader.qml 2014-07-30 07:49:12 +0000
+++ tests/qmltests/Components/tst_PageHeader.qml 2014-07-30 07:49:12 +0000
@@ -219,6 +219,15 @@
219219
220 pageHeader.resetSearch();220 pageHeader.resetSearch();
221 }221 }
222
223 function test_search_change_shows_search() {
224 var headerContainer = findChild(pageHeader, "headerContainer");
225 compare(headerContainer.showSearch, false);
226 compare(searchQuery, "");
227
228 searchQuery = "H";
229 compare(headerContainer.showSearch, true);
230 }
222 }231 }
223232
224 Column {233 Column {

Subscribers

People subscribed via source and target branches