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
=== removed file 'qml/Components/ListItems/Highlight.qml'
--- qml/Components/ListItems/Highlight.qml 2013-06-05 22:03:08 +0000
+++ qml/Components/ListItems/Highlight.qml 1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18
19Rectangle {
20 id: highlight
21
22 property bool pressed: false
23 property real pressedOpacity: 0.3
24
25 color: "black"
26 opacity: 0
27 state: pressed ? "pressed" : ""
28 states: [
29 State {
30 name: "pressed"
31 PropertyChanges { target: highlight; opacity: pressedOpacity}
32 }
33 ]
34 transitions: [
35 Transition {
36 from: ""
37 to: "pressed"
38 NumberAnimation { target: highlight; property: "opacity"; duration: 50}
39 },
40 Transition {
41 from: "pressed"
42 to: ""
43 NumberAnimation { target: highlight; property: "opacity"; duration: 100}
44 }
45 ]
46}
470
=== renamed file 'qml/Components/ListItems/Base.qml' => 'qml/Dash/DashCategoryBase.qml'
--- qml/Components/ListItems/Base.qml 2014-10-03 11:39:18 +0000
+++ qml/Dash/DashCategoryBase.qml 2014-10-09 17:42:37 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2012 Canonical, Ltd.2 * Copyright (C) 2012-2014 Canonical, Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by5 * it under the terms of the GNU General Public License as published by
@@ -18,46 +18,8 @@
18import Ubuntu.Components 0.118import Ubuntu.Components 0.1
1919
20Item {20Item {
21 id: emptyListItem21 width: parent.width
22 width: parent ? parent.width : units.gu(31)22 height: body.height
23 height: body.height + bottomDividerLine.height
24
25 /*!
26 \preliminary
27 Specifies whether the list item is selected.
28 */
29 property bool selected: false
30
31 /*!
32 \preliminary
33 Set to show or hide the thin bottom divider line (drawn by the \l ThinDivider component).
34 This line is shown by default except in cases where this item is the delegate of a ListView.
35 */
36 property bool showDivider: __showDivider()
37
38 /*!
39 \internal
40 Method to automatically determine if the bottom divider line should be drawn.
41 This always returns true, unless item is a delegate in a ListView. If in a ListView
42 it will return false only when:
43 + if this is the final item in the list, and ListView.footer is set (again as thin
44 divider line won't look well with footer below it)
45 */
46 function __showDivider() {
47 // if we're not in ListView, always show a thin dividing line at the bottom
48 var model = null;
49 if (typeof ListViewWithPageHeader !== 'undefined') {
50 if (typeof ListViewWithPageHeader.model !== 'undefined') {
51 model = ListViewWithPageHeader.model;
52 }
53 } else if (ListView.view !== null) {
54 model = ListView.view.model;
55 }
56 // if we're last item in ListView don't show divider
57 if (model && index === model.count - 1) return false;
58
59 return true;
60 }
6123
62 /* Relevant really only for ListViewWithPageHeader case: specify how many pixels we can overlap with the section header */24 /* Relevant really only for ListViewWithPageHeader case: specify how many pixels we can overlap with the section header */
63 readonly property int allowedOverlap: units.dp(1)25 readonly property int allowedOverlap: units.dp(1)
@@ -92,25 +54,9 @@
92 anchors {54 anchors {
93 left: parent.left55 left: parent.left
94 right: parent.right56 right: parent.right
95 bottom: bottomDividerLine.top57 bottom: parent.bottom
96 }58 }
97 height: childrenRect.height59 height: childrenRect.height
98 }60 }
99
100 ThinDivider {
101 id: bottomDividerLine
102 anchors.bottom: parent.bottom
103 visible: showDivider
104 }
105
106 Highlight {
107 anchors {
108 top: parent.top
109 left: parent.left
110 right: parent.right
111 bottom: bottomDividerLine.top
112 }
113 pressed: emptyListItem.selected
114 }
115 }61 }
116}62}
11763
=== modified file 'qml/Dash/GenericScopeView.qml'
--- qml/Dash/GenericScopeView.qml 2014-10-06 15:54:18 +0000
+++ qml/Dash/GenericScopeView.qml 2014-10-09 17:42:37 +0000
@@ -210,10 +210,9 @@
210 }210 }
211 }211 }
212212
213 delegate: ListItems.Base {213 delegate: DashCategoryBase {
214 id: baseItem214 id: baseItem
215 objectName: "dashCategory" + category215 objectName: "dashCategory" + category
216 showDivider: false
217216
218 property Item seeAllButton: seeAll217 property Item seeAllButton: seeAll
219218
220219
=== modified file 'tests/autopilot/unity8/shell/emulators/dash.py'
--- tests/autopilot/unity8/shell/emulators/dash.py 2014-10-06 08:02:57 +0000
+++ tests/autopilot/unity8/shell/emulators/dash.py 2014-10-09 17:42:37 +0000
@@ -206,7 +206,7 @@
206 def _get_category_element(self, category):206 def _get_category_element(self, category):
207 try:207 try:
208 return self.wait_select_single(208 return self.wait_select_single(
209 'Base', objectName='dashCategory{}'.format(category))209 'DashCategoryBase', objectName='dashCategory{}'.format(category))
210 except dbus.StateNotFoundError:210 except dbus.StateNotFoundError:
211 raise emulators.UnityEmulatorException(211 raise emulators.UnityEmulatorException(
212 'No category found with name {}'.format(category))212 'No category found with name {}'.format(category))

Subscribers

People subscribed via source and target branches