Commit graph

5516 commits

Author SHA1 Message Date
Eberhard Beilharz
050d18aa94
refactor(web): Rename (Default)Worker to WebWorker and NodeWorker
Addresses code review comment: `Worker` is a generic and semi-reserved
name that we should not be stepping on.

This renames it to `WebWorker` instead of the suggested `LMWorker` or
`PredictiveTextWorker`. `WebWorker` is a name that was already used
in a few places and seems to better match: there is a corresponding
class for running with node. Naming it `WebWorker` makes it clearer
that this is the corresponding class when running in the browser.

The corresponding class for running under node was renamed to `NodeWorker`.

Test-bot: skip
2026-01-12 10:52:05 +01:00
Eberhard Beilharz
3833f19c44
refactor(web): remove some aliases
This is a follow-up of review comments in #15401.
- rename `DefaultWorker` → `Worker`
- rename `BUTTON_CLASSES` → `buttonClassNames`
Both exports now also match the filename.

Follow-up-of: #15401
Test-bot: skip
2026-01-09 10:55:01 +01:00
Eberhard Beilharz
1a8c909274
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-01-09 09:36:00 +01:00
Eberhard Beilharz
f9f804c190
feat(web): remove 'export default' to eliminate more aliases
Fixes: #15292
Test-bot: skip
2026-01-07 15:36:33 +01:00
Eberhard Beilharz
d0c7810348
Merge pull request #15370 from keymanapp/test/web/optbaseline
test(web): add option setting/verification to baseline tests 

Also enable some .js tests that are now passing with these changes.
2026-01-07 15:30:30 +01:00
Eberhard Beilharz
afe6f467e3
Merge branch 'epic/web-core' into test/web/problem 2026-01-07 11:37:49 +01:00
Eberhard Beilharz
5666b4296e
Merge branch 'epic/web-core' into test/common/baseline 2026-01-06 18:54:37 +01:00
Eberhard Beilharz
65642ae2d4
Merge pull request #15341 from keymanapp/test/web/jsbaseline
test(web): add baseline tests for .js keyboards

This change adds baseline tests for .js keyboards. Several of those tests fail and so are skipped for now (#15342).

This test also includes the .js files of the baseline keyboards because they can't easily be generated on non-Windows platforms. This is similar to the .kmx files that are also included in the repo for the same reason.
2026-01-06 18:52:45 +01:00
Eberhard Beilharz
f65a752b47
test(web): address code review comments 2026-01-06 18:19:07 +01:00
Eberhard Beilharz
5f2e72749a
test(web): address code review comments 2026-01-06 17:43:27 +01:00
Eberhard Beilharz
4ba1fcbfb3
Merge pull request #15376 from keymanapp/refactor/web/keyboard-storage
refactor(web): remove defaults in keyboard-storage

- Also renamed `prefixed` and `withoutPrefix` functions to use the name   that was aliased on most cases: `toPrefixedKeyboardId` and   `toUnprefixedKeyboardId`. 
- Renamed `ModelManager` class to `ModelCache` which was the name used   everywhere except in comments.

Part-of: #15292
2025-12-22 14:53:28 +01:00
Eberhard Beilharz
f276c672c0
Merge pull request #15344 from keymanapp/refactor/web/constants
chore(web): remove default from hardware keyboard 

Also some other refactorings like use constants instead of hard coded values.
2025-12-22 14:33:53 +01:00
Eberhard Beilharz
f063bc3181
Merge pull request #15332 from keymanapp/refactor/web/cleanup 2025-12-22 11:58:17 +01:00
Eberhard Beilharz
5b38557227
refactor(web): remove defaults in keyboard-storage
- Also renamed `prefixed` and `withoutPrefix` functions to use the name
  that was aliased on most cases: `toPrefixedKeyboardId` and
  `toUnprefixedKeyboardId`.
- Renamed `ModelManager` class to `ModelCache` which was the name used
  everywhere except in comments.

Part-of: #15292
Test-bot: skip
2025-12-19 18:43:02 +01:00
Eberhard Beilharz
7a1964034c
test(web): add another test to testsToFix for .kmx keyboards
Adding the option verification caused another .kmx test to fail because
the feature is not yet implemented.

Test-bot: skip
2025-12-19 12:16:58 +01:00
Eberhard Beilharz
72d12622ff
refactor(web): address code review comment 2025-12-19 11:59:32 +01:00
Eberhard Beilharz
ba16fc7033
test(web): add option setting/verification to baseline tests 🧪
Test-bot: skip
2025-12-18 19:36:46 +01:00
Eberhard Beilharz
1895a944a2
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-12-18 12:48:45 +01:00
Eberhard Beilharz
e4e76caea7
refactor(web): address code review comment
Build-bot: skip
Test-bot: skip
2025-12-17 15:55:52 +01:00
Eberhard Beilharz
e6a6b75115
test(common): add new baseline test k_0202___alt.kmn
This is basically the same test as `k_0201___ralt_2.kmn` but uses
ALT instead of RALT in the rule.

Also update `k_0201___ralt_2.kmn` to be a bit more extensive.

Note: since the change in `k_0201___ralt_2.kmn` is only in the test
data, i.e. the comments, the .js and .kmx files don't change.

Related-to: #15358
Test-bot: skip
2025-12-16 16:52:13 +01:00
Eberhard Beilharz
6de40e903b
test(common): better group baseline tests
This change groups similar tests together. Also update `build.sh` to
compile .js files.

Follow-up-of: #15341
Test-bot: skip
2025-12-15 18:12:01 +01:00
Eberhard Beilharz
4d644cd00e
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-12-15 15:44:42 +01:00
Eberhard Beilharz
80c1f8864a
test(web): add baseline tests for .js keyboards
Test-bot: skip
2025-12-12 18:23:39 +01:00
Eberhard Beilharz
1b04772bb9
refactor(web): address code review comments 2025-12-12 11:31:55 +01:00
Eberhard Beilharz
878b8ab2f0
chore(web): remove default from hardware keyboard
Test-bot: skip
2025-12-11 19:27:04 +01:00
Eberhard Beilharz
dbb05e3fcc
refactor(web): use constants instead of hard coded values
And some other refactorings.

Test-bot: skip
2025-12-11 19:27:03 +01:00
Eberhard Beilharz
d1ddff8b56
refactor(web): cleanup and clarifications
Build-bot: skip
Test-bot: skip
2025-12-09 20:15:50 +01:00
Eberhard Beilharz
79ad53f9cf
refactor(web): document and cleanup parameters of Keyboard.notify()
Document what values are possible for the `eventCode` parameter and what
these values mean. Also change `data` parameter to a `boolean`.

Test-bot: skip
2025-12-09 20:14:14 +01:00
Eberhard Beilharz
654f1b2103
chore(web): Merge remote-tracking branch 'origin/epic/web-core' into feat/web/15283_keydown 2025-12-09 20:06:48 +01:00
Eberhard Beilharz
c87f29648b
Merge pull request #15278 from keymanapp/test/web/tcreporter 2025-12-09 20:04:27 +01:00
Eberhard Beilharz
b7369d79d7
Merge pull request #15251 from keymanapp/test/web/baseline
test(web): add baseline tests

This adds the baseline tests from `/common/test/keyboards/baseline`. Some tests are skipped because they rely on functionality not implemented in Web, other tests are skipped because they require functionality still marked with `TODO-web-core` and should pass once web-core is finished.
2025-12-09 18:13:01 +01:00
Eberhard Beilharz
cbab541f38
Merge pull request #15250 from keymanapp/tests/web/e2ekmxkbds
test(web): add e2e tests for KMX keyboard with web-core

Also add similar tests for a JS keyboard.
2025-12-09 18:03:40 +01:00
Eberhard Beilharz
78cd9f8663
test(web): address code review comments 2025-12-09 17:37:01 +01:00
Eberhard Beilharz
588d08cb90
test(web): address code review comments
- include `km_core_actions_wasm.toString` only for debug builds
- simplify waiting on KMW fully initialized

Test-bot: skip
2025-12-09 17:28:11 +01:00
Eberhard Beilharz
0b244690a0
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-12-09 17:26:08 +01:00
Eberhard Beilharz
d594afb317
Merge pull request #15310 from keymanapp/maint/web/cleanup
maint(web): remove file that sneaked in through wrong merge

A previous PR (#15092) renamed `outputTargetForElement.ts` to `textStoreForElement.ts`, another PR (#15093) moved files around. In the end we ended up having both files. This change removes the unused file.

Follow-up-of: #15092
Follow-up-of: #15093
2025-12-08 08:43:25 +01:00
Eberhard Beilharz
191964260f
feat(web): properly set keyDown flag
This change passes the right value to the `is_key_down` parameter of
Core's `process_event`. It also updates the WASM interface to accept
a boolean instead of a number, and adds the enum values for the core
event flags.

Fixes: #15283
Test-bot: skip
2025-12-05 19:18:15 +01:00
Eberhard Beilharz
8cea94dd8c
test(web): add TC reporter for Playwright tests
This adds a custom reporter used when building on TeamCity that outputs
the test results in a form that TeamCity can show them nicely.

Build-bot: skip:all build:web
Test-bot: skip
2025-12-05 19:16:27 +01:00
Eberhard Beilharz
8784e0aacf
test(web): add baseline tests 2025-12-05 19:14:09 +01:00
Eberhard Beilharz
12d56453a4
test(web): add e2e tests for KMX keyboard with web-core
Also add similar tests for a JS keyboard.

Test-bot: skip
2025-12-05 19:13:27 +01:00
Eberhard Beilharz
70627e104f
Merge pull request #15293 from keymanapp/chore/web/todos 2025-12-05 17:02:32 +01:00
Eberhard Beilharz
490add936f
maint(web): remove file that sneaked in through wrong merge
A previous PR (#15092) renamed `outputTargetForElement.ts` to
`textStoreForElement.ts`, another PR (#15093) moved files around. In the
end we ended up having both files. This change removes the unused file.

Follow-up-of: #15092
Follow-up-of: #15093
Test-bot: skip
2025-12-05 15:01:18 +01:00
Eberhard Beilharz
6b24bbdd31
chore(web): address code review comments, and more consts 2025-12-05 11:31:14 +01:00
Marc Durdin
00e88d37a4 chore: Merge remote-tracking branch 'origin/epic/web-core' into auto/A19S17-merge-master-into-web-core 2025-12-05 08:07:35 +01:00
Eberhard Beilharz
133f46330d
chore(web): add issue# for some todos
Also use const instead of let in `renderer_core.ts`.

Test-bot: skip
2025-12-04 15:57:08 +01:00
Marc Durdin
a09c3064bb maint(common): pass 'test' flag in to builder_launch test.sh
Long-term builder_launch may need to handle the default action in child
builds, but this is really an outlier and for now, fixing here.

This resolves a situation where the unit tests were not running for web
after the builder_launch update.

Fixes: #15130
Build-bot: skip build:web
2025-12-02 10:29:09 +01:00
Marc Durdin
c524db41b9 maint(common): use builder_launch for child builds
Fixes: #15130
Test-bot: skip
2025-12-02 06:17:31 +01:00
Eberhard Beilharz
fcee30530c
fix(web): fix running tests on Windows machines
This change allows the headless core-adapter and CoreKeyboardProcessor
tests to run on Windows.

Follow-up-of: #15220
Test-bot: skip
2025-12-01 13:32:28 +01:00
Eberhard Beilharz
ec7f1b6b35
Merge pull request #15234 from keymanapp/fix/web/context
fix(web): add text after last deadkey to context

Previously we forgot to add the text after the last deadkey - or any text if didn't have deadkeys. This change fixes this and verifies things with additional unit tests.
2025-11-28 18:36:25 +01:00
Eberhard Beilharz
bf652fb18c
fix(web): another simplification
Plus another unit test.

Test-bot: skip
2025-11-28 12:03:11 +01:00