Commit graph

1801 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 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
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
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
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
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
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 A. Horton
3a3d2a8177 change(web): merges split async method in gesture engine 2024-04-05 10:47:31 +07:00
Joshua A. Horton
db9e80776f fix(common/models): suggestion stability after multiple whitespaces 2024-04-04 14:58:51 +07:00
Joshua Horton
769b6118f6
Merge pull request #10960 from keymanapp/fix/web/queued-closure-source-linking
fix(web): proper linkage of sources to events 🪠
2024-04-03 09:22:29 +07:00
Joshua Horton
d999877d8e
Merge pull request #10843 from keymanapp/change/web/input-sequentialization
change(web): input-event sequentialization 🪠
2024-04-03 09:22:23 +07:00
Joshua Horton
23cfb11eea
Merge pull request #10840 from keymanapp/fix/web/proper-gesture-match-sequencing
fix(web): proper gesture-match sequencing 🪠
2024-04-03 09:22:16 +07:00
Joshua Horton
5e30fa76b7
Merge pull request #10838 from keymanapp/fix/web/infinite-model-replacement-loop
fix(web): infinite model-match replacement looping 🪠
2024-04-03 09:22:09 +07:00
Joshua Horton
cde3807d79
Merge pull request #10836 from keymanapp/fix/web/early-matchGesture-abort
fix(web): early gesture-match abort when unable to extend existing gestures 🪠
2024-04-03 09:22:03 +07:00
Steven R. Loomis
5b1c853557 fix(common,core): support other lookup for modifiers
- the 'other' keyword was incorrectly called 'default'

Fixes: #11072
2024-04-01 23:21:33 -05:00
Steven R. Loomis
5615a5eb4c chore(common): add more references to 0x10000
- at least add comments pointing back to keyman_core_ldml.ts

Fixes: #11072
2024-04-01 12:26:00 -05:00
Marc Durdin
26e99047b6
Merge pull request #11110 from keymanapp/fix/common/11084-isemptytransform-nullish-is-empty
fix(common): make `isEmptyTransform` return true if passed a nullish transform
2024-03-29 15:23:22 +11:00
Marc Durdin
4e403e9374
Merge pull request #11032 from keymanapp/fix/web/7866-layer-switch-key-deletes-selection
fix(web): prevent layer switch key from erasing selection
2024-03-29 15:22:58 +11:00
Steven R. Loomis
5f836d72f0
Merge pull request #11059 from keymanapp/fix/core/11045-assert-marker
fix(core,developer): variable/marker substitution in sets and strings🙀
2024-03-28 00:11:28 -05:00
Marc Durdin
1bc5db3527 fix(common): make isEmptyTransform return true if passed a nullish transform
Fixes #11084.
2024-03-28 10:45:08 +07:00
Joshua A. Horton
75dff78a30 chore(web): Merge branch 'change/web/input-sequentialization' into fix/web/queued-closure-source-linking 2024-03-27 09:48:17 +07:00