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
=== modified file 'qml/Dash/GenericScopeView.qml'
--- qml/Dash/GenericScopeView.qml 2014-12-03 07:44:46 +0000
+++ qml/Dash/GenericScopeView.qml 2014-12-12 09:59:26 +0000
@@ -494,7 +494,7 @@
494 showBackButton: scopeView.hasBackAction494 showBackButton: scopeView.hasBackAction
495 searchEntryEnabled: true495 searchEntryEnabled: true
496 settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false496 settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false
497 favoriteEnabled: scopeView.scope497 favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope"
498 favorite: scopeView.scope && scopeView.scope.favorite498 favorite: scopeView.scope && scopeView.scope.favorite
499 scopeStyle: scopeView.scopeStyle499 scopeStyle: scopeView.scopeStyle
500 paginationCount: scopeView.paginationCount500 paginationCount: scopeView.paginationCount
501501
=== modified file 'qml/Dash/ScopesListCategory.qml'
--- qml/Dash/ScopesListCategory.qml 2014-11-25 11:03:58 +0000
+++ qml/Dash/ScopesListCategory.qml 2014-12-12 09:59:26 +0000
@@ -78,7 +78,7 @@
78 clip: height < listItemHeight78 clip: height < listItemHeight
79 Behavior on height { enabled: visible; UbuntuNumberAnimation { } }79 Behavior on height { enabled: visible; UbuntuNumberAnimation { } }
80 sourceComponent: ScopesListCategoryItem {80 sourceComponent: ScopesListCategoryItem {
81 objectName: "delegate" + index81 objectName: "delegate" + model.scopeId
8282
83 width: root.width83 width: root.width
84 topMargin: height > listItemHeight ? height - listItemHeight : 084 topMargin: height > listItemHeight ? height - listItemHeight : 0
@@ -86,7 +86,7 @@
86 icon: model.art || model.mascot || ""86 icon: model.art || model.mascot || ""
87 text: model.title || ""87 text: model.title || ""
88 subtext: model.subtitle || ""88 subtext: model.subtitle || ""
89 showStar: root.isFavoritesFeed || root.isAlsoInstalled89 showStar: model.scopeId !== "clickscope" && (root.isFavoritesFeed || root.isAlsoInstalled)
90 isFavorite: root.isFavoritesFeed90 isFavorite: root.isFavoritesFeed
9191
92 hideChildren: dragItem.loaderToShrink == loader92 hideChildren: dragItem.loaderToShrink == loader
9393
=== modified file 'qml/Dash/ScopesListCategoryItem.qml'
--- qml/Dash/ScopesListCategoryItem.qml 2014-10-29 10:57:47 +0000
+++ qml/Dash/ScopesListCategoryItem.qml 2014-12-12 09:59:26 +0000
@@ -29,8 +29,8 @@
29 property alias icon: shapeImage.source29 property alias icon: shapeImage.source
30 property alias text: titleLabel.text30 property alias text: titleLabel.text
31 property alias subtext: subtitleLabel.text31 property alias subtext: subtitleLabel.text
32 property alias showStar: star.visible
3332
33 property bool showStar: false
34 property bool isFavorite: false34 property bool isFavorite: false
35 property bool hideChildren: false35 property bool hideChildren: false
3636
@@ -84,12 +84,14 @@
84 }84 }
85 MouseArea {85 MouseArea {
86 id: starArea86 id: starArea
87 objectName: "starArea"
87 height: parent.height88 height: parent.height
88 width: height89 width: height
89 anchors.right: parent.right90 anchors.right: parent.right
90 onClicked: if (!editMode) root.requestFavorite(model.scopeId, !isFavorite);91 onClicked: if (!editMode) root.requestFavorite(model.scopeId, !isFavorite);
91 onPressed: if (editMode) root.handlePressed(starArea);92 onPressed: if (editMode) root.handlePressed(starArea);
92 onReleased: if (editMode) root.handleReleased(starArea);93 onReleased: if (editMode) root.handleReleased(starArea);
94 visible: editMode || showStar
93 Icon {95 Icon {
94 id: star96 id: star
95 anchors.centerIn: parent97 anchors.centerIn: parent
9698
=== modified file 'tests/qmltests/Dash/tst_Dash.qml'
--- tests/qmltests/Dash/tst_Dash.qml 2014-12-11 13:25:10 +0000
+++ tests/qmltests/Dash/tst_Dash.qml 2014-12-12 09:59:26 +0000
@@ -83,6 +83,30 @@
83 return get_scope_data()83 return get_scope_data()
84 }84 }
8585
86 function test_manage_dash_clickscope_unfavoritable() {
87 // Show the manage dash
88 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
89 var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
90 tryCompare(bottomEdgeController, "progress", 1);
91
92 // Make sure stuff is loaded
93 var favScopesListCategory = findChild(dash, "scopesListCategoryfavorites");
94 var favScopesListCategoryList = findChild(favScopesListCategory, "scopesListCategoryInnerList");
95 tryCompare(favScopesListCategoryList, "currentIndex", 0);
96
97 // Click scope star area is not visible (i.e. can't be unfavorited)
98 var clickScope = findChild(favScopesListCategoryList, "delegateclickscope");
99 var starArea = findChild(clickScope, "starArea");
100 compare(starArea.visible, false);
101
102 // Go back
103 var scopesList = findChild(dash, "scopesList");
104 var scopesListPageHeader = findChild(scopesList, "pageHeader");
105 var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "backButton");
106 mouseClick(backButton, 0, 0);
107 tryCompare(bottomEdgeController, "progress", 0);
108 }
109
86 function test_manage_dash_select_same_favorite() {110 function test_manage_dash_select_same_favorite() {
87 // Show the manage dash111 // Show the manage dash
88 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));112 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
89113
=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
--- tests/qmltests/Dash/tst_GenericScopeView.qml 2014-12-03 07:44:46 +0000
+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2014-12-12 09:59:26 +0000
@@ -574,6 +574,7 @@
574 var innerHeader = findChild(header, "innerPageHeader");574 var innerHeader = findChild(header, "innerPageHeader");
575 verify(innerHeader, "Could not find the inner header");575 verify(innerHeader, "Could not find the inner header");
576576
577 expectFail("Apps", "Click scope should not have a favorite button");
577 var favoriteAction = findChild(innerHeader, "favorite_header_button");578 var favoriteAction = findChild(innerHeader, "favorite_header_button");
578 verify(favoriteAction, "Could not find the favorite action.");579 verify(favoriteAction, "Could not find the favorite action.");
579 mouseClick(favoriteAction, favoriteAction.width / 2, favoriteAction.height / 2);580 mouseClick(favoriteAction, favoriteAction.width / 2, favoriteAction.height / 2);

Subscribers

People subscribed via source and target branches