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 | 49 | row.resetCurrentItem(); | 49 | row.resetCurrentItem(); |
6 | 50 | } | 50 | } |
7 | 51 | row.setCurrentItemIndex(index); | 51 | row.setCurrentItemIndex(index); |
8 | 52 | d.alignIndicators(); | ||
9 | 52 | } | 53 | } |
10 | 53 | 54 | ||
11 | 54 | function addScrollOffset(scrollAmmout) { | 55 | function addScrollOffset(scrollAmmout) { |
12 | 55 | 56 | ||
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 | 140 | visible: !root.fullyClosed | 140 | visible: !root.fullyClosed |
18 | 141 | } | 141 | } |
19 | 142 | 142 | ||
20 | 143 | Keys.onPressed: { | ||
21 | 144 | if (event.key === Qt.Key_Left) { | ||
22 | 145 | bar.setCurrentItemIndex(bar.currentItemIndex - 1); | ||
23 | 146 | event.accepted = true; | ||
24 | 147 | } else if (event.key === Qt.Key_Right) { | ||
25 | 148 | bar.setCurrentItemIndex(bar.currentItemIndex + 1); | ||
26 | 149 | event.accepted = true; | ||
27 | 150 | } else if (event.key === Qt.Key_Escape) { | ||
28 | 151 | root.hide(); | ||
29 | 152 | event.accepted = true; | ||
30 | 153 | } | ||
31 | 154 | } | ||
32 | 155 | |||
33 | 143 | PanelBar { | 156 | PanelBar { |
34 | 144 | id: bar | 157 | id: bar |
35 | 145 | objectName: "indicatorsBar" | 158 | objectName: "indicatorsBar" |
36 | @@ -368,6 +381,7 @@ | |||
37 | 368 | State { | 381 | State { |
38 | 369 | name: "commit" | 382 | name: "commit" |
39 | 370 | extend: "locked" | 383 | extend: "locked" |
40 | 384 | PropertyChanges { target: root; focus: true } | ||
41 | 371 | PropertyChanges { target: bar; interactive: true } | 385 | PropertyChanges { target: bar; interactive: true } |
42 | 372 | PropertyChanges { | 386 | PropertyChanges { |
43 | 373 | target: d; | 387 | target: d; |
44 | 374 | 388 | ||
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 | 799 | tryCompare(appTitle, "visible", false, undefined, "App title should still be visible on mouse hover when panel decorations are visible"); | 799 | tryCompare(appTitle, "visible", false, undefined, "App title should still be visible on mouse hover when panel decorations are visible"); |
50 | 800 | tryCompare(appMenuBar, "visible", true, undefined, "App menu bar should be visible on mouse hover when panel decorations not visible"); | 800 | tryCompare(appMenuBar, "visible", true, undefined, "App menu bar should be visible on mouse hover when panel decorations not visible"); |
51 | 801 | } | 801 | } |
52 | 802 | |||
53 | 803 | function test_keyboardNavigation_data() { | ||
54 | 804 | return [ | ||
55 | 805 | {tag: "tab to start", doTab: false}, | ||
56 | 806 | {tag: "no tab to start", doTab: true} | ||
57 | 807 | ] | ||
58 | 808 | } | ||
59 | 809 | |||
60 | 810 | function test_keyboardNavigation(data) { | ||
61 | 811 | var indicatorsBar = findChild(panel.indicators, "indicatorsBar"); | ||
62 | 812 | |||
63 | 813 | pullDownIndicatorsMenu(); | ||
64 | 814 | |||
65 | 815 | indicatorsBar.setCurrentItemIndex(0); | ||
66 | 816 | |||
67 | 817 | if (data.doTab) { | ||
68 | 818 | keyClick(Qt.Key_Tab); | ||
69 | 819 | } | ||
70 | 820 | |||
71 | 821 | keyClick(Qt.Key_Right); | ||
72 | 822 | tryCompare(indicatorsBar, "currentItemIndex", 1); | ||
73 | 823 | |||
74 | 824 | keyClick(Qt.Key_Right); | ||
75 | 825 | tryCompare(indicatorsBar, "currentItemIndex", 2); | ||
76 | 826 | |||
77 | 827 | keyClick(Qt.Key_Left); | ||
78 | 828 | tryCompare(indicatorsBar, "currentItemIndex", 1); | ||
79 | 829 | |||
80 | 830 | keyClick(Qt.Key_Left); | ||
81 | 831 | tryCompare(indicatorsBar, "currentItemIndex", 0); | ||
82 | 832 | |||
83 | 833 | keyClick(Qt.Key_Escape); | ||
84 | 834 | tryCompare(panel.indicators, "fullyClosed", true); | ||
85 | 835 | } | ||
86 | 802 | } | 836 | } |
87 | 803 | } | 837 | } |
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:/