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

Proposed by Albert Astals Cid on 2014-07-29
Status: Merged
Approved by: Michael Zanetti on 2014-07-29
Approved revision: 1085
Merged at revision: 1144
Proposed branch: lp:~aacid/unity8/scopeSearchHintText
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/scopeActivatePreview
Diff against target: 58 lines (+15/-1)
4 files modified
qml/Components/PageHeader.qml (+1/-0)
qml/Dash/GenericScopeView.qml (+1/-0)
tests/mocks/Unity/fake_scope.cpp (+1/-1)
tests/qmltests/Dash/tst_DashContent.qml (+12/-0)
To merge this branch: bzr merge lp:~aacid/unity8/scopeSearchHintText
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration 2014-07-29 Needs Fixing on 2014-07-29
Michael Zanetti (community) 2014-07-29 Approve on 2014-07-29
Review via email: mp+228655@code.launchpad.net

This proposal supersedes a proposal from 2014-07-25.

Commit message

Pass the scope search hint up to the search line

Description of the change

* Are there any related MPs required for this MP to build/function as expected?
https://code.launchpad.net/~unity-team/unity-scopes-shell/catch-no-search-hint/+merge/228288
No, but there is a crash somewhere in scopes plugin that makes it crash for some scopes and also we have a white on white text problem, so it eihter needs the SDK team to fix the color on SuruDark or the Dash being a separate app so we can not use SuruDark theme

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes, changed hint color of /usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/TextField.qml to be red manually and it is showing up fine

 * 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?
This is requested by design

To post a comment you must log in.
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

I think we could add a simple test here to make sure the value from the scope ends up in the placeholderText.

review: Needs Fixing
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

Otherwise it works fine except the above mentioned issues. I tried to merge it into the dash-as-app branch but that makes me hit the mentioned crash.

Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

> I think we could add a simple test here to make sure the value from the scope
> ends up in the placeholderText.

Added.

Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

thanks. looks good.

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

yeah man!

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

CI? what's that?

review: Approve
Michael Zanetti (mzanetti) wrote :

reapproving.

review: Approve
lp:~aacid/unity8/scopeSearchHintText updated on 2014-08-08
1086. By Albert Astals Cid on 2014-07-30

Merge

1087. By Albert Astals Cid on 2014-07-30

Merge

1088. By Albert Astals Cid on 2014-07-31

Merge

1089. By Albert Astals Cid on 2014-08-01

Merge

1090. By Albert Astals Cid on 2014-08-05

Merge

1091. By Albert Astals Cid on 2014-08-06

Merge

1092. By Albert Astals Cid on 2014-08-06

Merge

1093. By Albert Astals Cid on 2014-08-07

Merge

1094. By Albert Astals Cid on 2014-08-07

Merge

1095. By Albert Astals Cid on 2014-08-08

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-08-08 09:21:35 +0000
3+++ qml/Components/PageHeader.qml 2014-08-08 09:21:36 +0000
4@@ -32,6 +32,7 @@
5 property bool searchEntryEnabled: false
6 property ListModel searchHistory: SearchHistoryModel
7 property alias searchQuery: searchTextField.text
8+ property alias searchHint: searchTextField.placeholderText
9 property alias showSignatureLine: bottomBorder.visible
10
11 property alias bottomItem: bottomContainer.children
12
13=== modified file 'qml/Dash/GenericScopeView.qml'
14--- qml/Dash/GenericScopeView.qml 2014-08-08 09:21:35 +0000
15+++ qml/Dash/GenericScopeView.qml 2014-08-08 09:21:36 +0000
16@@ -420,6 +420,7 @@
17 objectName: "scopePageHeader"
18 width: parent.width
19 title: scopeView.scope ? scopeView.scope.name : ""
20+ searchHint: scopeView.scope && scopeView.scope.searchHint || i18n.tr("Search")
21 showBackButton: scopeView.hasBackAction
22 searchEntryEnabled: true
23 scopeStyle: scopeView.scopeStyle
24
25=== modified file 'tests/mocks/Unity/fake_scope.cpp'
26--- tests/mocks/Unity/fake_scope.cpp 2014-08-08 09:21:35 +0000
27+++ tests/mocks/Unity/fake_scope.cpp 2014-08-08 09:21:36 +0000
28@@ -69,7 +69,7 @@
29
30 QString Scope::searchHint() const
31 {
32- return QString("");
33+ return QString("Search %1").arg(m_name);
34 }
35
36 QString Scope::shortcut() const
37
38=== modified file 'tests/qmltests/Dash/tst_DashContent.qml'
39--- tests/qmltests/Dash/tst_DashContent.qml 2014-08-08 09:21:35 +0000
40+++ tests/qmltests/Dash/tst_DashContent.qml 2014-08-08 09:21:36 +0000
41@@ -380,5 +380,17 @@
42 mouseClick(allButton, 0, 0);
43 tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
44 }
45+
46+ function test_searchHint() {
47+ var dashContentList = findChild(dashContent, "dashContentList");
48+ verify(dashContentList !== null);
49+ var scope = findChild(dashContent, "MockScope1 loader");
50+ waitForRendering(scope);
51+
52+ var categoryListView = findChild(scope, "categoryListView");
53+ waitForRendering(categoryListView);
54+
55+ compare(categoryListView.pageHeader.searchHint, "Search People");
56+ }
57 }
58 }

Subscribers

People subscribed via source and target branches