Commit graph

14457 commits

Author SHA1 Message Date
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
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
Keyman Server
49d0b18dbe
Merge pull request #6260 from keymanapp/auto/version-master-15.0.199
auto: increment master version to 15.0.199
2022-02-14 05:03:38 +11:00
Keyman Build Agent
93c19d9adb auto: increment master version to 15.0.199 2022-02-13 13:02:58 -05:00
Marc Durdin
3a3736abaa fix(developer): npm publish with correct tier
Fixes #6209.

Regression introduced in #6073. Cleanup of tier information in these
build scripts accidentally also deleted the setup of npm_dist_tag
variable.
2022-02-13 14:18:42 +07:00
Darcy Wong
4af57b2c35
Merge pull request #6234 from keymanapp/chore/android/globe-whatsnew
chore(android/app): Clarify help on switching keyboards
2022-02-13 08:29:43 +07:00
Marc Durdin
ee14b17b12
Merge pull request #6145 from keymanapp/fix/developer/5992-package-fileversion-from-keyboard-fileversion
fix(developer): compile package fileVersion from keyboard FileVersion
2022-02-13 10:48:25 +11:00
Keyman Server
39b095943f
Merge pull request #6251 from keymanapp/auto/version-master-15.0.198
auto: increment master version to 15.0.198
2022-02-13 05:04:08 +11:00
Keyman Build Agent
a1e1ab86c0 auto: increment master version to 15.0.198 2022-02-12 13:03:29 -05:00
Marc Durdin
eb21375553
Merge pull request #6230 from keymanapp/fix/developer/support-km_kbp_it_capslock
fix(developer): support KM_KBP_IT_CAPSLOCK
2022-02-12 23:18:24 +11:00
Marc Durdin
5f81a5625f
Merge pull request #6225 from keymanapp/fix/windows/cherry-pick/6221-system-profile-wow64-patch
fix(windows): create Keyman/Diag folder in redirected profile 🍒
2022-02-12 23:17:43 +11:00
Marc Durdin
da5d00c284 fix(web): Non-integer OSK sizes
If the OSK had a non-integer width or height stored in the OSK cookie,
then the width and height would be parsed incorrectly and the OSK would
fail to be sized correctly on first load; this also caused a script
error and made the OSK impossible to interact with.
2022-02-12 19:06:12 +07:00
Marc Durdin
96277a46a2
Merge pull request #6236 from keymanapp/dependabot/npm_and_yarn/web/testing/regression-tests/karma-6.3.14
chore(deps-dev): bump karma from 6.3.4 to 6.3.14 in /web/testing/regression-tests
2022-02-12 20:41:47 +11:00
Marc Durdin
9e11341d28
Merge pull request #6247 from keymanapp/dependabot/npm_and_yarn/web/testing/regression-tests/follow-redirects-1.14.8
chore(deps): bump follow-redirects from 1.7.0 to 1.14.8 in /web/testing/regression-tests
2022-02-12 20:38:21 +11:00
dependabot[bot]
46d0e7dc98
chore(deps): bump follow-redirects in /web/testing/regression-tests
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.7.0 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.7.0...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-12 08:05:59 +00:00
dependabot[bot]
187f77a121
chore(deps-dev): bump karma in /web/testing/regression-tests
Bumps [karma](https://github.com/karma-runner/karma) from 6.3.4 to 6.3.14.
- [Release notes](https://github.com/karma-runner/karma/releases)
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.4...v6.3.14)

---
updated-dependencies:
- dependency-name: karma
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 18:03:53 +00:00
Keyman Server
4dfd0f71f3
Merge pull request #6242 from keymanapp/auto/version-master-15.0.197
auto: increment master version to 15.0.197
2022-02-12 05:03:03 +11:00
Keyman Build Agent
be12166f49 auto: increment master version to 15.0.197 2022-02-11 13:02:23 -05:00
rc-swag
e89924290c
Merge pull request #6219 from keymanapp/fix/windows/6205/handle-single-parse-tsf
fix(windows): add flag to track core process event
2022-02-11 11:18:30 +10:00
Darcy Wong
4ed1e04d26 chore(android/app): Clarify help on switching keyboards 2022-02-10 15:54:23 +07:00
Ross
d5e228d6cc fix(windows): update comment remove casts 2022-02-10 11:48:06 +10:00
Marc Durdin
74295681e6 fix(developer): support KM_KBP_IT_CAPSLOCK
Keyman Developer Debugger would crash due to receiving an unknown action
type. This turned out to be the new KM_KBP_IT_CAPSLOCK.

Crash report: https://sentry.io/share/issue/50c09af4a0ab424784d9d2189b492bd5/
2022-02-10 10:44:50 +11:00
Keyman Server
7e43e3782d
Merge pull request #6229 from keymanapp/auto/version-master-15.0.196
auto: increment master version to 15.0.196
2022-02-10 05:03:24 +11:00
Keyman Build Agent
dd1fbe1cac auto: increment master version to 15.0.196 2022-02-09 13:02:42 -05:00
Marc Durdin
a71e2f8a4a chore(windows): add comment 2022-02-09 15:03:41 +11:00
Marc Durdin
60390ed08b fix(windows): create Keyman/Diag folder in redirected profile
Fixes #6221.

If Keyman is being installed under the SYSTEM profile, e.g. when using
tools such as SCCM or Intune, then the installer runs with a redirected
folder for %LocalAppData%, under C:\Windows\SysWow64\config, but is
given the name C:\Windows\System32\config\....

Keyman Setup then creates %LocalAppData%\Keyman\Diag, which it thinks is
in C:\Windows\System32\config\... But in reality it is in SysWow64\...
Keyman Setup passes a file under this folder to Windows Installer,
running as 64 bit, which immediately falls over because the path does
not exist to it, in the real System32\config folder.

This patch disables redirection temporarily just to create the folder
under both 32 and 64 bit versions of the profile. It has no effect on
normal user accounts (apart from verifying that the folder is present
twice rather than once).
2022-02-09 15:03:38 +11:00
Darcy Wong
000da34969
Merge pull request #6223 from keymanapp/fix/android/gradle-listener
chore(android): Upgrade gradle-wrapper version to 6.8
2022-02-09 10:02:05 +07:00
Darcy Wong
8c9014ced9 chore(android): Upgrade gradle-wrapper version to 6.8 2022-02-09 08:59:56 +07:00
Keyman Server
6c06b04735
Merge pull request #6220 from keymanapp/auto/version-master-15.0.195
auto: increment master version to 15.0.195
2022-02-09 05:03:36 +11:00
Keyman Build Agent
6eaf6487d1 auto: increment master version to 15.0.195 2022-02-08 13:02:53 -05:00
Eberhard Beilharz
dd5c56ce12
Merge pull request #6109 from keymanapp/feat/linux/ibusrestart
feat(linux): Try to start ibus if not running
2022-02-08 18:04:24 +01:00
Darcy Wong
9972747542
Merge pull request #6206 from keymanapp/feat/android/globe-single-keyboard
feat(android/engine): Single tap globe switch to previous system IME
2022-02-08 20:20:08 +07:00