Merge lp:~aacid/unity8/indicator_keyboard_navigation into lp:unity8
- indicator_keyboard_navigation
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michael Zanetti |
Approved revision: | 2754 |
Merged at revision: | 2781 |
Proposed branch: | lp:~aacid/unity8/indicator_keyboard_navigation |
Merge into: | lp:unity8 |
Diff against target: |
87 lines (+49/-0) 3 files modified
qml/Panel/PanelBar.qml (+1/-0) qml/Panel/PanelMenu.qml (+14/-0) tests/qmltests/Panel/tst_Panel.qml (+34/-0) |
To merge this branch: | bzr merge lp:~aacid/unity8/indicator_keyboard_navigation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Approve | |
Michael Zanetti (community) | Approve | ||
Review via email: mp+314088@code.launchpad.net |
This proposal supersedes a proposal from 2016-12-21.
Commit message
Add keyboard navigation for Indicators
Esc closes
Left/Right selects prev/next indicator
Description of the change
* Are there any related MPs required for this MP to build/function as expected?
No
* 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
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2750
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 Zanetti (mzanetti) wrote : Posted in a previous version of this proposal | # |
In unity7, just clicking on an indicator and then left/right, will already move around. With this branch, after opening the indicators, another "tab" press is required before it starts working. That seems wrong.
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal | # |
> In unity7, just clicking on an indicator and then left/right, will already
> move around. With this branch, after opening the indicators, another "tab"
> press is required before it starts working. That seems wrong.
Should be fixed now.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2751
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 Zanetti (mzanetti) wrote : | # |
tested, works fine now (well, can't press "down" to move down in the indicators but we can do that in a future branch)
code looks fine to me.
ci is happy too
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2752
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: 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 : | # |
PASSED: Continuous integration, rev:2752
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 : | # |
FAILED: Continuous integration, rev:2753
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 : | # |
FAILED: Continuous integration, rev:2754
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2754
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:/
Preview Diff
1 | === modified file 'qml/Panel/PanelBar.qml' |
2 | --- qml/Panel/PanelBar.qml 2016-09-30 14:27:30 +0000 |
3 | +++ qml/Panel/PanelBar.qml 2017-01-16 11:01:31 +0000 |
4 | @@ -49,6 +49,7 @@ |
5 | row.resetCurrentItem(); |
6 | } |
7 | row.setCurrentItemIndex(index); |
8 | + d.alignIndicators(); |
9 | } |
10 | |
11 | function addScrollOffset(scrollAmmout) { |
12 | |
13 | === modified file 'qml/Panel/PanelMenu.qml' |
14 | --- qml/Panel/PanelMenu.qml 2016-12-22 14:55:39 +0000 |
15 | +++ qml/Panel/PanelMenu.qml 2017-01-16 11:01:31 +0000 |
16 | @@ -140,6 +140,19 @@ |
17 | visible: !root.fullyClosed |
18 | } |
19 | |
20 | + Keys.onPressed: { |
21 | + if (event.key === Qt.Key_Left) { |
22 | + bar.setCurrentItemIndex(bar.currentItemIndex - 1); |
23 | + event.accepted = true; |
24 | + } else if (event.key === Qt.Key_Right) { |
25 | + bar.setCurrentItemIndex(bar.currentItemIndex + 1); |
26 | + event.accepted = true; |
27 | + } else if (event.key === Qt.Key_Escape) { |
28 | + root.hide(); |
29 | + event.accepted = true; |
30 | + } |
31 | + } |
32 | + |
33 | PanelBar { |
34 | id: bar |
35 | objectName: "indicatorsBar" |
36 | @@ -368,6 +381,7 @@ |
37 | State { |
38 | name: "commit" |
39 | extend: "locked" |
40 | + PropertyChanges { target: root; focus: true } |
41 | PropertyChanges { target: bar; interactive: true } |
42 | PropertyChanges { |
43 | target: d; |
44 | |
45 | === modified file 'tests/qmltests/Panel/tst_Panel.qml' |
46 | --- tests/qmltests/Panel/tst_Panel.qml 2017-01-10 13:50:27 +0000 |
47 | +++ tests/qmltests/Panel/tst_Panel.qml 2017-01-16 11:01:31 +0000 |
48 | @@ -799,5 +799,39 @@ |
49 | tryCompare(appTitle, "visible", false, undefined, "App title should still be visible on mouse hover when panel decorations are visible"); |
50 | tryCompare(appMenuBar, "visible", true, undefined, "App menu bar should be visible on mouse hover when panel decorations not visible"); |
51 | } |
52 | + |
53 | + function test_keyboardNavigation_data() { |
54 | + return [ |
55 | + {tag: "tab to start", doTab: false}, |
56 | + {tag: "no tab to start", doTab: true} |
57 | + ] |
58 | + } |
59 | + |
60 | + function test_keyboardNavigation(data) { |
61 | + var indicatorsBar = findChild(panel.indicators, "indicatorsBar"); |
62 | + |
63 | + pullDownIndicatorsMenu(); |
64 | + |
65 | + indicatorsBar.setCurrentItemIndex(0); |
66 | + |
67 | + if (data.doTab) { |
68 | + keyClick(Qt.Key_Tab); |
69 | + } |
70 | + |
71 | + keyClick(Qt.Key_Right); |
72 | + tryCompare(indicatorsBar, "currentItemIndex", 1); |
73 | + |
74 | + keyClick(Qt.Key_Right); |
75 | + tryCompare(indicatorsBar, "currentItemIndex", 2); |
76 | + |
77 | + keyClick(Qt.Key_Left); |
78 | + tryCompare(indicatorsBar, "currentItemIndex", 1); |
79 | + |
80 | + keyClick(Qt.Key_Left); |
81 | + tryCompare(indicatorsBar, "currentItemIndex", 0); |
82 | + |
83 | + keyClick(Qt.Key_Escape); |
84 | + tryCompare(panel.indicators, "fullyClosed", true); |
85 | + } |
86 | } |
87 | } |
PASSED: Continuous integration, rev:2749 /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/2761/ /unity8- jenkins. ubuntu. com/job/ build/3619 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= xenial+ overlay, testname= qmluitests. sh/2070 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= zesty,testname= qmluitests. sh/2070 /unity8- jenkins. ubuntu. com/job/ build-0- fetch/3647 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 3493 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 3493/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/3493 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/3493/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 3493 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 3493/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/3493 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/3493/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 3493 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 3493/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/3493 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/3493/ artifact/ output/ *zip*/output. zip
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: /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/2761/ rebuild
https:/