Merge lp:~michael-sheldon/ubuntu-keyboard/further-emoji-improvements into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 286
Merged at revision: 297
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/further-emoji-improvements
Merge into: lp:ubuntu-keyboard
Diff against target: 342 lines (+9/-283)
5 files modified
plugins/emoji/qml/Keyboard_emoji_email.qml (+0/-93)
plugins/emoji/qml/Keyboard_emoji_url.qml (+0/-92)
plugins/emoji/qml/Keyboard_emoji_url_search.qml (+0/-94)
qml/Keyboard.qml (+8/-4)
qml/KeyboardContainer.qml (+1/-0)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/further-emoji-improvements
Reviewer Review Type Date Requested Status
Bill Filler (community) Needs Fixing
PS Jenkins bot continuous-integration Approve
Review via email: mp+246572@code.launchpad.net

Commit message

Allow Emoji keyboard to be shown for URL and email field types and switch out of Emoji layout when changing fields.

Description of the change

Allow Emoji keyboard to be shown for URL and email field types and switch out of Emoji layout when changing fields.

To post a comment you must log in.
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/ubuntu-keyboard) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * No change

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

In a web form we are not automatically switching out of emoji layout when switching fields. This does however work in qml (tested in address-book-app)

review: Needs Fixing
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

This is being caused by bug 1416460 in oxide, whereby it doesn't consistently reset the input method when changing fields (which is the trigger we use to switch the emoji layout back); so I'd suggest we land the keyboard branch anyway, and fix the issue in oxide when possible.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added symlink 'plugins/emoji/qml/Keyboard_emoji_email.qml'
=== target is u'Keyboard_emoji.qml'
=== removed file 'plugins/emoji/qml/Keyboard_emoji_email.qml'
--- plugins/emoji/qml/Keyboard_emoji_email.qml 2014-10-24 12:58:24 +0000
+++ plugins/emoji/qml/Keyboard_emoji_email.qml 1970-01-01 00:00:00 +0000
@@ -1,93 +0,0 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import "../../keys"
19import "../../keys/key_constants.js" as UI
20
21KeyPad {
22 anchors.fill: parent
23
24 content: c1
25 symbols: "languages/Keyboard_symbols.qml"
26
27 Column {
28 id: c1
29 anchors.fill: parent
30 spacing: 0
31
32 Row {
33 anchors.horizontalCenter: parent.horizontalCenter;
34 spacing: 0
35
36 CharKey { label: "q"; shifted: "Q"; extended: ["1"]; extendedShifted: ["1"]; leftSide: true; }
37 CharKey { label: "w"; shifted: "W"; extended: ["2"]; extendedShifted: ["2"] }
38 CharKey { label: "e"; shifted: "E"; extended: ["3", "è", "é", "ê", "ë", "€"]; extendedShifted: ["3", "È","É", "Ê", "Ë", "€"] }
39 CharKey { label: "r"; shifted: "R"; extended: ["4"]; extendedShifted: ["4"] }
40 CharKey { label: "t"; shifted: "T"; extended: ["5", "þ"]; extendedShifted: ["5", "Þ"] }
41 CharKey { label: "y"; shifted: "Y"; extended: ["6", "ý", "¥"]; extendedShifted: ["6", "Ý", "¥"] }
42 CharKey { label: "u"; shifted: "U"; extended: ["7", "û","ù","ú","ü"]; extendedShifted: ["7", "Û","Ù","Ú","Ü"] }
43 CharKey { label: "i"; shifted: "I"; extended: ["8", "î","ï","ì","í"]; extendedShifted: ["8", "Î","Ï","Ì","Í"] }
44 CharKey { label: "o"; shifted: "O"; extended: ["9", "ö","ô","ò","ó"]; extendedShifted: ["9", "Ö","Ô","Ò","Ó"] }
45 CharKey { label: "p"; shifted: "P"; extended: ["0"]; extendedShifted: ["0"]; rightSide: true; }
46 }
47
48 Row {
49 anchors.horizontalCenter: parent.horizontalCenter;
50 spacing: 0
51
52 CharKey { label: "a"; shifted: "A"; extended: ["ä","à","â","á","ã","å"]; extendedShifted: ["Ä","À","Â","Á","Ã","Å"]; leftSide: true; }
53 CharKey { label: "s"; shifted: "S"; extended: ["ß","$"]; extendedShifted: ["$"] }
54 CharKey { label: "d"; shifted: "D"; extended: ["ð"]; extendedShifted: ["Ð"] }
55 CharKey { label: "f"; shifted: "F"; }
56 CharKey { label: "g"; shifted: "G"; }
57 CharKey { label: "h"; shifted: "H"; }
58 CharKey { label: "j"; shifted: "J"; }
59 CharKey { label: "k"; shifted: "K"; }
60 CharKey { label: "l"; shifted: "L"; rightSide: true; }
61 }
62
63 Row {
64 anchors.horizontalCenter: parent.horizontalCenter;
65 spacing: 0
66
67 ShiftKey {}
68 CharKey { label: "z"; shifted: "Z"; }
69 CharKey { label: "x"; shifted: "X"; }
70 CharKey { label: "c"; shifted: "C"; extended: ["ç"]; extendedShifted: ["Ç"] }
71 CharKey { label: "v"; shifted: "V"; }
72 CharKey { label: "b"; shifted: "B"; }
73 CharKey { label: "n"; shifted: "N"; extended: ["ñ"]; extendedShifted: ["Ñ"] }
74 CharKey { label: "m"; shifted: "M"; }
75 BackspaceKey {}
76 }
77
78 Item {
79 anchors.left: parent.left
80 anchors.right: parent.right
81
82 height: panel.keyHeight + units.gu(UI.row_margin);
83
84 SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; height: parent.height; }
85 LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; height: parent.height; }
86 CharKey { id: atKey; label: "@"; shifted: "@"; anchors.left: languageMenuButton.right; height: parent.height; }
87 SpaceKey { id: spaceKey; anchors.left: atKey.right; anchors.right: urlKey.left; noMagnifier: true; height: parent.height; }
88 UrlKey { id: urlKey; label: ".com"; extended: [".co.uk", ".net", ".org", ".edu", ".gov", ".ac.uk"]; anchors.right: dotKey.left; height: parent.height; }
89 CharKey { id: dotKey; label: "."; shifted: "."; extended: ["?", "!"]; extendedShifted: ["?", "!"]; anchors.right: enterKey.left; height: parent.height; }
90 ReturnKey { id: enterKey; anchors.right: parent.right; height: parent.height; }
91 }
92 } // column
93}
940
=== added symlink 'plugins/emoji/qml/Keyboard_emoji_url.qml'
=== target is u'Keyboard_emoji.qml'
=== removed file 'plugins/emoji/qml/Keyboard_emoji_url.qml'
--- plugins/emoji/qml/Keyboard_emoji_url.qml 2014-10-24 12:58:24 +0000
+++ plugins/emoji/qml/Keyboard_emoji_url.qml 1970-01-01 00:00:00 +0000
@@ -1,92 +0,0 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import "../../keys"
19import "../../keys/key_constants.js" as UI
20
21KeyPad {
22 anchors.fill: parent
23
24 content: c1
25 symbols: "languages/Keyboard_symbols.qml"
26
27 Column {
28 id: c1
29 anchors.fill: parent
30 spacing: 0
31
32 Row {
33 anchors.horizontalCenter: parent.horizontalCenter;
34 spacing: 0
35
36 CharKey { label: "q"; shifted: "Q"; extended: ["1"]; extendedShifted: ["1"]; leftSide: true; }
37 CharKey { label: "w"; shifted: "W"; extended: ["2"]; extendedShifted: ["2"] }
38 CharKey { label: "e"; shifted: "E"; extended: ["3", "è", "é", "ê", "ë", "€"]; extendedShifted: ["3", "È","É", "Ê", "Ë", "€"] }
39 CharKey { label: "r"; shifted: "R"; extended: ["4"]; extendedShifted: ["4"] }
40 CharKey { label: "t"; shifted: "T"; extended: ["5", "þ"]; extendedShifted: ["5", "Þ"] }
41 CharKey { label: "y"; shifted: "Y"; extended: ["6", "ý", "¥"]; extendedShifted: ["6", "Ý", "¥"] }
42 CharKey { label: "u"; shifted: "U"; extended: ["7", "û","ù","ú","ü"]; extendedShifted: ["7", "Û","Ù","Ú","Ü"] }
43 CharKey { label: "i"; shifted: "I"; extended: ["8", "î","ï","ì","í"]; extendedShifted: ["8", "Î","Ï","Ì","Í"] }
44 CharKey { label: "o"; shifted: "O"; extended: ["9", "ö","ô","ò","ó"]; extendedShifted: ["9", "Ö","Ô","Ò","Ó"] }
45 CharKey { label: "p"; shifted: "P"; extended: ["0"]; extendedShifted: ["0"]; rightSide: true; }
46 }
47
48 Row {
49 anchors.horizontalCenter: parent.horizontalCenter;
50 spacing: 0
51
52 CharKey { label: "a"; shifted: "A"; extended: ["ä","à","â","á","ã","å"]; extendedShifted: ["Ä","À","Â","Á","Ã","Å"]; leftSide: true; }
53 CharKey { label: "s"; shifted: "S"; extended: ["ß","$"]; extendedShifted: ["$"] }
54 CharKey { label: "d"; shifted: "D"; extended: ["ð"]; extendedShifted: ["Ð"] }
55 CharKey { label: "f"; shifted: "F"; }
56 CharKey { label: "g"; shifted: "G"; }
57 CharKey { label: "h"; shifted: "H"; }
58 CharKey { label: "j"; shifted: "J"; }
59 CharKey { label: "k"; shifted: "K"; }
60 CharKey { label: "l"; shifted: "L"; rightSide: true; }
61 }
62
63 Row {
64 anchors.horizontalCenter: parent.horizontalCenter;
65 spacing: 0
66
67 ShiftKey {}
68 CharKey { label: "z"; shifted: "Z"; }
69 CharKey { label: "x"; shifted: "X"; }
70 CharKey { label: "c"; shifted: "C"; extended: ["ç"]; extendedShifted: ["Ç"] }
71 CharKey { label: "v"; shifted: "V"; }
72 CharKey { label: "b"; shifted: "B"; }
73 CharKey { label: "n"; shifted: "N"; extended: ["ñ"]; extendedShifted: ["Ñ"] }
74 CharKey { label: "m"; shifted: "M"; }
75 BackspaceKey {}
76 }
77
78 Item {
79 anchors.left: parent.left
80 anchors.right: parent.right
81
82 height: panel.keyHeight + units.gu(UI.row_margin);
83
84 SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; height: parent.height; }
85 LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; height: parent.height; }
86 CharKey { id: slashKey; label: "/"; shifted: "/"; anchors.left: languageMenuButton.right; height: parent.height; }
87 UrlKey { id: urlKey; label: ".com"; extended: [".co.uk", ".net", ".org", ".edu", ".gov", ".ac.uk"]; anchors.right: dotKey.left; height: parent.height; }
88 CharKey { id: dotKey; label: "."; shifted: "."; extended: ["?", "!"]; extendedShifted: ["?", "!"]; anchors.right: enterKey.left; height: parent.height; }
89 ReturnKey { id: enterKey; anchors.right: parent.right; height: parent.height; }
90 }
91 } // column
92}
930
=== added symlink 'plugins/emoji/qml/Keyboard_emoji_url_search.qml'
=== target is u'Keyboard_emoji.qml'
=== removed file 'plugins/emoji/qml/Keyboard_emoji_url_search.qml'
--- plugins/emoji/qml/Keyboard_emoji_url_search.qml 2014-10-24 12:58:24 +0000
+++ plugins/emoji/qml/Keyboard_emoji_url_search.qml 1970-01-01 00:00:00 +0000
@@ -1,94 +0,0 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import "../../keys"
19import "../../keys/key_constants.js" as UI
20
21KeyPad {
22 anchors.fill: parent
23
24 content: c1
25 symbols: "languages/Keyboard_symbols.qml"
26
27 Column {
28 id: c1
29 anchors.fill: parent
30
31 spacing: 0
32
33 Row {
34 anchors.horizontalCenter: parent.horizontalCenter;
35 spacing: 0
36
37 CharKey { label: "q"; shifted: "Q"; extended: ["1"]; extendedShifted: ["1"]; leftSide: true; }
38 CharKey { label: "w"; shifted: "W"; extended: ["2"]; extendedShifted: ["2"] }
39 CharKey { label: "e"; shifted: "E"; extended: ["3", "è", "é", "ê", "ë", "€"]; extendedShifted: ["3", "È","É", "Ê", "Ë", "€"] }
40 CharKey { label: "r"; shifted: "R"; extended: ["4"]; extendedShifted: ["4"] }
41 CharKey { label: "t"; shifted: "T"; extended: ["5", "þ"]; extendedShifted: ["5", "Þ"] }
42 CharKey { label: "y"; shifted: "Y"; extended: ["6", "ý", "¥"]; extendedShifted: ["6", "Ý", "¥"] }
43 CharKey { label: "u"; shifted: "U"; extended: ["7", "û","ù","ú","ü"]; extendedShifted: ["7", "Û","Ù","Ú","Ü"] }
44 CharKey { label: "i"; shifted: "I"; extended: ["8", "î","ï","ì","í"]; extendedShifted: ["8", "Î","Ï","Ì","Í"] }
45 CharKey { label: "o"; shifted: "O"; extended: ["9", "ö","ô","ò","ó"]; extendedShifted: ["9", "Ö","Ô","Ò","Ó"] }
46 CharKey { label: "p"; shifted: "P"; extended: ["0"]; extendedShifted: ["0"]; rightSide: true; }
47 }
48
49 Row {
50 anchors.horizontalCenter: parent.horizontalCenter;
51 spacing: 0
52
53 CharKey { label: "a"; shifted: "A"; extended: ["ä","à","â","á","ã","å"]; extendedShifted: ["Ä","À","Â","Á","Ã","Å"]; leftSide: true; }
54 CharKey { label: "s"; shifted: "S"; extended: ["ß","$"]; extendedShifted: ["$"] }
55 CharKey { label: "d"; shifted: "D"; extended: ["ð"]; extendedShifted: ["Ð"] }
56 CharKey { label: "f"; shifted: "F"; }
57 CharKey { label: "g"; shifted: "G"; }
58 CharKey { label: "h"; shifted: "H"; }
59 CharKey { label: "j"; shifted: "J"; }
60 CharKey { label: "k"; shifted: "K"; }
61 CharKey { label: "l"; shifted: "L"; rightSide: true; }
62 }
63
64 Row {
65 anchors.horizontalCenter: parent.horizontalCenter;
66 spacing: 0
67
68 ShiftKey {}
69 CharKey { label: "z"; shifted: "Z"; }
70 CharKey { label: "x"; shifted: "X"; }
71 CharKey { label: "c"; shifted: "C"; extended: ["ç"]; extendedShifted: ["Ç"] }
72 CharKey { label: "v"; shifted: "V"; }
73 CharKey { label: "b"; shifted: "B"; }
74 CharKey { label: "n"; shifted: "N"; extended: ["ñ"]; extendedShifted: ["Ñ"] }
75 CharKey { label: "m"; shifted: "M"; }
76 BackspaceKey {}
77 }
78
79 Item {
80 anchors.left: parent.left
81 anchors.right: parent.right
82
83 height: panel.keyHeight + units.gu(UI.row_margin);
84
85 SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; height: parent.height; }
86 LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; height: parent.height; }
87 CharKey { id: slashKey; label: "/"; shifted: "/"; anchors.left: languageMenuButton.right; height: parent.height; }
88 SpaceKey { id: spaceKey; anchors.left: slashKey.right; anchors.right: urlKey.left; noMagnifier: true; height: parent.height; }
89 UrlKey { id: urlKey; label: ".com"; extended: [".co.uk", ".net", ".org", ".edu", ".gov", ".ac.uk"]; anchors.right: dotKey.left; height: parent.height; }
90 CharKey { id: dotKey; label: "."; shifted: "."; extended: ["?", "!"]; extendedShifted: ["?", "!"]; anchors.right: enterKey.left; height: parent.height; }
91 ReturnKey { id: enterKey; anchors.right: parent.right; height: parent.height; }
92 }
93 } // column
94}
950
=== modified file 'qml/Keyboard.qml'
--- qml/Keyboard.qml 2015-01-12 16:22:37 +0000
+++ qml/Keyboard.qml 2015-01-15 14:02:25 +0000
@@ -231,10 +231,6 @@
231 keypad.closeExtendedKeys();231 keypad.closeExtendedKeys();
232 keypad.activeKeypadState = "NORMAL";232 keypad.activeKeypadState = "NORMAL";
233 keypad.state = "CHARACTERS";233 keypad.state = "CHARACTERS";
234 if (keypad.switchBack && keypad.previousLanguage) {
235 keypad.switchBack = false;
236 maliit_input_method.activeLanguage = keypad.previousLanguage;
237 }
238 maliit_input_method.close();234 maliit_input_method.close();
239 canvas.hidingComplete = true;235 canvas.hidingComplete = true;
240 reportKeyboardVisibleRect();236 reportKeyboardVisibleRect();
@@ -260,8 +256,16 @@
260 }256 }
261 }257 }
262258
259 onActiveLanguageChanged: {
260 keypad.justChangedLanguage = true
261 }
263 onKeyboardReset: {262 onKeyboardReset: {
264 keypad.state = "CHARACTERS"263 keypad.state = "CHARACTERS"
264 if (keypad.switchBack && keypad.previousLanguage && !keypad.justChangedLanguage) {
265 keypad.switchBack = false;
266 maliit_input_method.activeLanguage = keypad.previousLanguage;
267 }
268 keypad.justChangedLanguage = false;
265 }269 }
266 onDeactivateAutocaps: {270 onDeactivateAutocaps: {
267 if(keypad.autoCapsTriggered) {271 if(keypad.autoCapsTriggered) {
268272
=== modified file 'qml/KeyboardContainer.qml'
--- qml/KeyboardContainer.qml 2015-01-12 13:30:44 +0000
+++ qml/KeyboardContainer.qml 2015-01-15 14:02:25 +0000
@@ -35,6 +35,7 @@
35 property alias popoverEnabled: extendedKeysSelector.enabled35 property alias popoverEnabled: extendedKeysSelector.enabled
36 property string previousLanguage36 property string previousLanguage
37 property bool switchBack: false // Switch back to the previous layout without showing the language menu37 property bool switchBack: false // Switch back to the previous layout without showing the language menu
38 property bool justChangedLanguage: true // Don't switch back languages during language switch process
3839
39 state: "CHARACTERS"40 state: "CHARACTERS"
4041

Subscribers

People subscribed via source and target branches