Merge lp:~aacid/unity8/indicator_keyboard_navigation into lp:unity8

Proposed by Albert Astals Cid
Status: Superseded
Proposed branch: lp:~aacid/unity8/indicator_keyboard_navigation
Merge into: lp:unity8
Prerequisite: lp:~ci-train-bot/unity8/unity8-ubuntu-zesty-2160
Diff against target: 213 lines (+91/-0) (has conflicts)
7 files modified
po/ast.po (+11/-0)
po/fr.po (+11/-0)
po/gl.po (+10/-0)
po/ms.po (+10/-0)
qml/Panel/IndicatorsBar.qml (+1/-0)
qml/Panel/IndicatorsMenu.qml (+14/-0)
tests/qmltests/Panel/tst_IndicatorsMenu.qml (+34/-0)
Text conflict in po/ast.po
Text conflict in po/fr.po
Text conflict in po/gl.po
Text conflict in po/ms.po
To merge this branch: bzr merge lp:~aacid/unity8/indicator_keyboard_navigation
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Michael Zanetti (community) Needs Fixing
Review via email: mp+313711@code.launchpad.net

This proposal has been superseded by a proposal from 2017-01-04.

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

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

PASSED: Continuous integration, rev:2749
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2761/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3619
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2070
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2070
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3647
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3493
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3493/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3493
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3493/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3493
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3493/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3493
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3493/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3493
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3493/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3493
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3493/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
2750. By Albert Astals Cid

Test left/right/esc keyboard navigation in indicators

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

PASSED: Continuous integration, rev:2750
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2768/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3626
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2073
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2073
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3654
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3500
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3500/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3500
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3500/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3500
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3500/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3500
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3500/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3500
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3500/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3500
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3500/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

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.

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

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

2751. By Albert Astals Cid

Make the indicators left/right work just after opening indicators too

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

PASSED: Continuous integration, rev:2751
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2813/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3680
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2111
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2111
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3708
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3552
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3552/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3552
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3552/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3552
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3552/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3552
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3552/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3552
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3552/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3552
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3552/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
2752. By Albert Astals Cid

Merge

2753. By Albert Astals Cid

Merge

2754. By Albert Astals Cid

Move test around

Unmerged revisions

2747. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

2746. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

2745. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/ast.po'
2--- po/ast.po 2016-12-23 05:00:28 +0000
3+++ po/ast.po 2017-01-04 12:10:40 +0000
4@@ -7,16 +7,27 @@
5 msgstr ""
6 "Project-Id-Version: unity8\n"
7 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
8+<<<<<<< TREE
9 "POT-Creation-Date: 2016-12-15 16:17+0000\n"
10 "PO-Revision-Date: 2016-12-16 02:13+0000\n"
11 "Last-Translator: enolp <enolp@softastur.org>\n"
12+=======
13+"POT-Creation-Date: 2016-12-07 13:49+0000\n"
14+"PO-Revision-Date: 2016-12-16 02:13+0000\n"
15+"Last-Translator: enolp <enolp@softastur.org>\n"
16+>>>>>>> MERGE-SOURCE
17 "Language-Team: Asturian <ast@li.org>\n"
18 "MIME-Version: 1.0\n"
19 "Content-Type: text/plain; charset=UTF-8\n"
20 "Content-Transfer-Encoding: 8bit\n"
21 "Plural-Forms: nplurals=2; plural=n != 1;\n"
22+<<<<<<< TREE
23 "X-Launchpad-Export-Date: 2016-12-23 04:58+0000\n"
24 "X-Generator: Launchpad (build 18298)\n"
25+=======
26+"X-Launchpad-Export-Date: 2016-12-17 05:27+0000\n"
27+"X-Generator: Launchpad (build 18298)\n"
28+>>>>>>> MERGE-SOURCE
29
30 #: plugins/LightDM/Greeter.cpp:123
31 msgid "Password: "
32
33=== modified file 'po/fr.po'
34--- po/fr.po 2016-12-23 05:00:28 +0000
35+++ po/fr.po 2017-01-04 12:10:40 +0000
36@@ -7,16 +7,27 @@
37 msgstr ""
38 "Project-Id-Version: unity\n"
39 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
40+<<<<<<< TREE
41 "POT-Creation-Date: 2016-12-15 16:17+0000\n"
42 "PO-Revision-Date: 2016-12-17 14:32+0000\n"
43 "Last-Translator: Anne017 <anneonyme017@openmailbox.org>\n"
44+=======
45+"POT-Creation-Date: 2016-12-07 13:49+0000\n"
46+"PO-Revision-Date: 2016-12-17 14:32+0000\n"
47+"Last-Translator: Anne017 <anneonyme017@openmailbox.org>\n"
48+>>>>>>> MERGE-SOURCE
49 "Language-Team: French <fr@li.org>\n"
50 "MIME-Version: 1.0\n"
51 "Content-Type: text/plain; charset=UTF-8\n"
52 "Content-Transfer-Encoding: 8bit\n"
53 "Plural-Forms: nplurals=2; plural=n > 1;\n"
54+<<<<<<< TREE
55 "X-Launchpad-Export-Date: 2016-12-23 04:59+0000\n"
56 "X-Generator: Launchpad (build 18298)\n"
57+=======
58+"X-Launchpad-Export-Date: 2016-12-18 05:20+0000\n"
59+"X-Generator: Launchpad (build 18298)\n"
60+>>>>>>> MERGE-SOURCE
61
62 #: plugins/LightDM/Greeter.cpp:123
63 msgid "Password: "
64
65=== modified file 'po/gl.po'
66--- po/gl.po 2016-12-23 05:00:28 +0000
67+++ po/gl.po 2017-01-04 12:10:40 +0000
68@@ -7,16 +7,26 @@
69 msgstr ""
70 "Project-Id-Version: unity\n"
71 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
72+<<<<<<< TREE
73 "POT-Creation-Date: 2016-12-15 16:17+0000\n"
74 "PO-Revision-Date: 2016-12-16 00:21+0000\n"
75+=======
76+"POT-Creation-Date: 2016-12-07 13:49+0000\n"
77+"PO-Revision-Date: 2016-12-16 00:21+0000\n"
78+>>>>>>> MERGE-SOURCE
79 "Last-Translator: Marcos Lans <Unknown>\n"
80 "Language-Team: Galician <gl@li.org>\n"
81 "MIME-Version: 1.0\n"
82 "Content-Type: text/plain; charset=UTF-8\n"
83 "Content-Transfer-Encoding: 8bit\n"
84 "Plural-Forms: nplurals=2; plural=n != 1;\n"
85+<<<<<<< TREE
86 "X-Launchpad-Export-Date: 2016-12-23 04:59+0000\n"
87 "X-Generator: Launchpad (build 18298)\n"
88+=======
89+"X-Launchpad-Export-Date: 2016-12-17 05:27+0000\n"
90+"X-Generator: Launchpad (build 18298)\n"
91+>>>>>>> MERGE-SOURCE
92
93 #: plugins/LightDM/Greeter.cpp:123
94 msgid "Password: "
95
96=== modified file 'po/ms.po'
97--- po/ms.po 2016-12-23 05:00:28 +0000
98+++ po/ms.po 2017-01-04 12:10:40 +0000
99@@ -7,16 +7,26 @@
100 msgstr ""
101 "Project-Id-Version: unity8\n"
102 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
103+<<<<<<< TREE
104 "POT-Creation-Date: 2016-12-15 16:17+0000\n"
105 "PO-Revision-Date: 2016-12-20 14:02+0000\n"
106+=======
107+"POT-Creation-Date: 2016-12-07 13:49+0000\n"
108+"PO-Revision-Date: 2016-12-20 14:02+0000\n"
109+>>>>>>> MERGE-SOURCE
110 "Last-Translator: abuyop <Unknown>\n"
111 "Language-Team: Malay <ms@li.org>\n"
112 "MIME-Version: 1.0\n"
113 "Content-Type: text/plain; charset=UTF-8\n"
114 "Content-Transfer-Encoding: 8bit\n"
115 "Plural-Forms: nplurals=2; plural=n != 1;\n"
116+<<<<<<< TREE
117 "X-Launchpad-Export-Date: 2016-12-23 04:59+0000\n"
118 "X-Generator: Launchpad (build 18298)\n"
119+=======
120+"X-Launchpad-Export-Date: 2016-12-21 05:34+0000\n"
121+"X-Generator: Launchpad (build 18298)\n"
122+>>>>>>> MERGE-SOURCE
123
124 #: plugins/LightDM/Greeter.cpp:123
125 msgid "Password: "
126
127=== modified file 'qml/Panel/IndicatorsBar.qml'
128--- qml/Panel/IndicatorsBar.qml 2015-09-02 07:42:27 +0000
129+++ qml/Panel/IndicatorsBar.qml 2017-01-04 12:10:40 +0000
130@@ -43,6 +43,7 @@
131 row.resetCurrentItem();
132 }
133 row.setCurrentItemIndex(index);
134+ d.alignIndicators();
135 }
136
137 function addScrollOffset(scrollAmmout) {
138
139=== modified file 'qml/Panel/IndicatorsMenu.qml'
140--- qml/Panel/IndicatorsMenu.qml 2016-06-15 14:36:15 +0000
141+++ qml/Panel/IndicatorsMenu.qml 2017-01-04 12:10:40 +0000
142@@ -131,6 +131,19 @@
143 color: panelColor
144 }
145
146+ Keys.onPressed: {
147+ if (event.key === Qt.Key_Left) {
148+ bar.setCurrentItemIndex(bar.currentItemIndex - 1);
149+ event.accepted = true;
150+ } else if (event.key === Qt.Key_Right) {
151+ bar.setCurrentItemIndex(bar.currentItemIndex + 1);
152+ event.accepted = true;
153+ } else if (event.key === Qt.Key_Escape) {
154+ root.hide();
155+ event.accepted = true;
156+ }
157+ }
158+
159 IndicatorsBar {
160 id: bar
161 objectName: "indicatorsBar"
162@@ -356,6 +369,7 @@
163 State {
164 name: "commit"
165 extend: "locked"
166+ PropertyChanges { target: root; focus: true }
167 PropertyChanges { target: bar; interactive: true }
168 PropertyChanges {
169 target: d;
170
171=== modified file 'tests/qmltests/Panel/tst_IndicatorsMenu.qml'
172--- tests/qmltests/Panel/tst_IndicatorsMenu.qml 2016-09-24 04:31:04 +0000
173+++ tests/qmltests/Panel/tst_IndicatorsMenu.qml 2017-01-04 12:10:40 +0000
174@@ -303,5 +303,39 @@
175 indicatorsMenu.available = true;
176 indicatorsMenu.hide();
177 }
178+
179+ function test_keyboardNavigation_data() {
180+ return [
181+ {tag: "tab to start", doTab: false},
182+ {tag: "no tab to start", doTab: true}
183+ ]
184+ }
185+
186+ function test_keyboardNavigation(data) {
187+ var indicatorsBar = findChild(indicatorsMenu, "indicatorsBar");
188+
189+ indicatorsMenu.show();
190+ indicatorsBar.setCurrentItemIndex(0);
191+ tryCompare(indicatorsMenu, "fullyOpened", true);
192+
193+ if (data.doTab) {
194+ keyClick(Qt.Key_Tab);
195+ }
196+
197+ keyClick(Qt.Key_Right);
198+ tryCompare(indicatorsBar, "currentItemIndex", 1);
199+
200+ keyClick(Qt.Key_Right);
201+ tryCompare(indicatorsBar, "currentItemIndex", 2);
202+
203+ keyClick(Qt.Key_Left);
204+ tryCompare(indicatorsBar, "currentItemIndex", 1);
205+
206+ keyClick(Qt.Key_Left);
207+ tryCompare(indicatorsBar, "currentItemIndex", 0);
208+
209+ keyClick(Qt.Key_Escape);
210+ tryCompare(indicatorsMenu, "fullyClosed", true);
211+ }
212 }
213 }

Subscribers

People subscribed via source and target branches