Merge lp:~nick-dedekind/unity8/indicator.redrag into lp:unity8
- indicator.redrag
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michał Sawicz |
Approved revision: | 331 |
Merged at revision: | 529 |
Proposed branch: | lp:~nick-dedekind/unity8/indicator.redrag |
Merge into: | lp:unity8 |
Diff against target: |
140 lines (+49/-12) 2 files modified
Panel/Indicators.qml (+36/-8) tests/qmltests/Panel/tst_Panel.qml (+13/-4) |
To merge this branch: | bzr merge lp:~nick-dedekind/unity8/indicator.redrag |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michał Sawicz | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Michael Zanetti (community) | Needs Fixing | ||
Review via email: mp+186740@code.launchpad.net |
Commit message
Indicator re-select by dragging from top when fully opened.
Description of the change
Indicator re-select by dragging from top when fully opened.
PS Jenkins bot (ps-jenkins) wrote : | # |
Michał Sawicz (saviq) wrote : | # |
This not ready?
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:328
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
UNSTABLE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:329
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:329
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:330
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
Nick Dedekind (nick-dedekind) wrote : | # |
Design have given this the OK now.
Michael Zanetti (mzanetti) wrote : | # |
tests missing. Should we unapprove before jenkins comes back to life?
Michał Sawicz (saviq) wrote : | # |
Yeah, let's add QML tests for this, please.
Michael Zanetti (mzanetti) wrote : | # |
After talking to Saviq on irc we agreed that tests for this should be fairly easy to add and we should do it rather now than later. Changing my vote to needs fixing and putting back to needs review.
- 331. By Nick Dedekind
-
Added test for redrag indicator.
Nick Dedekind (nick-dedekind) wrote : | # |
> After talking to Saviq on irc we agreed that tests for this should be fairly
> easy to add and we should do it rather now than later. Changing my vote to
> needs fixing and putting back to needs review.
Test added.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:331
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:331
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'Panel/Indicators.qml' |
2 | --- Panel/Indicators.qml 2013-10-09 16:36:05 +0000 |
3 | +++ Panel/Indicators.qml 2013-11-06 14:24:39 +0000 |
4 | @@ -38,6 +38,7 @@ |
5 | property bool partiallyOpened: height > panelHeight && !fullyOpened |
6 | property real visualBottom: Math.max(y+height, y+indicatorRow.y+indicatorRow.height) |
7 | property bool contentEnabled: true |
8 | + property bool initalizeItem: true |
9 | readonly property alias content: menuContent |
10 | |
11 | // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to |
12 | @@ -64,14 +65,13 @@ |
13 | } |
14 | |
15 | height: panelHeight |
16 | + onHeightChanged: updateRevealProgressState(indicators.height - panelHeight, true) |
17 | |
18 | - onHeightChanged: { |
19 | - // need to use handle.get_height(). As the handle height depends on indicators.height changes (but this is called first!) |
20 | - var revealProgress = indicators.height - panelHeight |
21 | + function updateRevealProgressState(revealProgress, enableRelease) { |
22 | if (!showAnimation.running && !hideAnimation.running) { |
23 | - if (revealProgress == 0) { |
24 | + if (revealProgress === 0) { |
25 | indicators.state = "initial"; |
26 | - } else if (revealProgress <= hintValue) { |
27 | + } else if (revealProgress > 0 && revealProgress <= hintValue) { |
28 | indicators.state = "hint"; |
29 | } else if (revealProgress > hintValue && revealProgress < lockThreshold) { |
30 | indicators.state = "reveal"; |
31 | @@ -80,7 +80,7 @@ |
32 | } |
33 | } |
34 | |
35 | - if (revealProgress == 0) { |
36 | + if (enableRelease && revealProgress === 0) { |
37 | menuContent.releaseContent(); |
38 | } |
39 | } |
40 | @@ -107,7 +107,7 @@ |
41 | Vertical velocity check. Don't change the indicator if we're moving too quickly. |
42 | */ |
43 | var verticalSpeed = Math.abs(yVelocityCalculator.calculate()); |
44 | - if (verticalSpeed >= 0.05 && indicatorRow.currentItem!=null) { |
45 | + if (verticalSpeed >= 0.05 && !initalizeItem) { |
46 | return; |
47 | } |
48 | |
49 | @@ -147,6 +147,7 @@ |
50 | } else if (!currentItem) { |
51 | indicatorRow.setDefaultItem(); |
52 | } |
53 | + initalizeItem = indicatorRow.currentItem == null; |
54 | } |
55 | |
56 | // eater |
57 | @@ -282,6 +283,33 @@ |
58 | enableIndexChangeSignal = oldActive; |
59 | } |
60 | } |
61 | + |
62 | + EdgeDragArea { |
63 | + id: rowDragArea |
64 | + anchors.fill: indicatorRow |
65 | + direction: Direction.Downwards |
66 | + maxSilenceTime: 2000 |
67 | + distanceThreshold: 0 |
68 | + |
69 | + enabled: fullyOpened |
70 | + onDraggingChanged: { |
71 | + if (dragging) { |
72 | + initalizeItem = true; |
73 | + updateRevealProgressState(Math.max(touchSceneY - panelHeight, hintValue), false); |
74 | + indicators.calculateCurrentItem(touchX, false); |
75 | + } else { |
76 | + indicators.state = "commit"; |
77 | + } |
78 | + } |
79 | + |
80 | + onTouchXChanged: { |
81 | + indicators.calculateCurrentItem(touchX, true); |
82 | + } |
83 | + onTouchSceneYChanged: { |
84 | + updateRevealProgressState(Math.max(touchSceneY - panelHeight, hintValue), false); |
85 | + yVelocityCalculator.trackedPosition = touchSceneY; |
86 | + } |
87 | + } |
88 | } |
89 | |
90 | Connections { |
91 | @@ -298,7 +326,7 @@ |
92 | onRunningChanged: { |
93 | if (hideAnimation.running) { |
94 | indicators.state = "initial"; |
95 | - indicatorRow.currentItem = null; |
96 | + initalizeItem = true; |
97 | } |
98 | } |
99 | } |
100 | |
101 | === modified file 'tests/qmltests/Panel/tst_Panel.qml' |
102 | --- tests/qmltests/Panel/tst_Panel.qml 2013-08-22 18:37:09 +0000 |
103 | +++ tests/qmltests/Panel/tst_Panel.qml 2013-11-06 14:24:39 +0000 |
104 | @@ -48,9 +48,12 @@ |
105 | |
106 | function get_window_data() { |
107 | return [ |
108 | - {tag: "pinned", fullscreenFlag: false }, |
109 | - {tag: "fullscreen", fullscreenFlag: true } |
110 | - ]} |
111 | + {tag: "pinned", fullscreenFlag: false, alreadyOpen: false }, |
112 | + {tag: "fullscreen", fullscreenFlag: true, alreadyOpen: false }, |
113 | + {tag: "pinned-alreadyOpen", fullscreenFlag: false, alreadyOpen: true }, |
114 | + {tag: "fullscreen-alreadyOpen", fullscreenFlag: true, alreadyOpen: true } |
115 | + ]; |
116 | + } |
117 | |
118 | |
119 | function init() { |
120 | @@ -135,6 +138,10 @@ |
121 | // expose more of the panel, binding it to the selected indicator and opening it's menu. |
122 | function test_drag_show(data) { |
123 | panel.fullscreenMode = data.fullscreenFlag; |
124 | + if (data.alreadyOpen) { |
125 | + panel.indicators.show(); |
126 | + tryCompare(panel.indicators, "fullyOpened", true); |
127 | + } |
128 | |
129 | var indicatorRow = findChild(panel.indicators, "indicatorRow"); |
130 | verify(indicatorRow != undefined); |
131 | @@ -186,7 +193,9 @@ |
132 | compare(menuContent.currentMenuIndex, i, "Menu conetent should be enabled for item at position " + i); |
133 | |
134 | // init for next indicatorItem |
135 | - init(); |
136 | + if (!data.alreadyOpen) { |
137 | + init(); |
138 | + } |
139 | } |
140 | } |
141 |
FAILED: Continuous integration, rev:327 jenkins. qa.ubuntu. com/job/ unity8- ci/1055/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- saucy/3735 jenkins. qa.ubuntu. com/job/ generic- mediumtests- touch/1263 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- saucy/1780 jenkins. qa.ubuntu. com/job/ unity8- saucy-amd64- ci/79 jenkins. qa.ubuntu. com/job/ unity8- saucy-armhf- ci/1056 jenkins. qa.ubuntu. com/job/ unity8- saucy-armhf- ci/1056/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- saucy-i386- ci/1055 jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-saucy/ 81 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-i386/ 3747 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-i386/ 3747/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-armhf/ 1265 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-armhf/ 1265/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- maguro/ 1057 jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- mako/1069
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ unity8- ci/1055/ rebuild
http://