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
1=== modified file 'qml/Components/PageHeader.qml'
2--- qml/Components/PageHeader.qml 2014-07-30 07:49:12 +0000
3+++ qml/Components/PageHeader.qml 2014-07-30 07:49:12 +0000
4@@ -44,6 +44,12 @@
5 signal backClicked()
6
7 onScopeStyleChanged: refreshLogo()
8+ onSearchQueryChanged: {
9+ // Make sure we are at the search page if the search query changes behind our feet
10+ if (searchQuery) {
11+ headerContainer.showSearch = true;
12+ }
13+ }
14
15 function triggerSearch() {
16 if (searchEntryEnabled) {
17
18=== modified file 'tests/qmltests/Components/tst_PageHeader.qml'
19--- tests/qmltests/Components/tst_PageHeader.qml 2014-07-30 07:49:12 +0000
20+++ tests/qmltests/Components/tst_PageHeader.qml 2014-07-30 07:49:12 +0000
21@@ -219,6 +219,15 @@
22
23 pageHeader.resetSearch();
24 }
25+
26+ function test_search_change_shows_search() {
27+ var headerContainer = findChild(pageHeader, "headerContainer");
28+ compare(headerContainer.showSearch, false);
29+ compare(searchQuery, "");
30+
31+ searchQuery = "H";
32+ compare(headerContainer.showSearch, true);
33+ }
34 }
35
36 Column {

Subscribers

People subscribed via source and target branches