Merge lp:~aacid/unity8/scopeListPageHeaderScopeStyle into lp:unity8
- scopeListPageHeaderScopeStyle
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~aacid/unity8/scopeListPageHeaderScopeStyle |
Merge into: | lp:unity8 |
Diff against target: |
345 lines (+161/-17) 9 files modified
qml/Dash/Dash.qml (+1/-0) qml/Dash/GenericScopeView.qml (+1/-1) qml/Dash/ScopesList.qml (+6/-1) qml/Dash/ScopesListCategory.qml (+3/-2) qml/Dash/ScopesListCategoryItem.qml (+3/-1) tests/mocks/Unity/fake_scopesoverview.cpp (+18/-0) tests/mocks/Unity/fake_scopesoverview.h (+4/-0) tests/qmltests/Dash/tst_Dash.qml (+124/-12) tests/qmltests/Dash/tst_GenericScopeView.qml (+1/-0) |
To merge this branch: | bzr merge lp:~aacid/unity8/scopeListPageHeaderScopeStyle |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Zanetti (community) | Needs Information | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Review via email: mp+244293@code.launchpad.net |
This proposal has been superseded by a proposal from 2014-12-12.
Commit message
Bind scopeStyle for the scope list header
Description of the change
This does nothing since the backend is not exposing any scopeStyle for the overview scope but in the case they do it'll be ready
* Are there any related MPs required for this MP to build/function as expected?
No
* 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?
N/A
PS Jenkins bot (ps-jenkins) wrote : | # |
- 1484. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1484
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1485. By Michael Zanetti
-
decrease opacity changes in spread, move it to a separate surface.
This fixes the issue that trusted sessions would cause the app to shine through when being made transparent. Instead, we're putting a black overlay on top now. Additionally it decreases the opacity change as requested by design, in order to avoid the "flickering" effect when going to spread quickly. Fixes: #1360258
Approved by: PS Jenkins bot, Vesa Rautiainen, Albert Astals Cid - 1486. By Albert Astals Cid
-
Fix the Dash Header hamburger menu background color
Approved by: Michael Zanetti
- 1487. By Gerry Boland
-
[indicators] Fix positioning on panel resize.
Approved by: Daniel d'Andrada - 1488. By Michael Zanetti
-
Add an initial, rudimentary DesktopStage to get started
Approved by: Gerry Boland - 1489. By Michael Zanetti
-
Uninvert Launcher in Desktop Mode
Also some little restruturing
Approved by: Gerry Boland - 1490. By Michael Zanetti
-
Add support for Wallpaper in Desktop stage
Approved by: Gerry Boland - 1491. By Michael Zanetti
-
Add window control buttons to panel for fullscreen applications
Approved by: Gerry Boland - 1492. By CI Train Bot Account
-
Bump version due to new Manage Dash
- 1493. By Andrea Cimitan
-
Remove dismiss timer in Launcher Fixes: #1368778
Approved by: Michael Zanetti, PS Jenkins bot - 1494. By dobey
-
Add dependency on gir1.2-notify-0.7 to unity8-autopilot package. Fixes: #1400437
Approved by: Michał Sawicz - 1495. By Albert Astals Cid
-
Fix tests Fixes: #1400449
Approved by: Michael Zanetti - 1496. By Albert Astals Cid
-
Allow pulling manage dash if there's no favorite scopes
Fixes: #1400774
Approved by: Michael Zanetti - 1497. By Albert Astals Cid
-
Manage Dash: Make store button work even if you have no favorites
Fixes: #1400771
Approved by: Michael Zanetti - 1498. By Albert Astals Cid
-
Make pot_file
Approved by: Michał Sawicz - 1499. By CI Train Bot Account
-
Releasing 8.02+15.
04.20141211. 2-0ubuntu1 - 1500. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
Michael Zanetti (mzanetti) wrote : | # |
Think it would make sense setting this from a mock and testing if some of the style elements are properly applied?
- 1501. By Albert Astals Cid
-
Make Navigation work when "jumping" to the non root
There's two fixes:
* If the Navigation we jumped to is a leaf, list the model of the parent
* If we're going back/left but we're already on index 0 of the list prepend the parent so we can continue going back Fixes: #1343242
Approved by: Michael Zanetti - 1502. By CI Train Bot Account
-
Releasing 8.02+15.
04.20141212. 1-0ubuntu1 - 1503. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
- 1504. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
- 1505. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
- 1506. By Albert Astals Cid
-
Use the default scope style for the header
Unmerged revisions
- 1506. By Albert Astals Cid
-
Use the default scope style for the header
Preview Diff
1 | === modified file 'qml/Dash/Dash.qml' |
2 | --- qml/Dash/Dash.qml 2014-12-11 13:25:10 +0000 |
3 | +++ qml/Dash/Dash.qml 2014-12-12 13:04:21 +0000 |
4 | @@ -75,6 +75,7 @@ |
5 | return |
6 | } |
7 | |
8 | + dashContent.workaroundRestoreIndex = -1; |
9 | dashContent.setCurrentScopeAtIndex(scopeIndex, animate, reset) |
10 | } |
11 | |
12 | |
13 | === modified file 'qml/Dash/GenericScopeView.qml' |
14 | --- qml/Dash/GenericScopeView.qml 2014-12-03 07:44:46 +0000 |
15 | +++ qml/Dash/GenericScopeView.qml 2014-12-12 13:04:21 +0000 |
16 | @@ -494,7 +494,7 @@ |
17 | showBackButton: scopeView.hasBackAction |
18 | searchEntryEnabled: true |
19 | settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false |
20 | - favoriteEnabled: scopeView.scope |
21 | + favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope" |
22 | favorite: scopeView.scope && scopeView.scope.favorite |
23 | scopeStyle: scopeView.scopeStyle |
24 | paginationCount: scopeView.paginationCount |
25 | |
26 | === modified file 'qml/Dash/ScopesList.qml' |
27 | --- qml/Dash/ScopesList.qml 2014-12-02 12:04:11 +0000 |
28 | +++ qml/Dash/ScopesList.qml 2014-12-12 13:04:21 +0000 |
29 | @@ -34,6 +34,10 @@ |
30 | |
31 | state: "browse" |
32 | |
33 | + property var scopeStyle: ScopeStyle { |
34 | + style: scope ? scope.customizations : {} |
35 | + } |
36 | + |
37 | onStateChanged: { |
38 | if (state == "edit") { |
39 | // As per design entering edit mode clears the possible existing search |
40 | @@ -66,6 +70,7 @@ |
41 | backIsClose: root.state == "edit" |
42 | storeEntryEnabled: root.state == "browse" |
43 | searchEntryEnabled: false // Disable search for now |
44 | + scopeStyle: root.scopeStyle |
45 | onBackClicked: { |
46 | if (backIsClose) { |
47 | root.state = "browse" |
48 | @@ -111,7 +116,7 @@ |
49 | |
50 | editMode: root.state == "edit" |
51 | |
52 | - scopeStyle: root.scope.scopeStyle |
53 | + scopeStyle: root.scopeStyle |
54 | isFavoritesFeed: categoryId == "favorites" |
55 | isAlsoInstalled: categoryId == "other" |
56 | |
57 | |
58 | === modified file 'qml/Dash/ScopesListCategory.qml' |
59 | --- qml/Dash/ScopesListCategory.qml 2014-11-25 11:03:58 +0000 |
60 | +++ qml/Dash/ScopesListCategory.qml 2014-12-12 13:04:21 +0000 |
61 | @@ -40,6 +40,7 @@ |
62 | |
63 | ListItems.Header { |
64 | id: header |
65 | + objectName: "scopesListCategoryHeader" |
66 | width: root.width |
67 | height: units.gu(5) |
68 | color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText |
69 | @@ -78,7 +79,7 @@ |
70 | clip: height < listItemHeight |
71 | Behavior on height { enabled: visible; UbuntuNumberAnimation { } } |
72 | sourceComponent: ScopesListCategoryItem { |
73 | - objectName: "delegate" + index |
74 | + objectName: "delegate" + model.scopeId |
75 | |
76 | width: root.width |
77 | topMargin: height > listItemHeight ? height - listItemHeight : 0 |
78 | @@ -86,7 +87,7 @@ |
79 | icon: model.art || model.mascot || "" |
80 | text: model.title || "" |
81 | subtext: model.subtitle || "" |
82 | - showStar: root.isFavoritesFeed || root.isAlsoInstalled |
83 | + showStar: model.scopeId !== "clickscope" && (root.isFavoritesFeed || root.isAlsoInstalled) |
84 | isFavorite: root.isFavoritesFeed |
85 | |
86 | hideChildren: dragItem.loaderToShrink == loader |
87 | |
88 | === modified file 'qml/Dash/ScopesListCategoryItem.qml' |
89 | --- qml/Dash/ScopesListCategoryItem.qml 2014-10-29 10:57:47 +0000 |
90 | +++ qml/Dash/ScopesListCategoryItem.qml 2014-12-12 13:04:21 +0000 |
91 | @@ -29,8 +29,8 @@ |
92 | property alias icon: shapeImage.source |
93 | property alias text: titleLabel.text |
94 | property alias subtext: subtitleLabel.text |
95 | - property alias showStar: star.visible |
96 | |
97 | + property bool showStar: false |
98 | property bool isFavorite: false |
99 | property bool hideChildren: false |
100 | |
101 | @@ -84,12 +84,14 @@ |
102 | } |
103 | MouseArea { |
104 | id: starArea |
105 | + objectName: "starArea" |
106 | height: parent.height |
107 | width: height |
108 | anchors.right: parent.right |
109 | onClicked: if (!editMode) root.requestFavorite(model.scopeId, !isFavorite); |
110 | onPressed: if (editMode) root.handlePressed(starArea); |
111 | onReleased: if (editMode) root.handleReleased(starArea); |
112 | + visible: editMode || showStar |
113 | Icon { |
114 | id: star |
115 | anchors.centerIn: parent |
116 | |
117 | === modified file 'tests/mocks/Unity/fake_scopesoverview.cpp' |
118 | --- tests/mocks/Unity/fake_scopesoverview.cpp 2014-10-06 08:52:00 +0000 |
119 | +++ tests/mocks/Unity/fake_scopesoverview.cpp 2014-12-12 13:04:21 +0000 |
120 | @@ -22,6 +22,7 @@ |
121 | |
122 | ScopesOverview::ScopesOverview(Scopes* parent) |
123 | : Scope("scopesOverview", "Scopes Overview", false, parent) |
124 | + , m_headerBlue(false) |
125 | { |
126 | delete m_categories; // delete the usual categories, we're not going to use it |
127 | m_scopesOverviewCategories = new ScopesOverviewCategories(parent, this); |
128 | @@ -52,6 +53,23 @@ |
129 | } |
130 | } |
131 | |
132 | +void ScopesOverview::setHeaderBlue(bool blue) |
133 | +{ |
134 | + if (m_headerBlue != blue) { |
135 | + m_headerBlue = blue; |
136 | + Q_EMIT customizationsChanged(); |
137 | + } |
138 | +} |
139 | + |
140 | +QVariantMap ScopesOverview::customizations() const |
141 | +{ |
142 | + QVariantMap res; |
143 | + if (m_headerBlue) { |
144 | + res["foreground-color"] = "blue"; |
145 | + } |
146 | + return res; |
147 | +} |
148 | + |
149 | void ScopesOverview::setFavorite(Scope *scope, bool favorite) |
150 | { |
151 | m_scopesOverviewCategories->setFavorite(scope, favorite); |
152 | |
153 | === modified file 'tests/mocks/Unity/fake_scopesoverview.h' |
154 | --- tests/mocks/Unity/fake_scopesoverview.h 2014-09-26 11:21:19 +0000 |
155 | +++ tests/mocks/Unity/fake_scopesoverview.h 2014-12-12 13:04:21 +0000 |
156 | @@ -34,6 +34,9 @@ |
157 | void setSearchQuery(const QString& search_query) override; |
158 | Q_INVOKABLE void activate(QVariant const& result) override; |
159 | |
160 | + Q_INVOKABLE void setHeaderBlue(bool blue); |
161 | + QVariantMap customizations() const; |
162 | + |
163 | // This is implementation detail |
164 | void setFavorite(Scope *scope, bool favorite); |
165 | void moveFavoriteTo(Scope *scope, int index); |
166 | @@ -41,6 +44,7 @@ |
167 | private: |
168 | ScopesOverviewCategories *m_scopesOverviewCategories; |
169 | unity::shell::scopes::CategoriesInterface *m_searchCategories; |
170 | + bool m_headerBlue; |
171 | }; |
172 | |
173 | class ScopesOverviewCategories : public unity::shell::scopes::CategoriesInterface |
174 | |
175 | === modified file 'tests/qmltests/Dash/tst_Dash.qml' |
176 | --- tests/qmltests/Dash/tst_Dash.qml 2014-12-11 13:25:10 +0000 |
177 | +++ tests/qmltests/Dash/tst_Dash.qml 2014-12-12 13:04:21 +0000 |
178 | @@ -70,17 +70,28 @@ |
179 | waitForRendering(findChild(dash, "scopeLoader0").item); |
180 | } |
181 | |
182 | - function get_scope_data() { |
183 | - return [ |
184 | - { tag: "MockScope1", visualIndex: 0 }, |
185 | - { tag: "MockScope2", visualIndex: -1 }, |
186 | - { tag: "clickscope", visualIndex: 1 }, |
187 | - { tag: "MockScope5", visualIndex: 2 }, |
188 | - ] |
189 | - } |
190 | - |
191 | - function test_show_scope_on_load_data() { |
192 | - return get_scope_data() |
193 | + function test_manage_dash_clickscope_unfavoritable() { |
194 | + // Show the manage dash |
195 | + touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2)); |
196 | + var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController"); |
197 | + tryCompare(bottomEdgeController, "progress", 1); |
198 | + |
199 | + // Make sure stuff is loaded |
200 | + var favScopesListCategory = findChild(dash, "scopesListCategoryfavorites"); |
201 | + var favScopesListCategoryList = findChild(favScopesListCategory, "scopesListCategoryInnerList"); |
202 | + tryCompare(favScopesListCategoryList, "currentIndex", 0); |
203 | + |
204 | + // Click scope star area is not visible (i.e. can't be unfavorited) |
205 | + var clickScope = findChild(favScopesListCategoryList, "delegateclickscope"); |
206 | + var starArea = findChild(clickScope, "starArea"); |
207 | + compare(starArea.visible, false); |
208 | + |
209 | + // Go back |
210 | + var scopesList = findChild(dash, "scopesList"); |
211 | + var scopesListPageHeader = findChild(scopesList, "pageHeader"); |
212 | + var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "backButton"); |
213 | + mouseClick(backButton, 0, 0); |
214 | + tryCompare(bottomEdgeController, "progress", 0); |
215 | } |
216 | |
217 | function test_manage_dash_select_same_favorite() { |
218 | @@ -306,7 +317,7 @@ |
219 | spy.target = scopesList.scope; |
220 | spy.signalName = "performQuery"; |
221 | |
222 | - // Do a search |
223 | + // Click on the store |
224 | var scopesListPageHeader = findChild(scopesList, "pageHeader"); |
225 | var searchButton = findChild(scopesListPageHeader, "store_header_button"); |
226 | mouseClick(searchButton, 0, 0); |
227 | @@ -315,5 +326,106 @@ |
228 | compare(spy.signalArguments[0][0], "scope://com.canonical.scopes.clickstore"); |
229 | tryCompare(bottomEdgeController, "progress", 0); |
230 | } |
231 | + |
232 | + function test_manage_dash_move_current() { |
233 | + var dashContentList = findChild(dash, "dashContentList"); |
234 | + compare(dashContentList.currentIndex, 0); |
235 | + compare(dashContentList.currentItem.scopeId, "MockScope1"); |
236 | + |
237 | + // Show the manage dash |
238 | + touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2)); |
239 | + var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController"); |
240 | + tryCompare(bottomEdgeController, "progress", 1); |
241 | + |
242 | + // Make sure stuff is loaded |
243 | + var favScopesListCategory = findChild(dash, "scopesListCategoryfavorites"); |
244 | + var favScopesListCategoryList = findChild(favScopesListCategory, "scopesListCategoryInnerList"); |
245 | + tryCompare(favScopesListCategoryList, "currentIndex", 0); |
246 | + |
247 | + // Enter edit mode |
248 | + var scopesList = findChild(dash, "scopesList"); |
249 | + var clickScope = findChild(favScopesListCategoryList, "delegateclickscope"); |
250 | + mousePress(clickScope, 0, 0); |
251 | + tryCompare(scopesList, "state", "edit"); |
252 | + mouseRelease(clickScope, 0, 0); |
253 | + |
254 | + var starArea = findChild(clickScope, "starArea"); |
255 | + touchFlick(starArea, 0, 0, 0, -units.gu(10)); |
256 | + |
257 | + // Exit edit mode and go back |
258 | + var scopesList = findChild(dash, "scopesList"); |
259 | + var scopesListPageHeader = findChild(scopesList, "pageHeader"); |
260 | + var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "backButton"); |
261 | + mouseClick(backButton, 0, 0); |
262 | + mouseClick(backButton, 0, 0); |
263 | + tryCompare(bottomEdgeController, "progress", 0); |
264 | + |
265 | + tryCompare(dashContentList, "currentIndex", 0); |
266 | + compare(dashContentList.currentItem.scopeId, "clickscope"); |
267 | + |
268 | + // Move to second scope |
269 | + touchFlick(dash, dash.width / 2, units.gu(2), dash.width / 5, units.gu(2)); |
270 | + tryCompare(dashContentList, "currentIndex", 1); |
271 | + compare(dashContentList.currentItem.scopeId, "MockScope1"); |
272 | + } |
273 | + |
274 | + function test_manage_dash_move_current_click_other() { |
275 | + var dashContentList = findChild(dash, "dashContentList"); |
276 | + compare(dashContentList.currentIndex, 0); |
277 | + compare(dashContentList.currentItem.scopeId, "MockScope1"); |
278 | + |
279 | + // Show the manage dash |
280 | + touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2)); |
281 | + var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController"); |
282 | + tryCompare(bottomEdgeController, "progress", 1); |
283 | + |
284 | + // Make sure stuff is loaded |
285 | + var favScopesListCategory = findChild(dash, "scopesListCategoryfavorites"); |
286 | + var favScopesListCategoryList = findChild(favScopesListCategory, "scopesListCategoryInnerList"); |
287 | + tryCompare(favScopesListCategoryList, "currentIndex", 0); |
288 | + |
289 | + // Enter edit mode |
290 | + var scopesList = findChild(dash, "scopesList"); |
291 | + var clickScope = findChild(favScopesListCategoryList, "delegateclickscope"); |
292 | + mousePress(clickScope, 0, 0); |
293 | + tryCompare(scopesList, "state", "edit"); |
294 | + mouseRelease(clickScope, 0, 0); |
295 | + |
296 | + var starArea = findChild(clickScope, "starArea"); |
297 | + touchFlick(starArea, 0, 0, 0, -units.gu(10)); |
298 | + |
299 | + // wait for the animation to settle |
300 | + tryCompare(clickScope, "height", units.gu(6)); |
301 | + |
302 | + // Exit edit mode |
303 | + var scopesList = findChild(dash, "scopesList"); |
304 | + var scopesListPageHeader = findChild(scopesList, "pageHeader"); |
305 | + var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "backButton"); |
306 | + mouseClick(backButton, 0, 0); |
307 | + |
308 | + // Click on third scope |
309 | + var mockScope5 = findChild(favScopesListCategoryList, "delegateMockScope5"); |
310 | + waitForRendering(mockScope5) |
311 | + mouseClick(mockScope5, 0, 0); |
312 | + tryCompare(bottomEdgeController, "progress", 0); |
313 | + tryCompare(dashContentList, "currentIndex", 2); |
314 | + compare(dashContentList.currentItem.scopeId, "MockScope5"); |
315 | + } |
316 | + |
317 | + function test_manage_dash_customizations() { |
318 | + var scopesList = findChild(dash, "scopesList"); |
319 | + var scopesListPageHeader = findChild(scopesList, "innerPageHeader"); |
320 | + |
321 | + var favScopesListCategory = findChild(dash, "scopesListCategoryfavorites"); |
322 | + var scopesListCategoryHeader = findChild(favScopesListCategory, "scopesListCategoryHeader"); |
323 | + |
324 | + compare(scopesListPageHeader.config.foregroundColor, "#5d5d5d"); |
325 | + compare(scopesListCategoryHeader.color, "#5d5d5d"); |
326 | + |
327 | + scopesList.scope.setHeaderBlue(true); |
328 | + |
329 | + compare(scopesListPageHeader.config.foregroundColor, "#0000ff"); |
330 | + compare(scopesListCategoryHeader.color, "#0000ff"); |
331 | + } |
332 | } |
333 | } |
334 | |
335 | === modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml' |
336 | --- tests/qmltests/Dash/tst_GenericScopeView.qml 2014-12-03 07:44:46 +0000 |
337 | +++ tests/qmltests/Dash/tst_GenericScopeView.qml 2014-12-12 13:04:21 +0000 |
338 | @@ -574,6 +574,7 @@ |
339 | var innerHeader = findChild(header, "innerPageHeader"); |
340 | verify(innerHeader, "Could not find the inner header"); |
341 | |
342 | + expectFail("Apps", "Click scope should not have a favorite button"); |
343 | var favoriteAction = findChild(innerHeader, "favorite_header_button"); |
344 | verify(favoriteAction, "Could not find the favorite action."); |
345 | mouseClick(favoriteAction, favoriteAction.width / 2, favoriteAction.height / 2); |
FAILED: Continuous integration, rev:1484 jenkins. qa.ubuntu. com/job/ unity8- ci/5019/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 520/console jenkins. qa.ubuntu. com/job/ unity8- vivid-amd64- ci/184/ console jenkins. qa.ubuntu. com/job/ unity8- vivid-i386- ci/184 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- vivid-mako/ 452/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 518 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 518/artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 16503
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/5019/ rebuild
http://