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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 1321
Merged at revision: 1357
Proposed branch: lp:~aacid/unity8/killListItemsBase
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/base_not_clickable
Diff against target: 166 lines (+6/-107)
4 files modified
qml/Components/ListItems/Highlight.qml (+0/-46)
qml/Dash/DashCategoryBase.qml (+4/-58)
qml/Dash/GenericScopeView.qml (+1/-2)
tests/autopilot/unity8/shell/emulators/dash.py (+1/-1)
To merge this branch: bzr merge lp:~aacid/unity8/killListItemsBase
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+236836@code.launchpad.net

Commit message

Move Base.qml to DashCategoryBase

It's the only place we use it and we can simplify stuff quite a bit

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
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~aacid/unity8/killListItemsBase updated
1319. By Albert Astals Cid

Merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~aacid/unity8/killListItemsBase updated
1320. By Albert Astals Cid

Merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

there seem to be some real AP failures in the mix...

autopilot/unity8/shell/emulators/dash.py:209: 'Base', objectName='dashCategory{}'.format(category))

review: Needs Fixing
lp:~aacid/unity8/killListItemsBase updated
1321. By Albert Astals Cid

Name changed

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
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.

no... but this one now seems unrelated... IO-error in jenkins?

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

yes

review: Approve
lp:~aacid/unity8/killListItemsBase updated
1322. By Albert Astals Cid

Merge

1323. By Albert Astals Cid

Merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'qml/Components/ListItems/Highlight.qml'
2--- qml/Components/ListItems/Highlight.qml 2013-06-05 22:03:08 +0000
3+++ qml/Components/ListItems/Highlight.qml 1970-01-01 00:00:00 +0000
4@@ -1,46 +0,0 @@
5-/*
6- * Copyright (C) 2013 Canonical, Ltd.
7- *
8- * This program is free software; you can redistribute it and/or modify
9- * it under the terms of the GNU General Public License as published by
10- * the Free Software Foundation; version 3.
11- *
12- * This program is distributed in the hope that it will be useful,
13- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15- * GNU General Public License for more details.
16- *
17- * You should have received a copy of the GNU General Public License
18- * along with this program. If not, see <http://www.gnu.org/licenses/>.
19- */
20-
21-import QtQuick 2.0
22-
23-Rectangle {
24- id: highlight
25-
26- property bool pressed: false
27- property real pressedOpacity: 0.3
28-
29- color: "black"
30- opacity: 0
31- state: pressed ? "pressed" : ""
32- states: [
33- State {
34- name: "pressed"
35- PropertyChanges { target: highlight; opacity: pressedOpacity}
36- }
37- ]
38- transitions: [
39- Transition {
40- from: ""
41- to: "pressed"
42- NumberAnimation { target: highlight; property: "opacity"; duration: 50}
43- },
44- Transition {
45- from: "pressed"
46- to: ""
47- NumberAnimation { target: highlight; property: "opacity"; duration: 100}
48- }
49- ]
50-}
51
52=== renamed file 'qml/Components/ListItems/Base.qml' => 'qml/Dash/DashCategoryBase.qml'
53--- qml/Components/ListItems/Base.qml 2014-10-03 11:39:18 +0000
54+++ qml/Dash/DashCategoryBase.qml 2014-10-09 17:42:37 +0000
55@@ -1,5 +1,5 @@
56 /*
57- * Copyright (C) 2012 Canonical, Ltd.
58+ * Copyright (C) 2012-2014 Canonical, Ltd.
59 *
60 * This program is free software; you can redistribute it and/or modify
61 * it under the terms of the GNU General Public License as published by
62@@ -18,46 +18,8 @@
63 import Ubuntu.Components 0.1
64
65 Item {
66- id: emptyListItem
67- width: parent ? parent.width : units.gu(31)
68- height: body.height + bottomDividerLine.height
69-
70- /*!
71- \preliminary
72- Specifies whether the list item is selected.
73- */
74- property bool selected: false
75-
76- /*!
77- \preliminary
78- Set to show or hide the thin bottom divider line (drawn by the \l ThinDivider component).
79- This line is shown by default except in cases where this item is the delegate of a ListView.
80- */
81- property bool showDivider: __showDivider()
82-
83- /*!
84- \internal
85- Method to automatically determine if the bottom divider line should be drawn.
86- This always returns true, unless item is a delegate in a ListView. If in a ListView
87- it will return false only when:
88- + if this is the final item in the list, and ListView.footer is set (again as thin
89- divider line won't look well with footer below it)
90- */
91- function __showDivider() {
92- // if we're not in ListView, always show a thin dividing line at the bottom
93- var model = null;
94- if (typeof ListViewWithPageHeader !== 'undefined') {
95- if (typeof ListViewWithPageHeader.model !== 'undefined') {
96- model = ListViewWithPageHeader.model;
97- }
98- } else if (ListView.view !== null) {
99- model = ListView.view.model;
100- }
101- // if we're last item in ListView don't show divider
102- if (model && index === model.count - 1) return false;
103-
104- return true;
105- }
106+ width: parent.width
107+ height: body.height
108
109 /* Relevant really only for ListViewWithPageHeader case: specify how many pixels we can overlap with the section header */
110 readonly property int allowedOverlap: units.dp(1)
111@@ -92,25 +54,9 @@
112 anchors {
113 left: parent.left
114 right: parent.right
115- bottom: bottomDividerLine.top
116+ bottom: parent.bottom
117 }
118 height: childrenRect.height
119 }
120-
121- ThinDivider {
122- id: bottomDividerLine
123- anchors.bottom: parent.bottom
124- visible: showDivider
125- }
126-
127- Highlight {
128- anchors {
129- top: parent.top
130- left: parent.left
131- right: parent.right
132- bottom: bottomDividerLine.top
133- }
134- pressed: emptyListItem.selected
135- }
136 }
137 }
138
139=== modified file 'qml/Dash/GenericScopeView.qml'
140--- qml/Dash/GenericScopeView.qml 2014-10-06 15:54:18 +0000
141+++ qml/Dash/GenericScopeView.qml 2014-10-09 17:42:37 +0000
142@@ -210,10 +210,9 @@
143 }
144 }
145
146- delegate: ListItems.Base {
147+ delegate: DashCategoryBase {
148 id: baseItem
149 objectName: "dashCategory" + category
150- showDivider: false
151
152 property Item seeAllButton: seeAll
153
154
155=== modified file 'tests/autopilot/unity8/shell/emulators/dash.py'
156--- tests/autopilot/unity8/shell/emulators/dash.py 2014-10-06 08:02:57 +0000
157+++ tests/autopilot/unity8/shell/emulators/dash.py 2014-10-09 17:42:37 +0000
158@@ -206,7 +206,7 @@
159 def _get_category_element(self, category):
160 try:
161 return self.wait_select_single(
162- 'Base', objectName='dashCategory{}'.format(category))
163+ 'DashCategoryBase', objectName='dashCategory{}'.format(category))
164 except dbus.StateNotFoundError:
165 raise emulators.UnityEmulatorException(
166 'No category found with name {}'.format(category))

Subscribers

People subscribed via source and target branches