Merge lp:~aacid/unity8/apps-special-after-all into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michał Sawicz
Approved revision: 1504
Merged at revision: 1509
Proposed branch: lp:~aacid/unity8/apps-special-after-all
Merge into: lp:unity8
Diff against target: 110 lines (+31/-4)
5 files modified
qml/Dash/GenericScopeView.qml (+1/-1)
qml/Dash/ScopesListCategory.qml (+2/-2)
qml/Dash/ScopesListCategoryItem.qml (+3/-1)
tests/qmltests/Dash/tst_Dash.qml (+24/-0)
tests/qmltests/Dash/tst_GenericScopeView.qml (+1/-0)
To merge this branch: bzr merge lp:~aacid/unity8/apps-special-after-all
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+244548@code.launchpad.net

Commit message

clickscope is back to being unfavoritable

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
Michał Sawicz (saviq) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Y
 * Did CI run pass? If not, please explain why.
Not yet.
 * Did you make sure that the branch does not contain spurious tags?
Y

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/GenericScopeView.qml'
2--- qml/Dash/GenericScopeView.qml 2014-12-03 07:44:46 +0000
3+++ qml/Dash/GenericScopeView.qml 2014-12-12 09:59:26 +0000
4@@ -494,7 +494,7 @@
5 showBackButton: scopeView.hasBackAction
6 searchEntryEnabled: true
7 settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false
8- favoriteEnabled: scopeView.scope
9+ favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope"
10 favorite: scopeView.scope && scopeView.scope.favorite
11 scopeStyle: scopeView.scopeStyle
12 paginationCount: scopeView.paginationCount
13
14=== modified file 'qml/Dash/ScopesListCategory.qml'
15--- qml/Dash/ScopesListCategory.qml 2014-11-25 11:03:58 +0000
16+++ qml/Dash/ScopesListCategory.qml 2014-12-12 09:59:26 +0000
17@@ -78,7 +78,7 @@
18 clip: height < listItemHeight
19 Behavior on height { enabled: visible; UbuntuNumberAnimation { } }
20 sourceComponent: ScopesListCategoryItem {
21- objectName: "delegate" + index
22+ objectName: "delegate" + model.scopeId
23
24 width: root.width
25 topMargin: height > listItemHeight ? height - listItemHeight : 0
26@@ -86,7 +86,7 @@
27 icon: model.art || model.mascot || ""
28 text: model.title || ""
29 subtext: model.subtitle || ""
30- showStar: root.isFavoritesFeed || root.isAlsoInstalled
31+ showStar: model.scopeId !== "clickscope" && (root.isFavoritesFeed || root.isAlsoInstalled)
32 isFavorite: root.isFavoritesFeed
33
34 hideChildren: dragItem.loaderToShrink == loader
35
36=== modified file 'qml/Dash/ScopesListCategoryItem.qml'
37--- qml/Dash/ScopesListCategoryItem.qml 2014-10-29 10:57:47 +0000
38+++ qml/Dash/ScopesListCategoryItem.qml 2014-12-12 09:59:26 +0000
39@@ -29,8 +29,8 @@
40 property alias icon: shapeImage.source
41 property alias text: titleLabel.text
42 property alias subtext: subtitleLabel.text
43- property alias showStar: star.visible
44
45+ property bool showStar: false
46 property bool isFavorite: false
47 property bool hideChildren: false
48
49@@ -84,12 +84,14 @@
50 }
51 MouseArea {
52 id: starArea
53+ objectName: "starArea"
54 height: parent.height
55 width: height
56 anchors.right: parent.right
57 onClicked: if (!editMode) root.requestFavorite(model.scopeId, !isFavorite);
58 onPressed: if (editMode) root.handlePressed(starArea);
59 onReleased: if (editMode) root.handleReleased(starArea);
60+ visible: editMode || showStar
61 Icon {
62 id: star
63 anchors.centerIn: parent
64
65=== modified file 'tests/qmltests/Dash/tst_Dash.qml'
66--- tests/qmltests/Dash/tst_Dash.qml 2014-12-11 13:25:10 +0000
67+++ tests/qmltests/Dash/tst_Dash.qml 2014-12-12 09:59:26 +0000
68@@ -83,6 +83,30 @@
69 return get_scope_data()
70 }
71
72+ function test_manage_dash_clickscope_unfavoritable() {
73+ // Show the manage dash
74+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
75+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
76+ tryCompare(bottomEdgeController, "progress", 1);
77+
78+ // Make sure stuff is loaded
79+ var favScopesListCategory = findChild(dash, "scopesListCategoryfavorites");
80+ var favScopesListCategoryList = findChild(favScopesListCategory, "scopesListCategoryInnerList");
81+ tryCompare(favScopesListCategoryList, "currentIndex", 0);
82+
83+ // Click scope star area is not visible (i.e. can't be unfavorited)
84+ var clickScope = findChild(favScopesListCategoryList, "delegateclickscope");
85+ var starArea = findChild(clickScope, "starArea");
86+ compare(starArea.visible, false);
87+
88+ // Go back
89+ var scopesList = findChild(dash, "scopesList");
90+ var scopesListPageHeader = findChild(scopesList, "pageHeader");
91+ var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "backButton");
92+ mouseClick(backButton, 0, 0);
93+ tryCompare(bottomEdgeController, "progress", 0);
94+ }
95+
96 function test_manage_dash_select_same_favorite() {
97 // Show the manage dash
98 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
99
100=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
101--- tests/qmltests/Dash/tst_GenericScopeView.qml 2014-12-03 07:44:46 +0000
102+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2014-12-12 09:59:26 +0000
103@@ -574,6 +574,7 @@
104 var innerHeader = findChild(header, "innerPageHeader");
105 verify(innerHeader, "Could not find the inner header");
106
107+ expectFail("Apps", "Click scope should not have a favorite button");
108 var favoriteAction = findChild(innerHeader, "favorite_header_button");
109 verify(favoriteAction, "Could not find the favorite action.");
110 mouseClick(favoriteAction, favoriteAction.width / 2, favoriteAction.height / 2);

Subscribers

People subscribed via source and target branches