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
=== modified file 'qml/Greeter/CoverPage.qml'
--- qml/Greeter/CoverPage.qml 2015-07-15 15:07:19 +0000
+++ qml/Greeter/CoverPage.qml 2016-02-17 14:48:36 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2013,2014,2015 Canonical, Ltd.2 * Copyright (C) 2013-2016 Canonical, Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by5 * it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@
34 readonly property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)34 readonly property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
3535
36 signal tease()36 signal tease()
37 signal clicked()
3738
38 function hideRight() {39 function hideRight() {
39 d.forceRightOnNextHideAnimation = true;40 d.forceRightOnNextHideAnimation = true;
@@ -55,7 +56,17 @@
55 // instead, we can get a little extra horizontal push by using transforms.56 // instead, we can get a little extra horizontal push by using transforms.
56 transform: Translate { id: translation; x: root.draggable ? launcherOffset : 0 }57 transform: Translate { id: translation; x: root.draggable ? launcherOffset : 0 }
5758
58 MouseArea { anchors.fill: parent; }59 // Eat events elsewhere on the coverpage, except mouse clicks which we pass
60 // up (they are used in the NarrowView to hide the cover page)
61 MouseArea {
62 anchors.fill: parent
63 onClicked: root.clicked()
64
65 MultiPointTouchArea {
66 anchors.fill: parent
67 mouseEnabled: false
68 }
69 }
5970
60 Rectangle {71 Rectangle {
61 // In case background fails to load72 // In case background fails to load
6273
=== modified file 'qml/Greeter/Infographics.qml'
--- qml/Greeter/Infographics.qml 2015-09-29 12:28:10 +0000
+++ qml/Greeter/Infographics.qml 2016-02-17 14:48:36 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2013 Canonical, Ltd.2 * Copyright (C) 2013-2016 Canonical, Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by5 * it under the terms of the GNU General Public License as published by
@@ -402,6 +402,7 @@
402402
403 MouseArea {403 MouseArea {
404 anchors.fill: dataCircle404 anchors.fill: dataCircle
405 enabled: notification.text != ""
405406
406 onDoubleClicked: {407 onDoubleClicked: {
407 if (!d.animating) {408 if (!d.animating) {
408409
=== modified file 'qml/Greeter/NarrowView.qml'
--- qml/Greeter/NarrowView.qml 2015-11-19 16:55:31 +0000
+++ qml/Greeter/NarrowView.qml 2016-02-17 14:48:36 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2015 Canonical, Ltd.2 * Copyright (C) 2015-2016 Canonical, Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by5 * it under the terms of the GNU General Public License as published by
@@ -145,6 +145,7 @@
145 width: parent.width145 width: parent.width
146 background: root.background146 background: root.background
147 onTease: root.tease()147 onTease: root.tease()
148 onClicked: hide()
148149
149 onShowProgressChanged: {150 onShowProgressChanged: {
150 if (showProgress === 1) {151 if (showProgress === 1) {
151152
=== modified file 'tests/qmltests/Greeter/tst_NarrowView.qml'
--- tests/qmltests/Greeter/tst_NarrowView.qml 2015-09-02 07:42:27 +0000
+++ tests/qmltests/Greeter/tst_NarrowView.qml 2016-02-17 14:48:36 +0000
@@ -518,5 +518,14 @@
518 tryCompare(coverPage, "shown", false);518 tryCompare(coverPage, "shown", false);
519 tryCompare(coverPage, "showProgress", 0);519 tryCompare(coverPage, "showProgress", 0);
520 }520 }
521
522 // Make sure that if user has a mouse, they can still get rid of cover page
523 function test_mouseClickHidesCoverPage() {
524 var coverPage = findChild(view, "coverPage");
525
526 verify(coverPage.shown);
527 mouseClick(coverPage, coverPage.width/2, coverPage.height - units.gu(2));
528 verify(!coverPage.shown);
529 }
521 }530 }
522}531}

Subscribers

People subscribed via source and target branches