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
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

Subscribers

People subscribed via source and target branches