Merge lp:~mterry/unity8/narrow-mouse-hack into lp:unity8

Proposed by Michael Terry
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2175
Merged at revision: 2250
Proposed branch: lp:~mterry/unity8/narrow-mouse-hack
Merge into: lp:unity8
Diff against target: 94 lines (+26/-4)
4 files modified
qml/Greeter/CoverPage.qml (+13/-2)
qml/Greeter/Infographics.qml (+2/-1)
qml/Greeter/NarrowView.qml (+2/-1)
tests/qmltests/Greeter/tst_NarrowView.qml (+9/-0)
To merge this branch: bzr merge lp:~mterry/unity8/narrow-mouse-hack
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Unity8 CI Bot continuous-integration Approve
Review via email: mp+284804@code.launchpad.net

Commit message

To let the user log in if a mouse is connected, hide the greeter cover page on a mouse click (but NOT a touch click).

Description of the change

This is just a short-term hack until design gives us a more mouse-friendly option for the greeter.

(While testing, I noticed that it was odd that the infographic didn't do anything when clicked if there was no data -- to the user, there is no feedback. So I turned off its double-click detector if there is no text.)

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 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?
 NA

 * If you changed the UI, has there been a design review?
 NA

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2173
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/258/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/258/rebuild

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

FAILED: Continuous integration, rev:2173
http://jenkins.qa.ubuntu.com/job/unity8-ci/7201/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6304
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/616/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1906
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/609
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1801
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1801
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/608
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/607
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4845
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6315
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6315/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27258
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/329/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/614
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/614/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27257

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Test?

lp:~mterry/unity8/narrow-mouse-hack updated
2174. By Michael Terry

Merge from trunk

2175. By Michael Terry

Add test

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

Great point, test added.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2175
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/405/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/547
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay/179
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial/179
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/570
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/588
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/588
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/584
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/584/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/584
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/584/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/584
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/584/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/584
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/584/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/584
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/584/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/584
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/584/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/405/rebuild

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

FAILED: Continuous integration, rev:2175
http://jenkins.qa.ubuntu.com/job/unity8-ci/7342/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6535
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/757/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/2047
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/750
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1942
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1942
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/749
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/748
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4989
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6546
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6546/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27712
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/397/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/755
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/755/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27711

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Works great, tested on my N4

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

Yes, modulo some AP woes

* Did you make sure that the branch does not contain spurious tags?

Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Greeter/CoverPage.qml'
2--- qml/Greeter/CoverPage.qml 2015-07-15 15:07:19 +0000
3+++ qml/Greeter/CoverPage.qml 2016-02-17 14:48:36 +0000
4@@ -1,5 +1,5 @@
5 /*
6- * Copyright (C) 2013,2014,2015 Canonical, Ltd.
7+ * Copyright (C) 2013-2016 Canonical, Ltd.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11@@ -34,6 +34,7 @@
12 readonly property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
13
14 signal tease()
15+ signal clicked()
16
17 function hideRight() {
18 d.forceRightOnNextHideAnimation = true;
19@@ -55,7 +56,17 @@
20 // instead, we can get a little extra horizontal push by using transforms.
21 transform: Translate { id: translation; x: root.draggable ? launcherOffset : 0 }
22
23- MouseArea { anchors.fill: parent; }
24+ // Eat events elsewhere on the coverpage, except mouse clicks which we pass
25+ // up (they are used in the NarrowView to hide the cover page)
26+ MouseArea {
27+ anchors.fill: parent
28+ onClicked: root.clicked()
29+
30+ MultiPointTouchArea {
31+ anchors.fill: parent
32+ mouseEnabled: false
33+ }
34+ }
35
36 Rectangle {
37 // In case background fails to load
38
39=== modified file 'qml/Greeter/Infographics.qml'
40--- qml/Greeter/Infographics.qml 2015-09-29 12:28:10 +0000
41+++ qml/Greeter/Infographics.qml 2016-02-17 14:48:36 +0000
42@@ -1,5 +1,5 @@
43 /*
44- * Copyright (C) 2013 Canonical, Ltd.
45+ * Copyright (C) 2013-2016 Canonical, Ltd.
46 *
47 * This program is free software; you can redistribute it and/or modify
48 * it under the terms of the GNU General Public License as published by
49@@ -402,6 +402,7 @@
50
51 MouseArea {
52 anchors.fill: dataCircle
53+ enabled: notification.text != ""
54
55 onDoubleClicked: {
56 if (!d.animating) {
57
58=== modified file 'qml/Greeter/NarrowView.qml'
59--- qml/Greeter/NarrowView.qml 2015-11-19 16:55:31 +0000
60+++ qml/Greeter/NarrowView.qml 2016-02-17 14:48:36 +0000
61@@ -1,5 +1,5 @@
62 /*
63- * Copyright (C) 2015 Canonical, Ltd.
64+ * Copyright (C) 2015-2016 Canonical, Ltd.
65 *
66 * This program is free software; you can redistribute it and/or modify
67 * it under the terms of the GNU General Public License as published by
68@@ -145,6 +145,7 @@
69 width: parent.width
70 background: root.background
71 onTease: root.tease()
72+ onClicked: hide()
73
74 onShowProgressChanged: {
75 if (showProgress === 1) {
76
77=== modified file 'tests/qmltests/Greeter/tst_NarrowView.qml'
78--- tests/qmltests/Greeter/tst_NarrowView.qml 2015-09-02 07:42:27 +0000
79+++ tests/qmltests/Greeter/tst_NarrowView.qml 2016-02-17 14:48:36 +0000
80@@ -518,5 +518,14 @@
81 tryCompare(coverPage, "shown", false);
82 tryCompare(coverPage, "showProgress", 0);
83 }
84+
85+ // Make sure that if user has a mouse, they can still get rid of cover page
86+ function test_mouseClickHidesCoverPage() {
87+ var coverPage = findChild(view, "coverPage");
88+
89+ verify(coverPage.shown);
90+ mouseClick(coverPage, coverPage.width/2, coverPage.height - units.gu(2));
91+ verify(!coverPage.shown);
92+ }
93 }
94 }

Subscribers

People subscribed via source and target branches