Commit graph

5581 commits

Author SHA1 Message Date
Marc Durdin
59a12fd2cb maint(web): downgrade playwright to 1.46.1
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Failing builds on webkit tests on Ubuntu, going back to 'known good'
version for now.
2026-03-16 17:00:43 +01:00
Marc Durdin
70c54b0b40 chore: Merge branch 'epic/web-core' into auto/A19S24-merge-master-into-web-core
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-03-16 04:49:38 +01:00
Marc Durdin
659e85033a
Merge pull request #15665 from keymanapp/maint/developer/test-callbacks-cleanup
maint(developer): make `TestCompilerCallbacks` usage more consistent and simplify
2026-03-06 21:00:39 +07:00
Marc Durdin
645e1cd16f chore(web): remove implicit any type when setting processingConfig.itemIdentifier
Not exactly clear what triggered this? Perhaps related to npm package updates,
but hard to see how.

Test-bot: skip
Build-bot: skip build:web
2026-03-05 21:46:40 +01:00
Marc Durdin
529a49431e maint(developer): make TestCompilerCallbacks usage more consistent and simplify
Simplify usage of `TestCompilerCallbacks` by making it responsible for
the `beforeEach` and `afterEach` incantations itself. There are a couple
of more complex usages of `TestCompilerCallbacks` which have been
excluded from this change on purpose.

Renamed `testCallbacks` to `callbacks` in the one place where it was
different.

Hoist @types/node and @types/mocha because inconsistent versions of
@types/mocha were causing compiler errors with this change.

Also added a cast to `fs.readFileSync` to `Uint8Array` to eliminate
compiler warnings/errors in test files.

Fixes: #15654
Test-bot: skip
2026-03-03 16:44:06 +01:00
Eberhard Beilharz
3c525cc244
chore: Merge branch 'epic/web-core' into auto/A19S23-merge-master-into-web-core 2026-02-27 10:19:18 +01:00
Joshua Horton
5c445d470c change(web): remove temp debug shell-script echo statements 2026-02-18 12:59:17 +07:00
Joshua Horton
b7975973af maint(web): ensure Web build scripts handle paths with spaces properly
The command shortcuts that were used by Web
scripts to create bundles via `esbuild` were not
properly handling the $KEYMAN_ROOT path when it
contained a space.  These changes will rectify
this behavior and permit builds for such cases.

Build-bot: skip build:web
Test-bot: skip
2026-02-18 09:14:30 +07:00
Eberhard Beilharz
7f1b925633
chore(web): fix buggy merge 2026-02-13 11:44:33 +01:00
Marc Durdin
ed63b70bb4
Merge branch 'epic/web-core' into auto/A19S22-merge-master-into-web-core 2026-02-13 11:08:05 +07:00
Joshua Horton
b3e045a7a8 change(web): define, utilize cleaner Web test-resource import paths
Build-bot: skip build:web
Test-bot: skip
2026-02-05 10:11:14 -06:00
Eberhard Beilharz
933361a520
feat(web): add and use RTL test keyboard
Build-bot: skip:all, build:web
Test-bot: skip
2026-01-29 14:52:56 +01:00
Eberhard Beilharz
4992268b77
feat(web): add unit test for RTL
This change stubs out `KMXKeyboard.isRTL` and adds a unit test for RTL
with .js and  .kmx (currently skipped) keyboards. Also change some code
to use `Keyboard` instead of `JSKeyboard` and stub out additional methods.

The RTL functionality will have to be completed when the necessary
extensions to the Core API are implemented (#15482).

Fixes: #15288
Test-bot: skip
2026-01-29 14:52:55 +01:00
Eberhard Beilharz
84aedb8616
refactor(web): rename keyboard.tests.tsjskeyboard.tests.ts
Test-bot: skip
2026-01-29 14:52:55 +01:00
Eberhard Beilharz
bfa6dfa412
Merge pull request #15477 from keymanapp/fix/web/tests
fix(web): fix problem with tests if KEYMAN_ROOT is not set 🎼

When running mocha without starting it through `build.sh`/`test.sh` the tests failed if the `KEYMAN_ROOT` environment variable was not set. Things were almost correct, but the undefined `KEYMAN_ROOT` variable added an extra `undefined` subdirectory. This change fixes this problem by setting `KEYMAN_ROOT` relative to the current file. This gets removed by `pathToFileURL` which also adds the absolute path to the current directory since we pass a relative path as argument.
2026-01-26 11:30:22 +01:00
Eberhard Beilharz
fd2a43de95
Update web/src/test/auto/headless/engine/loadKeyboardHelper.ts
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-01-26 08:49:20 +01:00
Eberhard Beilharz
7e972ab49a
Merge pull request #15465 from keymanapp/refactor/web/ProcessorInitOptions
refactor(web): refactor `ProcessorInitOptions` 📏 🎼

This addresses a web-core TODO comment.

This change makes the `options` parameter in the `JSKeyboardProcessor` constructor no longer optional. Also `baseLayout` and `defaultOutputRules` are now required in `ProcessorInitOptions`. For testing purposes we export `DEFAULT_OPTIONS` in a testing endpoint.

The `options` parameter in the `InputProcessor` constructor is no longer optional. Also removes the `DEFAULT_OPTIONS` from
`InputProcessor`.

This change also moves the `ProcessorInitOptions` interface to a separate file and makes `keyboardInterface` a required field.

An alternative approach would have been to get rid of `ProcessorInitOptions` and instead set the `JSKeyboardProcessor` fields after creating the instance. Doing it the implemented way seemed cleaner.
2026-01-22 17:34:08 +01:00
Eberhard Beilharz
7f110d15c5
feat(web): fix build 2026-01-22 17:14:01 +01:00
Eberhard Beilharz
7d57e839ac
chore(web): Merge branch 'epic/web-core' into feat/web/15287_doModifierPress 2026-01-22 17:03:19 +01:00
Eberhard Beilharz
26542576ee
feat(web): address code review comments and fix build 2026-01-22 17:00:33 +01:00
Eberhard Beilharz
54e6a8adef
fix(web): fix problem with tests if KEYMAN_ROOT is not set
When running mocha without starting it through `build.sh`/`test.sh`
the tests failed if the `KEYMAN_ROOT` environment variable was not set.
Things were almost correct, but the undefined `KEYMAN_ROOT` variable
added an extra `undefined` subdirectory. This change fixes this problem
by setting `KEYMAN_ROOT` to the current directory (`.`). This gets
removed by `pathToFileURL` which also adds the absolute path to the
current directory since we pass a relative path as argument.

Build-bot: skip
Test-bot: skip
2026-01-21 15:25:35 +01:00
Eberhard Beilharz
40ce71a63f
refactor(web): address code review comments
The definition of `DEFAULT_PROCESSOR_INIT_OPTIONS` got lost in
last PR.

Test-bot: skip
2026-01-21 13:07:43 +01:00
Eberhard Beilharz
2b56e871f8
chore(web): Merge branch 'epic/web-core' into feat/web/persistopts 2026-01-21 12:44:33 +01:00
Eberhard Beilharz
6ae03c84ca
Merge pull request #15438 from keymanapp/feat/core/optionsupdate
feat(core): expose `km_core_state_options_update` to WASM 🍪 🎼

Part-of: #13426
2026-01-20 14:57:54 +01:00
Eberhard Beilharz
ad10627e1c
chore(web): Merge branch 'refactor/web/defaultRules' into refactor/web/ProcessorInitOptions 2026-01-20 12:12:22 +01:00
Eberhard Beilharz
8ecaae5f21
refactor(web): address code review comments
- remove confusing comment
- move default ProcessorInitOptions to tests folder
- add jsdoc comments to ProcessorInitOptions

Test-bot: skip
2026-01-20 12:10:25 +01:00
Eberhard Beilharz
63173a25ba
feat(developer): address code review comments 2026-01-20 11:47:14 +01:00
Eberhard Beilharz
2641681f89
chore(web): Merge branch 'epic/web-core' into refactor/web/defaultRules 2026-01-20 11:45:09 +01:00
Eberhard Beilharz
f7f23df040
Merge branch 'epic/web-core' into feat/core/optionsupdate 2026-01-20 11:42:14 +01:00
Eberhard Beilharz
485ea55800
chore(web): Merge remote-tracking branch 'origin/epic/web-core' into feat/web/15287_doModifierPress 2026-01-20 11:41:05 +01:00
Eberhard Beilharz
03eba3cf55
Merge pull request #15463 from keymanapp/refactor/web/test-index
refactor(web): use unitTestEndpoint pattern in OSK 🎼

This changes the exports for unit testing to the unitTestEndpoint pattern.

Part-of: #15292
2026-01-20 08:41:40 +01:00
Eberhard Beilharz
55af621654
Merge pull request #15461 from keymanapp/refactor/web/processorAction
refactor(web): rename ruleBehavior variables → processorAction 🎼

The changes in PR #12291 renamed the `RuleBehavior` class to `ProcessorAction`. This change now renames the local variables in `InputProcessor` accordingly.

Follow-up-of: #12291
2026-01-20 08:40:54 +01:00
Eberhard Beilharz
b8d2dc5726
Merge pull request #15462 from keymanapp/refactor/web/exports
refactor(web): remove web-utils exports from keyboard 🎼

Types defined in keyman/common/web-utils were re-exported in keyman/engine/keyboard. This change removes the re-export.

Part-of: #15292
2026-01-20 08:39:58 +01:00
Eberhard Beilharz
63028ab4d6
Merge pull request #15466 from keymanapp/feat/web/isChiralEngineBase
feat(web): implement `KeyboardEngineBase.isChiral` 🎼

Part-of: #13426
2026-01-20 08:39:14 +01:00
Eberhard Beilharz
8d3a6da260
fix(web): fix baseline tests
Previously the cookies for the baseline tests were set to a fixed time
which might be in the past. This change now calculates the expiration
time and sets them to expire in 60s.

Test-bot: skip
2026-01-19 18:17:03 +01:00
Eberhard Beilharz
bc3f447601
feat(web): address code review comments
Test-bot: skip
2026-01-19 17:07:59 +01:00
Eberhard Beilharz
aeb8cbe39a
Merge branch 'epic/web-core' into refactor/web/defaultRules 2026-01-19 16:21:22 +01:00
Eberhard Beilharz
2e404390c0
Merge pull request #15437 from keymanapp/feat/web/findStores
feat(web): add `findStores` functions 🍪

This change adds a static `findStores` function to `VarStoreSerializer` and `VariableStoreCookieSerializer` as well as to the `VariableStoreSerializer` interface.

Also add unit tests for `VariableStoreCookieSerializer`.

Part-of: #13426
2026-01-19 13:01:03 +01:00
Eberhard Beilharz
4f154574f6
feat(web): implement KeyboardEngineBase.isChiral
Part-of: #13426
Test-bot: skip
2026-01-16 21:06:37 +01:00
Eberhard Beilharz
aa5c5bad66
refactor(web): make ProcessorInitOptions.keyboardInterface mandatory
This change moves the `ProcessorInitOptions` interface to a separate
file and makes `keyboardInterface` a required field.

Test-bot: skip
2026-01-16 18:08:37 +01:00
Eberhard Beilharz
0d67393f90
refactor(web): options parameter mandatory in InputProcessor c'tor
This makes the `options` parameter in the `InputProcessor` constructor
no longer optional. Also removes the `DEFAULT_OPTIONS` from
`InputProcessor`.

Test-bot: skip
2026-01-16 17:52:10 +01:00
Eberhard Beilharz
77b4bd8037
refactor(web): options parameter mandatory in JSKeyboardProcessor c'tor
This makes the `options` parameter in the `JSKeyboardProcessor`
constructor no longer optional.
Also `baseLayout` and `defaultOutputRules` are now required in
`ProcessorInitOptions`.

For testing purposes we export `DEFAULT_OPTIONS` in a testing endpoint.

Test-bot: skip
2026-01-16 17:48:40 +01:00
Eberhard Beilharz
f22faa1c04
refactor(web): rename DefaultRulesDefaultOutputRules
Test-bot: skip
2026-01-16 17:11:28 +01:00
Eberhard Beilharz
f8d07549ba
chore(web): update TODO comments
This changes several `TODO-web-core` to `TODO-embed-osk-in-kmx` because
they are related to OSK and can't be implemented/tested without having
the OSK API available.

Also updated some additional comments.

Build-bot: skip
Test-bot: skip
2026-01-16 16:52:05 +01:00
Eberhard Beilharz
aea2e2ab98
refactor(web): use unitTestEndpoint pattern in OSK
This changes the exports for unit testing to the unitTestEndpoint pattern.

Part-of: #15292
Test-bot: skip
2026-01-16 16:37:49 +01:00
Eberhard Beilharz
9930a8cbae
refactor(web): remove web-utils exports from keyboard
Types defined in keyman/common/web-utils were re-exported in
keyman/engine/keyboard. This change removes the re-export.

Part-of: #15292
Test-bot: skip
2026-01-16 16:25:32 +01:00
Eberhard Beilharz
44326731dd
refactor(web): rename ruleBehavior variables → processorAction
The changes in PR #12291 renamed the `RuleBehavior` class to
`ProcessorAction`. This change now renames the local variables in
`InputProcessor` accordingly.

Follow-up-of: #12291
Test-bot: skip
2026-01-16 15:52:33 +01:00
Marc Durdin
f6b8bfb463
Merge branch 'epic/web-core' into auto/A19S20-merge-master-into-web-core 2026-01-16 08:40:12 +01:00
Eberhard Beilharz
7c05ac8239
Merge pull request #15431 from keymanapp/chore/web/e2e
chore(web): fix e2e tests 🍪

The Playwright tests occasionally failed complaining about `Page` and `Locator` not being defined. The solution is to import them as types.

The test failures probably happened when running the tests with a node version > 20.16.0.
2026-01-15 12:53:11 +01:00
Eberhard Beilharz
5e380c0f72
feat(web): implement persisting keyboard options
- move `CoreKeyboardInterface` to separate file
- add variable store to `CoreKeyboardInterface` to manage variable stores
  for active keyboard
- Add `VariableStoreSerializer` parameter to `CoreKeyboardProcessor.init()`
- Implement `process_persist_action()` to save options to persistent
  storage
- Update keyboard activation to load stored options from serializer

Closes: #13426
Test-bot: skip
2026-01-15 12:49:28 +01:00