Commit graph

33096 commits

Author SHA1 Message Date
Keyman Build Agent
7faf71d1a8 auto: increment master version to 15.0.204 2022-02-26 13:02:45 -05:00
Steven R. Loomis
b0b1bd50a7
Merge pull request #6291 from keymanapp/srl295/issue6290
chore(common): remove rust (for now!) 🦀
2022-02-25 17:40:26 -06:00
Marc Durdin
967fe24a1e fix(ios): selection should be utf-16 not scalar 2022-02-25 16:53:59 +11:00
Marc Durdin
e0bba0da02 fix(android): count number of surrogate pairs correctly when deleting
The system keyboard, when deleting-left, would not count the number of
surrogate pairs correctly in the text to delete. This would often leave
it deleting half a surrogate pair.

Rather than change the countSurrogatePairs function, I opted to write
this inline. The countSurrogatePairs function is used elsewhere, it
appears correctly.
2022-02-25 16:05:51 +11:00
Marc Durdin
e7be5f62a4 fix(android): ignore delete-left if selection exists in-app
If there is an active selection, we delete the selection before
inserting text. In this case, we also ignore the deleteLeft value coming
from KeymanWeb, so we won't delete twice.

Note: in the future, we will hopefully refactor this to use
OutputTarget, which will change the way this function works and will
probably clean up some of the spaghetti.
2022-02-25 16:04:05 +11:00
Marc Durdin
7273028192 chore(web): add unit test for selection and matching rule 2022-02-25 15:06:11 +11:00
Steven R. Loomis
3658efa5f1 chore(common): remove rust (for now!) 🦀
Fixes #6290
2022-02-24 17:34:23 -06:00
Marc Durdin
c331758ec1 chore: address review suggestions 2022-02-25 08:52:20 +11:00
Marc Durdin
b1ba2d24d7 chore: enable all test cases 2022-02-25 08:47:14 +11:00
Keyman Server
7f3cd94daf
Merge pull request #6289 from keymanapp/auto/version-master-15.0.203
auto: increment master version to 15.0.203
2022-02-25 05:03:41 +11:00
Keyman Build Agent
40df30749c auto: increment master version to 15.0.203 2022-02-24 13:02:56 -05:00
Eberhard Beilharz
e5b9b81806
fix(linux): Gracefully handle makedirs failures
This change catches the exception we're getting if we try to create
a directory but e.g. there is already a file with that name. In this
case we now output an error message. This change also gracefully
handles failures when linking files.

Fixes #6285.
2022-02-24 18:13:03 +01:00
Eberhard Beilharz
3c8983037d
fix(linux): Gracefully handle keyboard download failure
In the past we already gracefully handled keyboard download failures
when the user triggered the download from the km-config UI. This
change deals with the command line side of things, most often when
the user clicks on the "Install keyboard" button on keyman.com. If
the download fails we already output an error message and now don't
try to install the non-existing .kmp file.

Fixes #6284.
2022-02-24 17:38:23 +01:00
Eberhard Beilharz
65743bcd90
Merge pull request #6278 from keymanapp/fix/linux/6182-versions
fix(linux): Properly compare versions in km-package-install
2022-02-24 16:57:49 +07:00
rc-swag
9eadbd6425
Merge pull request #6211 from keymanapp/fix/core/6204/capslock-key-state-ignored
fix(common/core/desktop): Add num and scroll lock mask to VKeyToChar
2022-02-24 17:46:57 +10:00
Marc Durdin
bf2270aa69 chore(web): add smp tests for text selection 2022-02-24 15:59:16 +11:00
Marc Durdin
6ba75c54f5 chore(web): disable text selection tests on mobile 2022-02-24 14:14:15 +11:00
Darcy Wong
f2ee3e6275
Merge pull request #6226 from keymanapp/chore/fv/keyboards-csv-languages
chore(oem/fv): Add keyboard version and languages
2022-02-24 07:59:11 +07:00
Marc Durdin
b58ce45ef7 fix(web): add Input text selection tests 2022-02-24 11:29:34 +11:00
Marc Durdin
9b84af8a2f fix(web): add unit tests for selection
This adds a set of unit tests for the TextArea element, initially, to
verify that selection and context are working as expected.
2022-02-24 11:25:21 +11:00
Marc Durdin
862c1f2733
Merge pull request #6262 from keymanapp/chore/codeowners
chore(common): Add CODEOWNERS file
2022-02-24 08:20:13 +11:00
Marc Durdin
a265876ab2
Merge pull request #6246 from srl295/srl295/onboard
feat(common): echo in macos.sh setup script
2022-02-24 08:19:53 +11:00
Eberhard Beilharz
e47ff34587
chore(linux): Improve message when updating to a newer version
When trying to install a keyboard with `km-package-install` and
the same version was already installed or a newer version was
available and would be installed we now output a simple message
instead of an error.
2022-02-23 17:03:00 +01:00
Marc Durdin
2bfe63db2f fix(ios): properly handle selection
Relates to #5853

This deals with deleting the selection with the new interface for
KeymanWeb. It also ensures that the selection is always correctly sent
to KeymanWeb.
2022-02-23 19:46:56 +11:00
Marc Durdin
5c687559fe chore(ios): separate ios-host.js
This is part of the fix chain for #5853. Split ios-host.js out from
keyboard.html in order to make it easier to debug and mock. No changes
to the content of the sscript, just moving it here.
2022-02-23 15:48:47 +11:00
Marc Durdin
9ba4b9645c fix(android): further selection tweaks 2022-02-23 15:16:23 +11:00
Marc Durdin
c389ad0df8 fix(android): selection on Android
Part of #5853.

Building on the fixes in KeymanWeb, we do similar patches for Android.
2022-02-23 15:16:21 +11:00
Marc Durdin
4d37fd0a5b chore(android): separate android-host.js
This is part of the fix chain for #5853. Split android-host.js out from
keyboard.html in order to make it easier to debug and mock. No changes
to the content of the script, just moving it here.
2022-02-23 15:15:22 +11:00
Marc Durdin
003665b6df chore(web): disable legacy edge testing
Legacy edge struggles with selection direction. We
no longer support it anyway, so disable testing.
2022-02-23 15:13:10 +11:00
Marc Durdin
b05fda1c6a fix(web): selection direction and tests
Selection direction was not maintained in mutations, which could have
unexpected consequences. Added support for selection direction to input
and textarea.

The functions `getTextBeforeCaret()` and `getTextAfterCaret()` are named
somewhat incorrectly, as they actually get the text before and after the
active selection (and a collapsed zero-length selection is equivalent to
the caret). It would be worth renaming these in a future refactor.

This PR fixes the unit tests so that caret position is tested correctly
with an active selection -- the caret can be at either the start or the
end of the selection, corresponding with the direction in which the user
originally selected the text. It also fixes the assumptions around the
above named functions for `input` and `textarea` types.

Note that selection interactions are still buggy with prediction
selections; these bugs were present in 15.0.118-alpha and I will tackle
them in an upcoming commit.
2022-02-23 15:13:07 +11:00
Marc Durdin
4bcfe37432 chore: add khmer_angkor to web test pages 2022-02-23 15:13:02 +11:00
Marc Durdin
cacbbee5cc fix(web): properly handle selection
Relates to #5853 and others.

Selection management was not working properly with the various
OutputTargets:

1. When there is a non-empty selection, rules have no context -- it's
   like new text.
2. Backspace over a selection deletes just the selection.
3. Typing a character replaces the selection, of course, and collapses
   the caret to the end of the new text.
4. `hasSelection` is a very strange name for `OutputTarget` descendants.
   It doesn't mean "has an active selection" but rather, kinda means
   "supports selection internally".
5. Added `isSelectionEmpty` which is used for some of the new selection
   rules above.

Note that the `touchAlias` OutputTarget class does not currently support
selection. I hope we can deprecate `touchAlias` with the use of
`inputMode` (#3030) in the future, rather than adding support for
selection.
2022-02-23 15:12:58 +11:00
Marc Durdin
addcad9f76 fix(web): further selection tweaks to mocks 2022-02-23 15:12:23 +11:00
Marc Durdin
6315d61ad9 chore(web): note chrome mobile emulation req
For android-harness, it must run in Chrome mobile emulation.
2022-02-23 08:30:59 +11:00
Eberhard Beilharz
96ae4387ef
fix(linux): Properly compare versions in km-package-install
This change will fix a bug with comparing version numbers with more
than two sections (e.g. '1.2.3').

Fixes #6182.
2022-02-22 20:03:49 +01:00
Marc Durdin
ac2cc93f2a fix(web): add readonly mode for rule behavior finalization
Relates to #5853.

Two things happened here:

1. Construction of Mocks made an assumption that the selection should
   always be deleted (outputTarget.ts:363). However, for NewContext and
   PostKeystroke processes, we don't want to change anything.

2. Even if nothing is changed, the transcription would emit what is
   in theory a no-op ruleTransform (insert="", deleteLeft=0,
   deleteRight=0). But apps would treat this as deleting the selection.

This fix goes a little broader than I would have preferred, but adds a
readonly mode to the transcription and mock model, so that we can
control explicitly when changes are applied to the text store.
2022-02-22 10:42:20 +11:00
Marc Durdin
6cd0f5d49a chore: add web_context_tests keyboard 2022-02-22 10:41:42 +11:00
Marc Durdin
c1c6c8ac84 feat(android): Android web-based test harness
This small harness simulates the Android app. I used it to try and
dig deeper into the interactions with selected text in #5853.

It is very rough, but with some extra effort we could use this
relatively easily for some low-level testing of KeymanWeb embedded
integration.
2022-02-22 10:38:20 +11:00
Keyman Server
a49261d8c0
Merge pull request #6271 from keymanapp/auto/version-master-15.0.202
auto: increment master version to 15.0.202
2022-02-22 05:03:02 +11:00
Keyman Build Agent
de8a1fe220 auto: increment master version to 15.0.202 2022-02-21 13:02:21 -05:00
Eberhard Beilharz
f22dfe608b
Merge pull request #6241 from keymanapp/fix/linux/6240-man
fix(linux): Fix stray `[-vv]` in man pages
2022-02-21 15:46:20 +07:00
Marc Durdin
757b6a3e09
Merge pull request #6259 from keymanapp/fix/developer/6209-npm-publish-alpha-to-stable
fix(developer): npm publish with correct tier
2022-02-21 06:25:02 +07:00
Keyman Server
5399d9c151
Merge pull request #6266 from keymanapp/auto/version-master-15.0.201
auto: increment master version to 15.0.201
2022-02-21 05:03:27 +11:00
Keyman Build Agent
149fba62b6 auto: increment master version to 15.0.201 2022-02-20 13:02:45 -05:00
Darcy Wong
d62ea401a8
Merge pull request #6263 from keymanapp/chore/common/crowdin-fr-2
chore(common): Update French strings
2022-02-20 05:34:25 +07:00
Keyman Server
f4212c8bfe
Merge pull request #6264 from keymanapp/auto/version-master-15.0.200
auto: increment master version to 15.0.200
2022-02-19 05:13:54 +11:00
Keyman Build Agent
10e7e4a4c4 auto: increment master version to 15.0.200 2022-02-18 13:13:14 -05:00
Eberhard Beilharz
31170e8f94 fix(linux): Fix stray [-vv] in man pages
Additionally, don't print the date in the footer. This often overlaps
with the program name and version.

Also print usage in addition to error if wrong arguments are given.

Fixes #6240.
2022-02-18 14:15:17 +07:00
Darcy Wong
3237a4c6ae chore(common): Update French strings 2022-02-18 10:06:33 +07:00
Marc Durdin
35dc7b89bb
Merge pull request #6248 from keymanapp/fix/web/non-integer-cached-osk-size
fix(web): Non-integer OSK sizes
2022-02-18 11:17:38 +11:00