Merge lp:~nick-dedekind/unity8/indicator.redrag into lp:unity8

Proposed by Nick Dedekind
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
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.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:327
http://jenkins.qa.ubuntu.com/job/unity8-ci/1055/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy/3735
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/1263
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-saucy/1780
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-amd64-ci/79
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1056
        deb: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1056/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-i386-ci/1055
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-saucy/81
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3747
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3747/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1265
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1265/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/1057
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/1069

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

This not ready?

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
Michał Sawicz (saviq) wrote :

Yup, looks nice!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:329
http://jenkins.qa.ubuntu.com/job/unity8-ci/1403/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy/5004
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/2921
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-saucy/2270
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-amd64-ci/426
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1403
        deb: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1403/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-i386-ci/1402
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-saucy/1174
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-amd64/879
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-amd64/879/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/2923
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/2923/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2431
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2474

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/unity8-ci/1403/rebuild

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

FAILED: Continuous integration, rev:330
http://jenkins.qa.ubuntu.com/job/unity8-ci/1410/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy/5014
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/2938
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-saucy/2277
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-amd64-ci/433
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1410
        deb: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1410/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-i386-ci/1409
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-saucy/1183
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-amd64/889
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-amd64/889/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/2940
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/2940/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2447
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2490

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/unity8-ci/1410/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

Design have given this the OK now.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

tests missing. Should we unapprove before jenkins comes back to life?

review: Needs Information
Revision history for this message
Michał Sawicz (saviq) wrote :

Yeah, let's add QML tests for this, please.

review: Needs Fixing
Revision history for this message
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.

review: Needs Fixing
331. By Nick Dedekind

Added test for redrag indicator.

Revision history for this message
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.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:331
http://jenkins.qa.ubuntu.com/job/unity8-ci/1590/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/527/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/515/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/156
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/114
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/114
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/114/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/114
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/486/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/527
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/527/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/515
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/515/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3166/console
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/1146

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/unity8-ci/1590/rebuild

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

PASSED: Continuous integration, rev:331
http://jenkins.qa.ubuntu.com/job/unity8-ci/1593/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/552
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/540
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/159
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/117
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/117
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/117/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/117
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/509
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/552
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/552/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/540
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/540/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/3007
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3189
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/1198
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/1196

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/unity8-ci/1593/rebuild

review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Yay!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Panel/Indicators.qml'
--- Panel/Indicators.qml 2013-10-09 16:36:05 +0000
+++ Panel/Indicators.qml 2013-11-06 14:24:39 +0000
@@ -38,6 +38,7 @@
38 property bool partiallyOpened: height > panelHeight && !fullyOpened38 property bool partiallyOpened: height > panelHeight && !fullyOpened
39 property real visualBottom: Math.max(y+height, y+indicatorRow.y+indicatorRow.height)39 property real visualBottom: Math.max(y+height, y+indicatorRow.y+indicatorRow.height)
40 property bool contentEnabled: true40 property bool contentEnabled: true
41 property bool initalizeItem: true
41 readonly property alias content: menuContent42 readonly property alias content: menuContent
4243
43 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to44 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
@@ -64,14 +65,13 @@
64 }65 }
6566
66 height: panelHeight67 height: panelHeight
68 onHeightChanged: updateRevealProgressState(indicators.height - panelHeight, true)
6769
68 onHeightChanged: {70 function updateRevealProgressState(revealProgress, enableRelease) {
69 // need to use handle.get_height(). As the handle height depends on indicators.height changes (but this is called first!)
70 var revealProgress = indicators.height - panelHeight
71 if (!showAnimation.running && !hideAnimation.running) {71 if (!showAnimation.running && !hideAnimation.running) {
72 if (revealProgress == 0) {72 if (revealProgress === 0) {
73 indicators.state = "initial";73 indicators.state = "initial";
74 } else if (revealProgress <= hintValue) {74 } else if (revealProgress > 0 && revealProgress <= hintValue) {
75 indicators.state = "hint";75 indicators.state = "hint";
76 } else if (revealProgress > hintValue && revealProgress < lockThreshold) {76 } else if (revealProgress > hintValue && revealProgress < lockThreshold) {
77 indicators.state = "reveal";77 indicators.state = "reveal";
@@ -80,7 +80,7 @@
80 }80 }
81 }81 }
8282
83 if (revealProgress == 0) {83 if (enableRelease && revealProgress === 0) {
84 menuContent.releaseContent();84 menuContent.releaseContent();
85 }85 }
86 }86 }
@@ -107,7 +107,7 @@
107 Vertical velocity check. Don't change the indicator if we're moving too quickly.107 Vertical velocity check. Don't change the indicator if we're moving too quickly.
108 */108 */
109 var verticalSpeed = Math.abs(yVelocityCalculator.calculate());109 var verticalSpeed = Math.abs(yVelocityCalculator.calculate());
110 if (verticalSpeed >= 0.05 && indicatorRow.currentItem!=null) {110 if (verticalSpeed >= 0.05 && !initalizeItem) {
111 return;111 return;
112 }112 }
113113
@@ -147,6 +147,7 @@
147 } else if (!currentItem) {147 } else if (!currentItem) {
148 indicatorRow.setDefaultItem();148 indicatorRow.setDefaultItem();
149 }149 }
150 initalizeItem = indicatorRow.currentItem == null;
150 }151 }
151152
152 // eater153 // eater
@@ -282,6 +283,33 @@
282 enableIndexChangeSignal = oldActive;283 enableIndexChangeSignal = oldActive;
283 }284 }
284 }285 }
286
287 EdgeDragArea {
288 id: rowDragArea
289 anchors.fill: indicatorRow
290 direction: Direction.Downwards
291 maxSilenceTime: 2000
292 distanceThreshold: 0
293
294 enabled: fullyOpened
295 onDraggingChanged: {
296 if (dragging) {
297 initalizeItem = true;
298 updateRevealProgressState(Math.max(touchSceneY - panelHeight, hintValue), false);
299 indicators.calculateCurrentItem(touchX, false);
300 } else {
301 indicators.state = "commit";
302 }
303 }
304
305 onTouchXChanged: {
306 indicators.calculateCurrentItem(touchX, true);
307 }
308 onTouchSceneYChanged: {
309 updateRevealProgressState(Math.max(touchSceneY - panelHeight, hintValue), false);
310 yVelocityCalculator.trackedPosition = touchSceneY;
311 }
312 }
285 }313 }
286314
287 Connections {315 Connections {
@@ -298,7 +326,7 @@
298 onRunningChanged: {326 onRunningChanged: {
299 if (hideAnimation.running) {327 if (hideAnimation.running) {
300 indicators.state = "initial";328 indicators.state = "initial";
301 indicatorRow.currentItem = null;329 initalizeItem = true;
302 }330 }
303 }331 }
304 }332 }
305333
=== modified file 'tests/qmltests/Panel/tst_Panel.qml'
--- tests/qmltests/Panel/tst_Panel.qml 2013-08-22 18:37:09 +0000
+++ tests/qmltests/Panel/tst_Panel.qml 2013-11-06 14:24:39 +0000
@@ -48,9 +48,12 @@
4848
49 function get_window_data() {49 function get_window_data() {
50 return [50 return [
51 {tag: "pinned", fullscreenFlag: false },51 {tag: "pinned", fullscreenFlag: false, alreadyOpen: false },
52 {tag: "fullscreen", fullscreenFlag: true }52 {tag: "fullscreen", fullscreenFlag: true, alreadyOpen: false },
53 ]}53 {tag: "pinned-alreadyOpen", fullscreenFlag: false, alreadyOpen: true },
54 {tag: "fullscreen-alreadyOpen", fullscreenFlag: true, alreadyOpen: true }
55 ];
56 }
5457
5558
56 function init() {59 function init() {
@@ -135,6 +138,10 @@
135 // expose more of the panel, binding it to the selected indicator and opening it's menu.138 // expose more of the panel, binding it to the selected indicator and opening it's menu.
136 function test_drag_show(data) {139 function test_drag_show(data) {
137 panel.fullscreenMode = data.fullscreenFlag;140 panel.fullscreenMode = data.fullscreenFlag;
141 if (data.alreadyOpen) {
142 panel.indicators.show();
143 tryCompare(panel.indicators, "fullyOpened", true);
144 }
138145
139 var indicatorRow = findChild(panel.indicators, "indicatorRow");146 var indicatorRow = findChild(panel.indicators, "indicatorRow");
140 verify(indicatorRow != undefined);147 verify(indicatorRow != undefined);
@@ -186,7 +193,9 @@
186 compare(menuContent.currentMenuIndex, i, "Menu conetent should be enabled for item at position " + i);193 compare(menuContent.currentMenuIndex, i, "Menu conetent should be enabled for item at position " + i);
187194
188 // init for next indicatorItem195 // init for next indicatorItem
189 init();196 if (!data.alreadyOpen) {
197 init();
198 }
190 }199 }
191 }200 }
192201

Subscribers

People subscribed via source and target branches