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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 1483
Merged at revision: 1496
Proposed branch: lp:~aacid/unity8/bottom_list_no_favorites
Merge into: lp:unity8
Diff against target: 52 lines (+21/-3)
2 files modified
qml/Dash/Dash.qml (+2/-3)
tests/qmltests/Dash/tst_Dash.qml (+19/-0)
To merge this branch: bzr merge lp:~aacid/unity8/bottom_list_no_favorites
Reviewer Review Type Date Requested Status
Michał Sawicz Needs Information
Michael Zanetti (community) Approve
Review via email: mp+244169@code.launchpad.net

Commit message

Allow pulling manage dash if there's no favorite scopes

Description of the change

 * 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

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

 * 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.

n/a

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

yes

review: Approve
Revision history for this message
Michał Sawicz (saviq) wrote :

Can we have a test for this?

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote :

Added

1484. By Albert Astals Cid

Add test

1485. By Albert Astals Cid

remove wrong comment

1486. By Albert Astals Cid

Fix comment

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/Dash.qml'
2--- qml/Dash/Dash.qml 2014-12-03 07:44:46 +0000
3+++ qml/Dash/Dash.qml 2014-12-10 08:49:06 +0000
4@@ -304,7 +304,7 @@
5 Image {
6 source: "graphics/overview_hint.png"
7 anchors.horizontalCenter: parent.horizontalCenter
8- opacity: (scopeItem.scope ? scopeItem.pageHeaderTotallyVisible : dashContent.pageHeaderTotallyVisible) &&
9+ opacity: (scopeItem.scope ? scopeItem.pageHeaderTotallyVisible : scopes.count == 0 || dashContent.pageHeaderTotallyVisible) &&
10 (overviewDragHandle.enabled || bottomEdgeController.progress != 0) ? 1 : 0
11 Behavior on opacity {
12 enabled: bottomEdgeController.progress == 0
13@@ -324,8 +324,7 @@
14 z: 1
15 direction: Direction.Upwards
16 enabled: !dashContent.subPageShown &&
17- dashContent.currentScope &&
18- dashContent.currentScope.searchQuery == "" &&
19+ (scopes.count == 0 || (dashContent.currentScope && dashContent.currentScope.searchQuery == "")) &&
20 !scopeItem.scope &&
21 (bottomEdgeController.progress == 0 || dragging)
22
23
24=== modified file 'tests/qmltests/Dash/tst_Dash.qml'
25--- tests/qmltests/Dash/tst_Dash.qml 2014-12-03 07:44:46 +0000
26+++ tests/qmltests/Dash/tst_Dash.qml 2014-12-10 08:49:06 +0000
27@@ -211,6 +211,25 @@
28 compare(dashContentList.currentIndex, 0);
29 }
30
31+ function test_manage_dash_open_no_favorites() {
32+ // Make it so there are no scopes
33+ scopes.clear();
34+ var dashContentList = findChild(dash, "dashContentList");
35+ tryCompare(dashContentList, "count", 0);
36+
37+ // Show the manage dash
38+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
39+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
40+ tryCompare(bottomEdgeController, "progress", 1);
41+
42+ // Go back
43+ var scopesList = findChild(dash, "scopesList");
44+ var scopesListPageHeader = findChild(scopesList, "pageHeader");
45+ var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "backButton");
46+ mouseClick(backButton, 0, 0);
47+ tryCompare(bottomEdgeController, "progress", 0);
48+ }
49+
50 function test_setCurrentScope() {
51 var dashContentList = findChild(dash, "dashContentList");
52 var startX = dash.width - units.gu(1);

Subscribers

People subscribed via source and target branches