Commit graph

4659 commits

Author SHA1 Message Date
Marc Durdin
055aa37925 fix(common): declare dep on @keymanapp/ldml-keyboard-constants
Fixes: #12470
2024-09-26 09:37:49 -07:00
Marc Durdin
44e28e21a6 fix(developer): check vars string usage before definition
Validation of vars was not properly checking for forward references to
string variables. This, coupled with a null vs undefined bug in
subsequent use, meant that forward reference variables were ending up
with a literal string value of 'undefined'.

This also fixes the test for visual-keyboard-compiler, where the fixture
was actually buggy and was the trigger for investigating this problem.

Fixes: #12403
Relates-to: #12395
2024-09-12 10:05:13 +07:00
Marc Durdin
91cd73602a fix(developer): rwrite ldml visual keyboard compiler
The visual keyboard compiler was never finished in 17.0. This rewrites
it to:

1. Use the kmxplus data rather than reading from xml directly
2. Fill in `visualkeyboard.header.kbdname`
3. Support modifiers
4. Handle encoded characters like `\u{1234}`
5. Handle string variables like `${one}`*

Additional unit tests have been added to verify the behavior of the
visual keyboard compiler in more detail.

* String variable tests will be enabled in next commit (which is a
cherry-pick of #12404).

Other fixes:

1. The LDML XML reader was relying on its input being a Node.js `Buffer`
   even though it was declared `Uint8Array`, as it implicitly used
   `Buffer.toString()` to do text conversion. (`Buffer` subclasses from
   `Uint8Array`). This breaks when using `Uint8Array` directly and means
   we had an implicit dependency on Node.js. See also #12331.
2. XML errors were not captured in the LDML XML reader. See also #12331.
3. The unused and unfinished touch-layout-compiler.ts and
   keymanweb-compiler.ts have been removed along with corresponding unit
   tests and fixtures. These will be replaced by Core implementations;
   see #12291.

Fixes: #12395
Cherry-pick-of: #12402
2024-09-12 10:02:18 +07:00
Joshua A. Horton
b644291211 chore(web): Revert "fix(web): OSK now checks pred-text state on init"
This reverts commit 7466b82893.
2024-07-27 06:38:25 +07:00
Joshua A. Horton
469e1037d7 change(web): better div-by-zero fudge factor for fat-fingering 2024-06-25 13:58:31 +07:00
Joshua A. Horton
c14480505b chore(web): Merge branch 'stable-17.0' into change/web/cherry-pick/after-word-whitespace-check 2024-06-19 08:51:30 +07:00
Joshua A. Horton
a620ff30f4 change(web): change after-word whitespace check to be more selective
Now only skips emitting the after-word text if it is the immediate prefix of the current right-hand context.

Fixes: #5256
Cherry-pick-of: #11800
2024-06-19 08:07:15 +07:00
Marc Durdin
e56472d9b2 fix(developer): check HISTORY.md to get last modified date for keyboard_info and model_info
This updates the calculation of the lastModifiedDate property of the
.keyboard_info and .model_info file. It now looks for the most recent
commit to HISTORY.md, and then falls back to the project folder for
.keyboard_info and .model_info.

getLastGitCommitDate now also returns UTC date (it was giving TZ=0
which is affected by daylight saving), and works for a file rather than
just for a folder, and a corresponding unit test has been added.

The date strings returned will now always include '.000' msec suffix. I
have manually verified that the import into the api.keyman.com database
copes with this, and that this change still conforms to the expected
schema for .keyboard_info and .model_info files.

Last, but important, it turned out that the unit tests for kmc were not
running. This has been resolved in kmc/build.sh.

Fixes: #11793
Cherry-pick-of: #11805
2024-06-18 07:38:04 +10:00
Joshua A. Horton
ec50747d09 change(android): removes unneeded conditionals 2024-06-07 14:25:30 +07:00
Joshua A. Horton
c8e36ace78 fix(web): array.from polyfill scoping, fixes after extracted test 2024-06-07 14:04:41 +07:00
Joshua A. Horton
a4a5ac2f60 fix(web): add limited Array.from polyfill for lm-worker use
Fixes: #11502
Fixes: KEYMAN-WEB-K4
Cherry-pick-of: #11732
2024-06-07 12:02:17 +07:00
Eberhard Beilharz
9c4b5cb19d
fix(web): Don't apply suggestion unless fully configured
We can't really apply a suggestion unless we have the configuration object
(that provides the context).

Cherry-pick-of: #11594
Fixes: #11593
Fixes: KEYMAN-WEB-FX
Co-authored-by: Joshua Horton <joshua_horton@sil.org>
2024-05-31 11:16:59 +02:00
Joshua Horton
1a5a82417c
Merge pull request #11619 from keymanapp/fix/web/cherry/sentry-report-null-debug-info
fix(web): add null guard for missing debug info when reporting to Sentry 🍒 🏠
2024-05-31 13:09:23 +07:00
Joshua Horton
0115fcb474
Merge pull request #11616 from keymanapp/fix/web/cherry/kbd-doc-generation
fix(web): correctly handle cross-origin stylesheets when calculating keyboard size and key cap font size 🍒  🏠
2024-05-31 13:09:08 +07:00
Joshua A. Horton
dc759f29d8 fix(web): null guard missing debug info when reporting to Sentry
Fixes: #11548
Cherry-pick-of: #11579
2024-05-30 13:55:20 +07:00
Joshua A. Horton
036fb5e5e0 fix(web): fixes kbd-help documentation for help.keyman.com
Cherry-pick-of: #11472
Fixes: #11467
2024-05-30 13:28:54 +07:00
Marc Durdin
3efe9c3204 fix(developer): make top row of Character Map 1 pixel to avoid DIV/0 in gestures
An apparent issue in the Grid control in Delphi is that if the top row
is zero pixels high (hiding it), a pan gesture on touchscreen causes an
EDivByZero. This patch works around the issue by making the top row 1
pixel high.

Fixes: #11589
Fixes: KEYMAN-DEVELOPER-1C3
Fixes: KEYMAN-WINDOWS-43C
Cherry-pick-of: #11590
2024-05-28 14:29:16 +07:00
Joshua Horton
e8c7f525b7
Merge pull request #11321 from keymanapp/fix/web/gesture-model-failure-handling 2024-05-01 07:52:15 +07:00
Joshua A. Horton
725b973bfd chore(web): removes old doc that has completed its purpose 2024-04-30 09:31:15 +07:00
Joshua A. Horton
068437d818 fix(web): also prevent path-update crashes from causing issues 2024-04-30 09:14:08 +07:00
Joshua A. Horton
3ff7664ca2 fix(web): invalid initial-state aborts further model processing 2024-04-30 09:06:31 +07:00
Joshua A. Horton
456ab70322 fix(web): failed gesture-model spinup should not lock the gesture engine 2024-04-30 09:06:30 +07:00
Marc Durdin
d019707a65
Merge pull request #11244 from keymanapp/fix/developer/11199-export-osk-without-keyman-installed
fix(developer): support export of visual keyboard when Keyman for Windows not installed
2024-04-26 17:08:58 +10:00
Marc Durdin
571fbb6c50 fix(developer): don't include DTD in visual keyboard export
The DTD reference at tavultesoft.com is no longer valid. In order for
the .xml file to be parseable, we need to remove the DTD reference. This
resolves the issue where the emitted .html file is blank, and adds an
additional step of verifying that the .xml file loads successfully in
the XML to HTML transform.
2024-04-26 10:07:01 +07:00
Marc Durdin
85fccb35f6
Merge pull request #11269 from keymanapp/fix/developer/11233-ne-plus-ultra
fix(developer): keep escaped plus-sign escaped 🙀
2024-04-22 23:42:57 +10:00
Joshua A. Horton
ace7474428 fix(web): fixes pred-text unit test instability 2024-04-22 15:40:37 +07:00
Joshua Horton
122351bea4
Merge pull request #11277 from keymanapp/feat/web/gesture-engine-history
feat(web): add recent-history log to gesture engine
2024-04-22 15:29:44 +07:00
Marc Durdin
a8f5f561e0
Merge pull request #11243 from keymanapp/fix/developer/11193-emit-json-strings-as-chars
fix(developer): emit JSON strings as characters, not surrogate pairs
2024-04-22 14:17:34 +10:00
Joshua A. Horton
7bf6826a64 feat(web): adds recent-history log to gesture engine + clean JSON version 2024-04-22 10:57:37 +07:00
Steven R. Loomis
f0ff05a9a9 fix(developer): escape plus sign
Fixes: #11233
2024-04-19 13:58:31 -05:00
Joshua Horton
09a65a497b
Merge pull request #11174 from keymanapp/change/web/init-osk-with-keyboard
change(web): initializes OSK with keyboard if available during init 🪠
2024-04-19 12:41:48 +07:00
Marc Durdin
89773e13de fix(developer): support export of visual keyboard when Keyman for Windows not installed
Fixes #11199.
2024-04-18 10:26:06 +07:00
Joshua A. Horton
006151f054 fix(web): longpress cancellation on extra touch should not cancel the extra touch 2024-04-18 10:15:22 +07:00
Marc Durdin
2d6ab45f9a fix(developer): emit JSON strings as characters, not surrogate pairs
Fixes #11193.

The JSON pretty-printed format in Delphi would emit strings with
surrogate pairs as e.g. "\uD801\uDDB0" instead of the character. This
change uses TStringBuilder which emits the characters cleanly.
2024-04-18 09:20:40 +07:00
Joshua A. Horton
b107daab22 chore(web): Merge branch 'beta' into change/web/init-osk-with-keyboard 2024-04-18 08:15:30 +07:00
Joshua Horton
500533925f
Merge pull request #11232 from keymanapp/fix/web/no-selection-clear-on-caps-multitap 2024-04-17 17:43:01 +07:00
Joshua Horton
026cef2e44
Merge pull request #10953 from keymanapp/fix/ios/sample-builds
fix(ios): sample build script --debug detection
2024-04-17 11:56:32 +07:00
Joshua A. Horton
fb127e761b fix(web): more robustness in case of deadkeys 2024-04-17 10:33:16 +07:00
Joshua A. Horton
0c8f520e2a fix(web): prevents selection-clear for pure layer-switching multitaps 2024-04-17 10:17:28 +07:00
Marc Durdin
29420f7af9
Merge pull request #11214 from keymanapp/chore/developer/recognize-keyboard3-xml
chore(developer): use keyboard3 tag rather than DTD to identify LDML keyboard xml files
2024-04-13 08:22:46 +10:00
Marc Durdin
41e16b3c5f chore(developer): use keyboard3 tag rather than DTD to identify LDML keyboard xml files
Relates to #10469. Apply same test in kmc that we are using in TIKE.
2024-04-12 06:49:43 +10:00
Joshua Horton
d075c8f192
Merge pull request #11189 from keymanapp/fix/web/quick-multitap-modipress-use
fix(web): blocks nextLayer for keys quickly typed when multitapping to new layer when final tap is held
2024-04-10 14:33:26 +07:00
Joshua A. Horton
7466b82893 fix(web): OSK now checks pred-text state on init 2024-04-10 11:04:56 +07:00
Joshua Horton
966d894d0d
Merge pull request #11142 from keymanapp/change/web/gesture-event-queue-polish
change(web): merges split async method in gesture engine 🪠
2024-04-10 10:29:41 +07:00
Joshua A. Horton
75bde80a05 fix(web): quick multitap-modipress use 2024-04-08 14:44:32 +07:00
Joshua Horton
eeac2b5b2b
Merge pull request #11164 from keymanapp/fix/common/models/suggestions-after-multi-whitespace
fix(common/models): suggestion stability after multiple whitespaces
2024-04-05 10:59:46 +07:00
Joshua A. Horton
3a3d2a8177 change(web): merges split async method in gesture engine 2024-04-05 10:47:31 +07:00
rc-swag
d711856f72
Merge pull request #11152 from keymanapp/fix/windows/11005/decode-uri-packageid
fix(windows): decode uri for Package ID and filename
2024-04-05 12:57:54 +10:00
Joshua A. Horton
db9e80776f fix(common/models): suggestion stability after multiple whitespaces 2024-04-04 14:58:51 +07:00
rc-swag
653cb3b4b3 fix(windows): ditch the Indy library use own URLDecode 2024-04-04 14:26:23 +10:00