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

Proposed by Albert Astals Cid on 2016-01-13
Status: Merged
Approved by: Michael Zanetti on 2016-01-22
Approved revision: 2118
Merged at revision: 2164
Proposed branch: lp:~aacid/unity8/avila_apps_scope
Merge into: lp:unity8
Diff against target: 174 lines (+10/-46)
6 files modified
qml/Components/ResponsiveGridView.qml (+2/-4)
qml/Dash/CardGrid.qml (+1/-0)
qml/Dash/GenericScopeView.qml (+2/-1)
tests/mocks/Unity/fake_categories.cpp (+1/-1)
tests/qmltests/Components/tst_ResponsiveGridView.qml (+0/-36)
tests/qmltests/Dash/tst_GenericScopeView.qml (+4/-4)
To merge this branch: bzr merge lp:~aacid/unity8/avila_apps_scope
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing on 2016-01-22
Michael Zanetti (community) Approve on 2016-01-22
PS Jenkins bot continuous-integration Needs Fixing on 2016-01-22
Michael Terry 2016-01-13 Approve on 2016-01-13
Review via email: mp+282454@code.launchpad.net

Commit Message

Better looking application scopes for wide screens

Removes the maximum number of columns as discussed with Design it doesn't make sense and made the cards a bit wider

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?
Paty says "Looks alright I guess"

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2115
http://jenkins.qa.ubuntu.com/job/unity8-ci/7053/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6006
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/468/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1758
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/461
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1653
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1653
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/460
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/459
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4641
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6017
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6017/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26605
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/216/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/466
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/466/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26606

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7053/rebuild

review: Needs Fixing (continuous-integration)
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2115
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/37/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/37/rebuild

review: Approve (continuous-integration)
Michael Terry (mterry) wrote :

LGTM. Can't argue with "Looks alright I guess"

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

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

review: Approve
Albert Astals Cid (aacid) wrote :

Actually some of the tests failed, I would not listen to unity8-ci-bot just yet.

lp:~aacid/unity8/avila_apps_scope updated on 2016-01-14
2116. By Albert Astals Cid on 2016-01-14

Merge unity8

2117. By Albert Astals Cid on 2016-01-14

Fix genericscopeview tests now that the 6 column limit has disappeared

Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2117
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/63/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/63/rebuild

review: Approve (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2117
http://jenkins.qa.ubuntu.com/job/unity8-ci/7062/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6019
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/477/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1767
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/470
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1662
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1662
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/469
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/468
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4648
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6030
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6030/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26641
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/222/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/475
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/475/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26642

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7062/rebuild

review: Needs Fixing (continuous-integration)
lp:~aacid/unity8/avila_apps_scope updated on 2016-01-22
2118. By Albert Astals Cid on 2016-01-22

Specify min spacing for the apps scope on wide screens

Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2118
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/171/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/171/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2118
http://jenkins.qa.ubuntu.com/job/unity8-ci/7130/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6142
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/545/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1835
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/538
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1730
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1730
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/537
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/536
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4739
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6153
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6153/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26941
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/281/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/543
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/543/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26942

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7130/rebuild

review: Needs Fixing (continuous-integration)
Michael Zanetti (mzanetti) wrote :

Verified it doesn't change small size screens (like phones). Visuals on larger screens (flo & frieza) approved by Paty and Vesa.

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

as much as we'd expect

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

yes

review: Approve
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2118
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/171/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/171/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Components/ResponsiveGridView.qml'
2--- qml/Components/ResponsiveGridView.qml 2015-11-20 15:36:42 +0000
3+++ qml/Components/ResponsiveGridView.qml 2016-01-22 14:59:25 +0000
4@@ -18,12 +18,10 @@
5 import Ubuntu.Components 1.3
6
7 /*
8- Essentially a GridView where you can specify the maximum number of columns it can have.
9+ Essentially a GridView
10 */
11 Item {
12 property int minimumHorizontalSpacing: units.gu(0.5)
13- // property int minimumNumberOfColumns: 2 // FIXME: not implemented
14- property int maximumNumberOfColumns: 6
15 readonly property int columns: gridView.columns
16 property alias verticalSpacing: gridView.verticalSpacing
17 readonly property alias margins: gridView.margin
18@@ -81,7 +79,7 @@
19 }
20
21 property real allocatableHorizontalSpace: parent.width - columns * delegateWidth
22- property int columns: Math.min(columnsForSpacing(minimumHorizontalSpacing), maximumNumberOfColumns)
23+ property int columns: columnsForSpacing(minimumHorizontalSpacing)
24 property real horizontalSpacing: spacingForColumns(columns)
25 property real verticalSpacing: horizontalSpacing
26 property int margin: allocatableHorizontalSpace - columns * horizontalSpacing
27
28=== modified file 'qml/Dash/CardGrid.qml'
29--- qml/Dash/CardGrid.qml 2015-11-20 16:33:38 +0000
30+++ qml/Dash/CardGrid.qml 2016-01-22 14:59:25 +0000
31@@ -26,6 +26,7 @@
32 }
33 property string artShapeStyle: "inset";
34 property string backgroundShapeStyle: "inset";
35+ property alias minimumHorizontalSpacing: grid.minimumHorizontalSpacing
36
37 expandedHeight: grid.totalContentHeight
38 collapsedHeight: Math.min(grid.contentHeightForRows(collapsedRows, grid.cellHeight), expandedHeight)
39
40=== modified file 'qml/Dash/GenericScopeView.qml'
41--- qml/Dash/GenericScopeView.qml 2015-11-20 16:33:38 +0000
42+++ qml/Dash/GenericScopeView.qml 2016-01-22 14:59:25 +0000
43@@ -365,7 +365,8 @@
44 // Yeah, hackish :/
45 if (scopeView.width > units.gu(45)) {
46 if (scopeView.width >= units.gu(70)) {
47- cardTool.cardWidth = units.gu(9);
48+ cardTool.cardWidth = units.gu(11);
49+ item.minimumHorizontalSpacing = units.gu(5)
50 } else {
51 cardTool.cardWidth = units.gu(10);
52 }
53
54=== modified file 'tests/mocks/Unity/fake_categories.cpp'
55--- tests/mocks/Unity/fake_categories.cpp 2015-11-26 13:51:53 +0000
56+++ tests/mocks/Unity/fake_categories.cpp 2016-01-22 14:59:25 +0000
57@@ -141,7 +141,7 @@
58 ResultsModel *result = m_resultsModels[row];
59 if (!result) {
60 Categories *that = const_cast<Categories*>(this);
61- result = new ResultsModel(15, row, that);
62+ result = new ResultsModel(25, row, that);
63 m_resultsModels[row] = result;
64 }
65 return result;
66
67=== modified file 'tests/qmltests/Components/tst_ResponsiveGridView.qml'
68--- tests/qmltests/Components/tst_ResponsiveGridView.qml 2015-07-15 15:07:19 +0000
69+++ tests/qmltests/Components/tst_ResponsiveGridView.qml 2016-01-22 14:59:25 +0000
70@@ -33,12 +33,6 @@
71 anchors.top: parent.top
72 anchors.right: parent.right
73 ListItem.ValueSelector {
74- id: maxColumnsSelector
75- text: "maximumNumberOfColumns"
76- values: [2,4,8,13,1000]
77- selectedIndex: 1
78- }
79- ListItem.ValueSelector {
80 id: minHSpacingSelector
81 text: "minHorizontalSpacing"
82 values: [0,units.gu(2),units.gu(8),units.gu(25)]
83@@ -86,8 +80,6 @@
84 minimumHorizontalSpacing:
85 minHSpacingSelector.values[minHSpacingSelector.selectedIndex]
86 verticalSpacing: units.gu(2)
87- maximumNumberOfColumns:
88- maxColumnsSelector.values[maxColumnsSelector.selectedIndex]
89 delegateWidth: units.gu(6)
90 delegateHeight: units.gu(6)
91
92@@ -123,31 +115,6 @@
93 name: "ResponsiveGridView"
94 when: windowShown
95
96- function test_maximumNumberOfColumns_data() {
97- var data = new Array()
98-
99- data.push({selectedIndex: 0, maxColumnCount:2, columnCount: 2})
100- data.push({selectedIndex: 1, maxColumnCount:4, columnCount: 4})
101- data.push({selectedIndex: 2, maxColumnCount:8, columnCount: 8})
102- data.push({selectedIndex: 4, maxColumnCount:1000, columnCount: 13})
103-
104- return data
105- }
106-
107- /* Change ResponsiveGridView's maximumNumberOfColumns property and check
108- that the resulting number of columns matches expectations */
109- function test_maximumNumberOfColumns(data) {
110- minHSpacingSelector.selectedIndex = 0
111-
112- // sanity checks
113- compare(maxColumnsSelector.values[data.selectedIndex], data.maxColumnCount)
114- compare(minHSpacingSelector.values[0], 0)
115-
116- maxColumnsSelector.selectedIndex = data.selectedIndex
117- tryCompareFunction(countGridDelegatesOnFirstRow, data.columnCount);
118- compare(grid.columns, data.columnCount)
119- }
120-
121 function test_minimumHorizontalSpacing_data() {
122 var data = new Array()
123
124@@ -162,10 +129,7 @@
125 /* Change ResponsiveGridView's minimumHorizontalSpacing property and check
126 that the resulting number of columns matches expectations */
127 function test_minimumHorizontalSpacing(data) {
128- maxColumnsSelector.selectedIndex = 4
129-
130 // sanity checks
131- compare(maxColumnsSelector.values[4], 1000)
132 compare(minHSpacingSelector.values[data.selectedIndex], data.minHSpacing)
133
134 minHSpacingSelector.selectedIndex = data.selectedIndex
135
136=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
137--- tests/qmltests/Dash/tst_GenericScopeView.qml 2015-12-16 14:35:14 +0000
138+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2016-01-22 14:59:25 +0000
139@@ -238,7 +238,7 @@
140
141 openPreview(4, 0);
142
143- compare(testCase.subPageLoader.count, 12, "There should only be 12 items in preview.");
144+ compare(testCase.subPageLoader.count, 16, "There should only be 16 items in preview.");
145
146 closePreview();
147 }
148@@ -413,7 +413,7 @@
149 var previewListViewList = findChild(subPageLoader.item, "listView");
150
151 // flick to the next previews
152- tryCompare(testCase.subPageLoader, "count", 15);
153+ tryCompare(testCase.subPageLoader, "count", 25);
154 for (var i = 1; i < testCase.subPageLoader.count; ++i) {
155 mouseFlick(testCase.subPageLoader.item, testCase.subPageLoader.width - units.gu(1),
156 testCase.subPageLoader.height / 2,
157@@ -487,7 +487,7 @@
158 mockScope.setName("Mock Scope");
159 mockScope.categories.setCount(2);
160 mockScope.categories.resultModel(0).setResultCount(50);
161- mockScope.categories.resultModel(1).setResultCount(15);
162+ mockScope.categories.resultModel(1).setResultCount(25);
163 mockScope.categories.setLayout(0, "grid");
164 mockScope.categories.setLayout(1, "grid");
165 mockScope.categories.setHeaderLink(0, "");
166@@ -529,7 +529,7 @@
167 mockScope.setId("mockScope");
168 mockScope.setName("Mock Scope");
169 mockScope.categories.setCount(2);
170- mockScope.categories.resultModel(0).setResultCount(15);
171+ mockScope.categories.resultModel(0).setResultCount(25);
172 mockScope.categories.resultModel(1).setResultCount(50);
173 mockScope.categories.setLayout(0, "grid");
174 mockScope.categories.setLayout(1, "grid");

Subscribers

People subscribed via source and target branches