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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Terry
Approved revision: 1086
Merged at revision: 1118
Proposed branch: lp:~aacid/unity8/dashSepartmentsListTweaks
Merge into: lp:unity8
Diff against target: 94 lines (+14/-2)
4 files modified
qml/Dash/DashContent.qml (+2/-1)
qml/Dash/DashDepartments.qml (+8/-1)
qml/Dash/DashDepartmentsList.qml (+1/-0)
qml/Dash/GenericScopeView.qml (+3/-0)
To merge this branch: bzr merge lp:~aacid/unity8/dashSepartmentsListTweaks
Reviewer Review Type Date Requested Status
Michael Terry Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+228290@code.launchpad.net

Commit message

Dash Departments fixes

Update maxHeight manually since it depends on the position of the item and its parents and it can't know when the binding has to be updated
Make parent stuff non interactive when the department list is shown

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?
This is a change requested by design

To post a comment you must log in.
1082. By Albert Astals Cid

We are vertical flickable

1083. 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)
1084. By Albert Astals Cid

merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
1085. By Albert Astals Cid

Merge

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

LGTM

 * Did you perform an exploratory manual test run of the code change and any related functionality?
 - Yes. Can no longer swipe left or right to change scopes while the department list is up. And the list is a constant height.

 * Did CI run pass? If not, please explain why.
 - No, some qmluitests failed. The dash content one worked locally... Albert, do you suspect that's just a blip?

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote :

> * Did CI run pass? If not, please explain why.
> - No, some qmluitests failed. The dash content one worked locally...
> Albert, do you suspect that's just a blip?

testDash and testDashContent segfault randomly, if you loop them in your computer it should also happen (happens here), both with and without this patch, needs checking.

Revision history for this message
Michael Terry (mterry) wrote :

OK approved, thanks Albert!

review: Approve
1087. By Albert Astals Cid

Merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/DashContent.qml'
2--- qml/Dash/DashContent.qml 2014-07-24 23:31:44 +0000
3+++ qml/Dash/DashContent.qml 2014-08-05 18:01:29 +0000
4@@ -89,7 +89,7 @@
5 id: dashContentList
6 objectName: "dashContentList"
7
8- interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving
9+ interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving && !currentItem.departmentsShown
10
11 anchors.fill: parent
12 model: dashContent.model
13@@ -130,6 +130,7 @@
14 objectName: scope.id + " loader"
15
16 readonly property bool moving: item ? item.moving : false
17+ readonly property bool departmentsShown: item ? item.departmentsShown : false
18 readonly property var categoryView: item ? item.categoryView : null
19 readonly property var theScope: scope
20
21
22=== modified file 'qml/Dash/DashDepartments.qml'
23--- qml/Dash/DashDepartments.qml 2014-07-08 11:08:19 +0000
24+++ qml/Dash/DashDepartments.qml 2014-08-05 18:01:29 +0000
25@@ -39,6 +39,7 @@
26 height: visible ? units.gu(5) : 0
27
28 onClicked: {
29+ departmentListView.updateMaxHeight();
30 root.showList = !root.showList;
31 }
32
33@@ -111,7 +112,12 @@
34 right: parent.right
35 top: root.bottom
36 }
37- readonly property int maxHeight: (windowHeight - mapToItem(null, root.x, root.y).y) - units.gu(8)
38+ property int maxHeight: -1
39+ Component.onCompleted: updateMaxHeight();
40+ function updateMaxHeight()
41+ {
42+ maxHeight = (windowHeight - mapToItem(null, 0, 0).y) - units.gu(8);
43+ }
44 property int prevHeight: maxHeight
45 height: currentItem ? currentItem.height : maxHeight
46 onHeightChanged: {
47@@ -129,6 +135,7 @@
48 if (root.showList) {
49 if (department && department.loaded && x == departmentListView.contentX)
50 {
51+ departmentListView.updateMaxHeight();
52 return Math.min(implicitHeight, departmentListView.maxHeight);
53 } else {
54 return departmentListView.prevHeight;
55
56=== modified file 'qml/Dash/DashDepartmentsList.qml'
57--- qml/Dash/DashDepartmentsList.qml 2014-07-08 11:08:19 +0000
58+++ qml/Dash/DashDepartmentsList.qml 2014-08-05 18:01:29 +0000
59@@ -54,6 +54,7 @@
60
61 anchors.fill: parent
62
63+ flickableDirection: Flickable.VerticalFlick
64 contentHeight: column.height
65 contentWidth: width
66
67
68=== modified file 'qml/Dash/GenericScopeView.qml'
69--- qml/Dash/GenericScopeView.qml 2014-07-29 11:35:10 +0000
70+++ qml/Dash/GenericScopeView.qml 2014-08-05 18:01:29 +0000
71@@ -25,6 +25,7 @@
72 FocusScope {
73 id: scopeView
74
75+ readonly property alias departmentsShown: dashDepartments.showList
76 property var scope: null
77 property SortFilterProxyModel categories: categoryFilter
78 property bool isCurrent: false
79@@ -119,6 +120,7 @@
80 model: scopeView.categories
81 forceNoClip: previewListView.open
82 pixelAligned: true
83+ interactive: !dashDepartments.showList
84
85 property string expandedCategoryId: ""
86
87@@ -391,6 +393,7 @@
88 scopeStyle: scopeView.scopeStyle
89
90 bottomItem: DashDepartments {
91+ id: dashDepartments
92 scope: scopeView.scope
93 width: parent.width <= units.gu(60) ? parent.width : units.gu(40)
94 anchors.right: parent.right

Subscribers

People subscribed via source and target branches