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

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: no longer in the source branch.
Merged at revision: 282
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/emoji-improvements
Merge into: lp:ubuntu-keyboard
Diff against target: 263 lines (+107/-49)
6 files modified
plugins/emoji/qml/Keyboard_emoji.qml (+45/-35)
plugins/emoji/qml/emoji.js (+53/-10)
qml/Keyboard.qml (+4/-0)
qml/KeyboardContainer.qml (+1/-0)
qml/keys/CharKey.qml (+2/-1)
qml/keys/LanguageKey.qml (+2/-3)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/emoji-improvements
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+246200@code.launchpad.net

Commit message

Skip Emoji characters that iOS and Android can't display, show which category of Emoji the user is currently viewing and switch back to the previous layout when the keyboard is hidden.

Description of the change

Skip Emoji characters that iOS and Android can't display, show which category of Emoji the user is currently viewing and switch back to the previous layout when the keyboard is hidden.

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)
282. By Michael Sheldon

Skip Emoji characters that iOS and Android can't display, show which category of Emoji the user is currently viewing and switch back to the previous layout when the keyboard is hidden.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/emoji/qml/Keyboard_emoji.qml'
2--- plugins/emoji/qml/Keyboard_emoji.qml 2014-12-08 14:48:27 +0000
3+++ plugins/emoji/qml/Keyboard_emoji.qml 2015-01-12 17:59:45 +0000
4@@ -25,9 +25,13 @@
5 content: c1
6 symbols: "languages/Keyboard_symbols.qml"
7
8+ Component.onCompleted: {
9+ panel.switchBack = true;
10+ }
11+
12 QtObject {
13 id: internal
14- property int offset: 740
15+ property int offset: 528
16 property var chars: calculateChars()
17
18 function calculateChars() {
19@@ -120,8 +124,9 @@
20 label: "😀"
21 shifted: label
22 overridePressArea: true
23+ highlight: internal.offset >= 528 && internal.offset < 603
24 onPressed: {
25- internal.offset = 740
26+ internal.offset = 528
27 }
28 }
29
30@@ -129,8 +134,39 @@
31 label: "🚀"
32 shifted: label
33 overridePressArea: true
34- onPressed: {
35- internal.offset = 865
36+ highlight: internal.offset >= 603
37+ onPressed: {
38+ internal.offset = 603
39+ }
40+ }
41+
42+ ActionKey {
43+ label: "🌍"
44+ shifted: label
45+ overridePressArea: true
46+ highlight: internal.offset >= 0 && internal.offset < 170
47+ onPressed: {
48+ internal.offset = 13
49+ }
50+ }
51+
52+ ActionKey {
53+ label: "🏠"
54+ shifted: label
55+ overridePressArea: true
56+ highlight: internal.offset >= 170 && internal.offset < 188
57+ onPressed: {
58+ internal.offset = 170
59+ }
60+ }
61+
62+ ActionKey {
63+ label: "🐀"
64+ shifted: label
65+ overridePressArea: true
66+ highlight: internal.offset >= 188 && internal.offset < 500
67+ onPressed: {
68+ internal.offset = 188
69 }
70 }
71
72@@ -138,36 +174,10 @@
73 label: "🕜"
74 shifted: label
75 overridePressArea: true
76- onPressed: {
77- internal.offset = 569
78- }
79- }
80-
81- ActionKey {
82- label: "🐀"
83- shifted: label
84- overridePressArea: true
85- onPressed: {
86- internal.offset = 237
87- }
88- }
89-
90- ActionKey {
91- label: "🏠"
92- shifted: label
93- overridePressArea: true
94- onPressed: {
95- internal.offset = 214
96- }
97- }
98-
99- ActionKey {
100- label: "🌍"
101- shifted: label
102- overridePressArea: true
103- onPressed: {
104- internal.offset = 14
105- }
106+ highlight: internal.offset >= 500 && internal.offset < 528
107+ onPressed: {
108+ internal.offset = 500
109+ }
110 }
111
112 BackspaceKey { padding: 0; width: enterKey.width }
113@@ -180,7 +190,7 @@
114 height: panel.keyHeight + units.gu(UI.row_margin);
115
116 SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; height: parent.height; }
117- LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; height: parent.height; switchBack: true }
118+ LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; height: parent.height; }
119 SpaceKey { id: spaceKey; anchors.left: languageMenuButton.right; anchors.right: enterKey.left; noMagnifier: true; height: parent.height; }
120 ReturnKey { id: enterKey; anchors.right: parent.right; height: parent.height; }
121 }
122
123=== modified file 'plugins/emoji/qml/emoji.js'
124--- plugins/emoji/qml/emoji.js 2014-12-05 00:45:48 +0000
125+++ plugins/emoji/qml/emoji.js 2015-01-12 17:59:45 +0000
126@@ -2,13 +2,56 @@
127 var start = [[55356, 57088], [55357, 56320]];
128 var end = [[55356, 57335], [55357, 57301]];
129
130-// Not supported by any of the installed fonts
131-var skip = [[57133, 57134, 57135, 57214, 57215, 57295, 57296, 57297, 57298, 57299],
132- [56575, 56651, 56652, 56653, 56654, 56655, 56675, 56826, 56884, 56899,
133- 56900, 56698, 57040, 57041, 57042, 57043, 57044, 57045, 57046, 57047,
134- 57048, 57049, 57050, 57051, 57052, 57053, 57054, 57055, 57069, 57070,
135- 57071, 57076, 57077, 57078, 57079, 57080, 57081, 57082, 57083, 57084,
136- 57085, 57086, 57087, 57204, 57205, 57206, 57207, 57208, 57209, 57210,
137- 57211, 57212, 57213, 57214, 57215
138- ]
139- ];
140+// Not supported by any of the installed fonts, or not supported on Android or iOS
141+var skip = [[ 57121, 57122, 57123, 57124, 57125, 57126, 57127, 57128, 57129,
142+57130, 57131, 57132, 57133, 57134, 57135, 57142, 57213, 57214, 57215, 57235,
143+57236, 57237, 57238, 57239, 57240, 57241, 57242, 57243, 57244, 57245, 57246,
144+57247, 57285, 57291, 57292, 57293, 57294, 57295, 57296, 57297, 57298, 57299,
145+57300, 57301, 57302, 57303, 57304, 57305, 57306, 57307, 57308, 57309, 57310,
146+57311, 57329, 57330, 57331, 57332, 57333, 57334, 57335],
147+ [ 56383, 56468, 56573, 56574, 56575, 56598, 56638, 56639, 56640,
148+56641, 56642, 56643, 56644, 56645, 56646, 56647, 56648, 56649, 56650, 56651,
149+56652, 56653, 56654, 56655, 56675, 56680, 56681, 56682, 56683, 56684, 56685,
150+56686, 56687, 56688, 56689, 56690, 56691, 56692, 56693, 56694, 56695, 56696,
151+56697, 56698, 56699, 56700, 56701, 56702, 56703, 56704, 56705, 56706, 56707,
152+56708, 56709, 56710, 56711, 56712, 56713, 56714, 56715, 56716, 56717, 56718,
153+56719, 56720, 56721, 56722, 56723, 56724, 56725, 56726, 56727, 56728, 56729,
154+56730, 56731, 56732, 56733, 56734, 56735, 56736, 56737, 56738, 56739, 56740,
155+56741, 56742, 56743, 56744, 56745, 56746, 56747, 56748, 56749, 56750, 56751,
156+56752, 56753, 56754, 56755, 56756, 56757, 56758, 56759, 56760, 56761, 56762,
157+56763, 56764, 56765, 56766, 56767, 56768, 56769, 56770, 56771, 56772, 56773,
158+56774, 56775, 56776, 56777, 56778, 56779, 56780, 56781, 56782, 56783, 56784,
159+56785, 56786, 56787, 56788, 56789, 56790, 56791, 56792, 56793, 56794, 56795,
160+56796, 56797, 56798, 56799, 56800, 56801, 56802, 56803, 56804, 56805, 56806,
161+56807, 56808, 56809, 56810, 56811, 56812, 56813, 56814, 56815, 56816, 56817,
162+56818, 56819, 56820, 56821, 56822, 56823, 56824, 56825, 56826, 56884, 56897,
163+56898, 56899, 56900, 56912, 56913, 56914, 56915, 56916, 56917, 56918, 56919,
164+56920, 56921, 56922, 56923, 56924, 56925, 56926, 56927, 56928, 56929, 56930,
165+56931, 56932, 56933, 56934, 56935, 56936, 56937, 56938, 56939, 56940, 56941,
166+56942, 56943, 56944, 56945, 56946, 56947, 56948, 56949, 56950, 56951, 56952,
167+56953, 56954, 56955, 56956, 56957, 56958, 56959, 56698, 57030, 57031, 57032,
168+57033, 57034, 57035, 57036, 57037, 57038, 57039, 57040, 57041, 57042, 57043,
169+57044, 57045, 57046, 57047, 57048, 57049, 57050, 57051, 57052, 57053, 57054,
170+57055, 57056, 57057, 57058, 57059, 57060, 57061, 57062, 57063, 57064, 57065,
171+57066, 57067, 57068, 57069, 57070, 57071, 57072, 57073, 57074, 57075, 57076,
172+57077, 57078, 57079, 57080, 57081, 57082, 57083, 57084, 57085, 57086, 57087,
173+57088, 57089, 57090, 57091, 57092, 57093, 57094, 57095, 57096, 57097, 57098,
174+57099, 57100, 57101, 57102, 57103, 57104, 57105, 57106, 57107, 57108, 57109,
175+57110, 57111, 57112, 57113, 57114, 57115, 57116, 57117, 57118, 57119, 57120,
176+57121, 57122, 57123, 57124, 57125, 57126, 57127, 57128, 57129, 57130, 57131,
177+57132, 57133, 57134, 57135, 57136, 57137, 57138, 57139, 57140, 57141, 57142,
178+57143, 57144, 57145, 57146, 57147, 57148, 57149, 57150, 57151, 57152, 57153,
179+57154, 57155, 57156, 57157, 57158, 57159, 57160, 57161, 57162, 57163, 57164,
180+57165, 57166, 57167, 57168, 57169, 57170, 57171, 57172, 57173, 57174, 57175,
181+57176, 57177, 57178, 57179, 57180, 57181, 57182, 57183, 57184, 57185, 57186,
182+57187, 57188, 57189, 57190, 57191, 57192, 57193, 57194, 57195, 57196, 57197,
183+57198, 57199, 57200, 57201, 57202, 57203, 57204, 57205, 57206, 57207, 57208,
184+57209, 57210, 57211, 57212, 57213, 57214, 57215, 57216, 57217, 57218, 57219,
185+57220, 57221, 57222, 57223, 57224, 57225, 57226, 57227, 57228, 57229, 57230,
186+57231, 57232, 57233, 57234, 57235, 57236, 57237, 57238, 57239, 57240, 57241,
187+57242, 57243, 57244, 57245, 57246, 57247, 57248, 57249, 57250, 57251, 57252,
188+57253, 57254, 57255, 57256, 57257, 57258, 57259, 57260, 57261, 57262, 57263,
189+57264, 57265, 57266, 57267, 57268, 57269, 57270, 57271, 57272, 57273, 57274,
190+57275, 57276, 57277, 57278, 57279, 57280, 57281, 57282, 57283, 57284, 57285,
191+57286, 57287, 57288, 57289, 57290, 57291, 57292, 57293, 57294, 57295, 57296,
192+57297, 57298, 57299, 57300, 57301]];
193
194=== modified file 'qml/Keyboard.qml'
195--- qml/Keyboard.qml 2015-01-06 13:37:36 +0000
196+++ qml/Keyboard.qml 2015-01-12 17:59:45 +0000
197@@ -231,6 +231,10 @@
198 keypad.closeExtendedKeys();
199 keypad.activeKeypadState = "NORMAL";
200 keypad.state = "CHARACTERS";
201+ if (keypad.switchBack && keypad.previousLanguage) {
202+ keypad.switchBack = false;
203+ maliit_input_method.activeLanguage = keypad.previousLanguage;
204+ }
205 maliit_input_method.close();
206 canvas.hidingComplete = true;
207 reportKeyboardVisibleRect();
208
209=== modified file 'qml/KeyboardContainer.qml'
210--- qml/KeyboardContainer.qml 2014-12-05 00:49:11 +0000
211+++ qml/KeyboardContainer.qml 2015-01-12 17:59:45 +0000
212@@ -34,6 +34,7 @@
213 property string activeKeypadState: "NORMAL"
214 property alias popoverEnabled: extendedKeysSelector.enabled
215 property string previousLanguage
216+ property bool switchBack: false // Switch back to the previous layout without showing the language menu
217
218 state: "CHARACTERS"
219
220
221=== modified file 'qml/keys/CharKey.qml'
222--- qml/keys/CharKey.qml 2014-11-19 15:39:58 +0000
223+++ qml/keys/CharKey.qml 2015-01-12 17:59:45 +0000
224@@ -35,6 +35,7 @@
225 property var extended; // list of extended keys
226 property var extendedShifted; // list of extended keys in shifted state
227 property var currentExtendedKey; // The currently highlighted extended key
228+ property bool highlight: false;
229
230 property alias valueToSubmit: keyLabel.text
231
232@@ -119,7 +120,7 @@
233
234 BorderImage {
235 anchors.fill: parent
236- visible: key.currentlyPressed
237+ visible: key.currentlyPressed || key.highlight
238 source: key.imgPressed
239 }
240
241
242=== modified file 'qml/keys/LanguageKey.qml'
243--- qml/keys/LanguageKey.qml 2014-10-24 14:18:34 +0000
244+++ qml/keys/LanguageKey.qml 2015-01-12 17:59:45 +0000
245@@ -17,8 +17,6 @@
246 import QtQuick 2.0
247
248 ActionKey {
249- property bool switchBack: false // Switch back to previous layout without showing menu
250-
251 iconNormal: "language-chooser";
252 iconShifted: "language-chooser";
253 iconCapsLock: "language-chooser";
254@@ -36,7 +34,8 @@
255 if (maliit_input_method.useHapticFeedback)
256 pressEffect.start();
257
258- if (switchBack && panel.previousLanguage) {
259+ if (panel.switchBack && panel.previousLanguage) {
260+ panel.switchBack = false;
261 maliit_input_method.activeLanguage = panel.previousLanguage
262 } else {
263 panel.previousLanguage = maliit_input_method.activeLanguage

Subscribers

People subscribed via source and target branches