Merge lp:~lukas-kde/unity8/no-touchscreen-no-tutorial into lp:unity8
- no-touchscreen-no-tutorial
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michał Sawicz |
Approved revision: | 2809 |
Merged at revision: | 2850 |
Proposed branch: | lp:~lukas-kde/unity8/no-touchscreen-no-tutorial |
Merge into: | lp:unity8 |
Prerequisite: | lp:~lukas-kde/unity8/osk-indicator-switch |
Diff against target: |
93 lines (+19/-3) 6 files modified
qml/OrientedShell.qml (+1/-1) qml/Shell.qml (+3/-2) tests/qmltests/Tutorial/tst_Tutorial.qml (+1/-0) tests/qmltests/tst_OrientedShell.qml (+12/-0) tests/qmltests/tst_Shell.qml (+1/-0) tests/qmltests/tst_ShellWithPin.qml (+1/-0) |
To merge this branch: | bzr merge lp:~lukas-kde/unity8/no-touchscreen-no-tutorial |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michał Sawicz | Approve | ||
Unity8 CI Bot | continuous-integration | Approve | |
Michael Terry | Pending | ||
Review via email: mp+317877@code.launchpad.net |
This proposal supersedes a proposal from 2017-02-03.
Commit message
Disable the tutorial when there's no touchscreen
Description of the change
Disable the tutorial when there's no touchscreen
Otherwise it's inescapable and blocks input, fixes lp:1661557
* Are there any related MPs required for this MP to build/function as expected? Please list.
Yes, prereq
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
* If you changed the UI, has there been a design review?
N/A
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal | # |
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Yeah maybe... but that's a question for design first I assume. This MP is trying unblock the desktop and fix the bug, I didn't really think further.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2804
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Michael Terry (mterry) wrote : Posted in a previous version of this proposal | # |
We have tests that use the mouse right? Like push to right edge of screen on desktop mode of tutorial.
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal | # |
* Did you perform an exploratory manual test run of the code change and any related functionality?
Y
* Did CI run pass? If not, please explain why.
Not yet, but tested locally
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2805
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2806
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2807
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2807
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Fixed the tests
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2808
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2809
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Michał Sawicz (saviq) : | # |
Pete Woods (pete-woods) wrote : | # |
Sorry to nag in here, but it'd also be great if you could at least dismiss this with the escape key. Hitting escape/close is my natural reaction when any tutorial pops up on a desktop, at least, and I might want to do this on a device with a touch screen.
Preview Diff
1 | === modified file 'qml/OrientedShell.qml' |
2 | --- qml/OrientedShell.qml 2017-02-21 16:22:24 +0000 |
3 | +++ qml/OrientedShell.qml 2017-02-21 16:22:24 +0000 |
4 | @@ -274,7 +274,7 @@ |
5 | mode: applicationArguments.mode |
6 | hasMouse: pointerInputDevices > 0 |
7 | hasKeyboard: keyboardsModel.count > 0 |
8 | - |
9 | + hasTouchscreen: touchScreensModel.count > 0 |
10 | oskEnabled: unity8Settings.alwaysShowOsk || !hasKeyboard || forceOSKEnabled |
11 | |
12 | usageScenario: { |
13 | |
14 | === modified file 'qml/Shell.qml' |
15 | --- qml/Shell.qml 2017-02-21 16:22:24 +0000 |
16 | +++ qml/Shell.qml 2017-02-21 16:22:24 +0000 |
17 | @@ -69,6 +69,7 @@ |
18 | } |
19 | property bool hasMouse: false |
20 | property bool hasKeyboard: false |
21 | + property bool hasTouchscreen: false |
22 | |
23 | // to be read from outside |
24 | readonly property int mainAppWindowOrientationAngle: stage.mainAppWindowOrientationAngle |
25 | @@ -628,8 +629,8 @@ |
26 | objectName: "tutorial" |
27 | anchors.fill: parent |
28 | |
29 | - paused: callManager.hasCalls || !greeter || greeter.active || |
30 | - wizard.active |
31 | + paused: callManager.hasCalls || !greeter || greeter.active || wizard.active |
32 | + || !hasTouchscreen // TODO #1661557 something better for no touchscreen |
33 | delayed: dialogs.hasActiveDialog || notifications.hasNotification || |
34 | inputMethod.visible || |
35 | (launcher.shown && !launcher.lockedVisible) || |
36 | |
37 | === modified file 'tests/qmltests/Tutorial/tst_Tutorial.qml' |
38 | --- tests/qmltests/Tutorial/tst_Tutorial.qml 2017-02-13 13:46:22 +0000 |
39 | +++ tests/qmltests/Tutorial/tst_Tutorial.qml 2017-02-21 16:22:24 +0000 |
40 | @@ -149,6 +149,7 @@ |
41 | native_: shellLoader.nativeOrientation |
42 | primary: shellLoader.primaryOrientation |
43 | } |
44 | + hasTouchscreen: true |
45 | |
46 | Component.onDestruction: { |
47 | shellLoader.itemDestroyed = true; |
48 | |
49 | === modified file 'tests/qmltests/tst_OrientedShell.qml' |
50 | --- tests/qmltests/tst_OrientedShell.qml 2017-02-21 16:22:24 +0000 |
51 | +++ tests/qmltests/tst_OrientedShell.qml 2017-02-21 16:22:24 +0000 |
52 | @@ -1639,5 +1639,17 @@ |
53 | tryCompare(dialogLoader, "item", null); |
54 | compare(window.activeFocusItem, surfaceItem); |
55 | } |
56 | + |
57 | + function test_tutorialDisabledWithNoTouchscreen() { |
58 | + loadShell("desktop"); |
59 | + usageModeSelector.selectWindowed(); |
60 | + |
61 | + MockInputDeviceBackend.addMockDevice("/touchscreen", InputInfo.TouchScreen); |
62 | + var tutorial = findChild(shell, "tutorial"); |
63 | + tryCompare(tutorial, "paused", false); |
64 | + |
65 | + MockInputDeviceBackend.removeDevice("/touchscreen"); |
66 | + tryCompare(tutorial, "paused", true); |
67 | + } |
68 | } |
69 | } |
70 | |
71 | === modified file 'tests/qmltests/tst_Shell.qml' |
72 | --- tests/qmltests/tst_Shell.qml 2017-02-16 13:46:11 +0000 |
73 | +++ tests/qmltests/tst_Shell.qml 2017-02-21 16:22:24 +0000 |
74 | @@ -137,6 +137,7 @@ |
75 | primary: shellLoader.primaryOrientation |
76 | } |
77 | mode: shellLoader.mode |
78 | + hasTouchscreen: true |
79 | Component.onCompleted: { |
80 | ApplicationManager.startApplication("unity8-dash"); |
81 | } |
82 | |
83 | === modified file 'tests/qmltests/tst_ShellWithPin.qml' |
84 | --- tests/qmltests/tst_ShellWithPin.qml 2017-01-24 07:42:24 +0000 |
85 | +++ tests/qmltests/tst_ShellWithPin.qml 2017-02-21 16:22:24 +0000 |
86 | @@ -69,6 +69,7 @@ |
87 | property bool itemDestroyed: false |
88 | sourceComponent: Component { |
89 | Shell { |
90 | + hasTouchscreen: true |
91 | Component.onDestruction: { |
92 | shellLoader.itemDestroyed = true |
93 | } |
Shouldn't we, instead, make the tutorial work for all available input devices? Maybe even go through it again when we discover a new input device that we didn't yet go through the tutorial for?