Commit graph

410 commits

Author SHA1 Message Date
Eberhard Beilharz
03831e4f25
fix(web): clarify meaning of parameters for isMatch 2025-11-07 13:47:23 +01:00
Eberhard Beilharz
98ed960c8f
fix(web): address code review comments 2025-11-07 13:22:45 +01:00
Eberhard Beilharz
28d3378589
fix(web): add unit tests for DeadkeyTracker and fix a few bugs
- initialize `Deadkey.matched` in c'tor
- fix `Deadkey.equal` method
- verify deadkey exists before removing it in `DeadkeyTracker.remove`
- add unit tests for DeadkeyTracker

Test-bot: skip
2025-11-07 12:09:54 +01:00
Darcy Wong
238094c4e6 fix(web): Use build/test-resources/keyboards path for web test page 2025-10-31 11:25:32 +07:00
Darcy Wong
3872f57cbf fix(common): Update references to test9469 keyboard 2025-10-30 13:03:09 +07:00
Darcy Wong
66b5aeb614 chore(common): Move test9469 keyboard to common/test/keyboards/ 2025-10-30 11:56:07 +07:00
Darcy Wong
02619c2ef5 fix(web): Update manual test page to use common platformtest.js 2025-10-28 11:31:13 +07:00
Darcy Wong
00b6c71eb4 fix(web): Create test-resources/keyboards dir 2025-10-24 10:09:46 +07:00
Darcy Wong
616092e0f7 fix(web): Copy common keyboards to test-resources 2025-10-24 09:08:31 +07:00
Darcy Wong
4bff2c81d5 chore(web): Update web test page reference to chirality.js 2025-10-22 06:53:29 +07:00
Darcy Wong
d0ea16b975 chore(web): Move chirality.js to common/test/resources/keyboards/ 2025-10-21 13:49:37 +07:00
Eberhard Beilharz
f464008326
fix(web): add check to internalHeight
The same error could potentially happen in `internalHeight`, so we
add the check for NaN there as well. Addresses code review comments.
2025-09-05 09:35:50 +02:00
Eberhard Beilharz
74ef39726b
fix(web): fix error trying to calculate style scaling effects
PR #13860 fixed a similar error by adding a check for NaN. However, it
missed doing it for `layoutWidth` and only changed `layoutHeight`. This
PR adds a similar check to `layoutWidth` and will thus fix the error
we're still seeing in Sentry.

Also add unit tests for both methods.

User Testing
============

TEST_INUKTITUT_KEYBOARD: Using Keyman for Android, install the
`inuktitut_pirurvik` and verify that no error notifications appear.

Fixes: #14108
Fixes: [KEYMAN-WEB-RA](https://keyman.sentry.io/issues/6579536471/?referrer=github_integration)
2025-09-04 17:28:15 +02:00
Joshua Horton
191db9cba9
Merge pull request #14618 from keymanapp/refactor/web/simplify-calculation-inputs
refactor(web): simplify edit-distance calculation-object inputs
2025-09-03 22:11:00 +07:00
Joshua Horton
770ac2a13f
Merge pull request #14592 from keymanapp/feat/web/search-subset-batching
feat(web): batch correction-search paths by related subsets
2025-09-03 22:10:46 +07:00
Joshua Horton
6969206701
Merge pull request #14581 from keymanapp/feat/web/transform-cataloging
feat(web): adds transform cataloging methods to predictive-text worker
2025-09-03 22:10:38 +07:00
Eberhard Beilharz
3e3cccc97d
Apply suggestions from code review
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
2025-09-03 08:42:39 +02:00
Eberhard Beilharz
f166f11d14
docs(common): update docs Keyman Desktop → Keyman for Windows
Also change path to engine help pages. This requires a corresponding
change in help.keyman.com.

Test-bot: skip
2025-09-02 14:29:53 +02:00
Joshua Horton
6d991eeecc
fix(web): Apply unit-test suggestions from code review
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2025-08-28 22:46:58 +07:00
Joshua Horton
1942309356 feat(web): add unit test for empty-char inputs, matches 2025-08-28 09:15:47 -05:00
Joshua Horton
d9aebf0213 Merge branch 'feat/web/search-subset-batching' into refactor/web/simplify-calculation-inputs 2025-08-28 09:10:11 -05:00
Joshua Horton
26c787d24d fix(web): improve unit-test setup assertions 2025-08-28 09:07:58 -05:00
Joshua Horton
82c35d0b97 refactor(web): simplify calculation-object inputs 2025-08-27 16:40:45 -05:00
Joshua Horton
0c85d0e4fa Merge branch 'feat/web/transform-cataloging' into feat/web/search-subset-batching 2025-08-25 10:54:28 -05:00
Joshua Horton
e0928b2b20 feat(web): add unit tests interacting with search-term keying 2025-08-25 10:41:50 -05:00
Joshua Horton
23d682e5e2 feat(web): adds delete, substitution path unit tests for starting mid-word 2025-08-25 10:16:30 -05:00
Joshua Horton
80194c022f fix(web): restore search-iteration unit tests 2025-08-25 09:08:42 -05:00
Joshua Horton
2fb96709f3 feat(web): implement search-node clone-constructor unit tests 2025-08-25 08:49:11 -05:00
Joshua Horton
aa9df34623 feat(web): batch correction-search paths by related subsets
This change should dramatically cut down on the number of heavily-mismatched paths that the correction-search engine builds during operation.  Now, whenever input characters are being matched against a character from the lexicon, they're all replaced, **together**, with a single sentinel character instance that represents them all together - with their exact accumulated probability mass.

Doing so dramatically cuts down on the rate of memory use expansion during correction-search's operation... and likely cuts down on execution time on average, allowing for more potential corrections to be considered.
2025-08-22 18:23:13 -05:00
Joshua Horton
e20bd8ebd9 feat(web): adds transform subset-building methods to predictive-text worker
These methods place a set of input Transforms into multiple subsets with common properties.  They're designed for use in upcoming enhancements to the predictive-text worker's correction-search approach.
2025-08-22 15:38:55 -05:00
Joshua Horton
6d27c3468d Merge branch 'refactor/web/apply-suggestion-casing' into maint/web/convert-worker-thread-tests 2025-08-14 11:01:39 -05:00
Joshua Horton
65885a4669 chore(web): add displayAs strings where previously unset 2025-08-14 08:32:11 -05:00
Joshua Horton
87eb476ecd change(web): eliminate extra tsconfig
I tried to get a multi-config setup to split off the tests that caused compilation issues in a prior commit, but I never got it working.  It's best to simplify and remove the thing that didn't work.
2025-08-13 11:00:52 -05:00
Joshua Horton
ec888dd751 Merge branch 'refactor/web/apply-suggestion-casing' into maint/web/convert-worker-thread-tests 2025-08-13 10:52:57 -05:00
Joshua Horton
a01211efa4 change(web): improve exposure of once-private members 2025-08-13 08:49:41 -05:00
Joshua Horton
e9a1f6c349 maint(web): converts worker-thread tests to TS 2025-08-12 15:38:53 -05:00
Joshua Horton
88f3a1a716 maint(web): convert models-templates, models-wordbreakers unit tests to TS 2025-08-12 10:12:10 -05:00
Marc Durdin
2726050601 maint(common): rename and move node-related script functions into node.inc.sh
Consolidates the node-related script functions into node.inc.sh, as part
of cleaning up the build scripts and making them easier to maintain into
the future.

Fixes: #14447
2025-08-02 13:34:29 +10:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Joshua Horton
245f2324df fix(web): update sentry-integration test page setup 2025-05-23 09:00:29 +07:00
Joshua Horton
2f3286b020 fix(web): updates android-harness test page setup to use module-bundled Sentry 2025-05-23 08:18:33 +07:00
Joshua Horton
155c1a2b12 maint: update mocha
Some of the npm audit warnings left after #13897 require an updated `mocha` version to remedy.  As we only really use `mocha` to do unit-testing, it should be safe to update if all of our existing tests pass with the new version.

Test-bot: skip
2025-05-13 14:02:02 +07:00
Eberhard Beilharz
460de65f0d
maint(common): use same TC variable everywhere
Standardize on `TEAMCITY_GIT_PATH` environment variable to detect
if we're running on TeamCity.

Test-bot: skip
2025-05-06 17:42:25 +02:00
Joshua Horton
1438704ee0
Merge pull request #13819 from keymanapp/maint/web/use-builder_is_ci_build
chore(web): replace --ci flag with builder_is_ci_build
2025-05-06 08:16:37 +07:00
Joshua Horton
2db4c16751
Merge pull request #13726 from keymanapp/refactor/web/eliminate-kmwstring-side-effects
refactor(web): refactor string-helper library to eliminate its module side-effect 🧶
2025-05-05 15:05:11 +07:00
Joshua Horton
cb5e3035a7 chore(web): replace --ci flag with builder_is_ci_build
Fixes: #12640
2025-05-02 09:39:39 +07:00
Joshua Horton
843221c466 chore(web): improve clean actions
A few cases weren't properly handled, while a few others simply weren't called by the top-level script.  This PR seeks to make the top-level clean action able to fully clean all built components, perhaps save for sample and test pages.

Test-bot: skip
2025-04-30 12:18:59 +07:00
Joshua Horton
dc450cde9e chore(web): finalize removal of side-effect KMWString implementation 2025-04-22 11:40:57 +07:00
Joshua Horton
418f3d6aec chore(web): update all Web engine uses of kmwLength, kmwCodePointToCodeUnit, kmwCodeUnitToCodePoint 2025-04-22 10:17:07 +07:00