Commit graph

5689 commits

Author SHA1 Message Date
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
f8dbd6963b
Merge pull request #15313 from keymanapp/docs/web/fixtypo 2025-12-09 12:33:18 +01:00
Eberhard Beilharz
df806e10b6
docs(web): remove specific version from documentation
This removes the specific version from the control-by-control example
and thus makes it similar to the other examples where we use a relative
path. `get-started.md` and the *.html files will still show how this can
be done with a specific version.

Build-bot: skip
Test-bot: skip
2025-12-08 10:26:09 +01:00
Eberhard Beilharz
a18ad08a8f
docs(web): update version in documentation
Addresses a code review comment.
2025-12-08 10:20:00 +01:00
Eberhard Beilharz
4e291b8ef1
Update web/docs/engine/guide/get-started.md
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-12-08 10:14:33 +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
a1ec9371e6
docs(web): fix typo in osk documentation 2025-12-05 17:39:11 +01:00
Eberhard Beilharz
70627e104f
Merge pull request #15293 from keymanapp/chore/web/todos 2025-12-05 17:02:32 +01:00
Eberhard Beilharz
22c8a66731
docs(web): add links to next/previous page to web guide
Build-bot: skip
Test-bot: skip
2025-12-05 15:54:46 +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
Eberhard Beilharz
e442fc36d6
fix(web): simplify function
Addresses code review comments.

Co-authored-by: Marc Durdin <marc@durdin.net>
Test-bot: skip
2025-11-27 17:46:03 +01:00
Eberhard Beilharz
43ec5c28fa
Merge pull request #15220 from keymanapp/refactor/web/corekbdproctests
refactor(web): make core adapter and processor tests headless

Also improve Core Adapter to detect if we're running in a browser or on node.js and load the appropriate km-core module.

Follow-up-of: #13993
2025-11-27 13:09:41 +01:00
Eberhard Beilharz
e4f7e1bc40
test(web): add test for saving markers with empty text 2025-11-26 18:37:24 +01:00
Eberhard Beilharz
a5c243b7e2
fix(web): address code review comments 2025-11-26 18:31:33 +01:00
Eberhard Beilharz
8875a904a3
fix(web): add text after last deadkey to context
Test-bot: skip
2025-11-25 19:20:40 +01:00
Eberhard Beilharz
cc12161d84
refactor(web): make core adapter and processor tests headless
Also improve Core Adapter to detect if we're running in a browser or on
node.js and load the appropriate km-core module.

Follow-up-of: #13993
Test-bot: skip
2025-11-24 17:27:44 +01:00
Eberhard Beilharz
0cd87ba898
docs(web): add comment why output() is on keyboard interface
Follow-up-of: #15190
Build-bot: skip
Test-bot: skip
2025-11-24 16:16:42 +01:00
Eberhard Beilharz
1e53d7413b
Merge pull request #15210 from keymanapp/refactor/web/testexports 2025-11-24 12:17:46 +01:00
Eberhard Beilharz
62a566cc6b
Merge pull request #15190 from keymanapp/refactor/web/gettingTextStore
refactor(web): simplify `insertText`

Getting the textStore was done twice, without the second time changing the result. Additionally, `insertText` in the super class also gets the active text store and returns false if it is not set. This change removes those additional code lines that are not needed.

Also adds unit tests for `ContextManager.insertText`, and introduces new type `KeymanInfoPair`.

Follow-up-of: #15092
2025-11-21 12:14:44 +01:00
Eberhard Beilharz
f8404a82e4
Merge pull request #15211 from keymanapp/test/web/nestedInstanceOf
test(web): add unit tests for `nestedInstanceOf`

Also rename file `utils.ts` to `nestedInstanceOf.ts`.
2025-11-21 12:11:25 +01:00
Eberhard Beilharz
0954456d93
Merge pull request #15212 from keymanapp/test/web/textStoreForElement
docs(web): add clarifying comment for filename

See https://github.com/keymanapp/keyman/pull/15092#discussion_r2493661810 for background.

Follow-up-of: #15092
2025-11-21 12:10:39 +01:00
Eberhard Beilharz
a35bd2b6f6
Merge pull request #15189 from keymanapp/refactor/web/mockvars
refactor(web): rename target and mock variables and functions

This change renames `target` and `mock` variables that identify a text store. Similarly it renames functions with `Target` in the name.

Follow-up-of: #15092
2025-11-21 12:09:24 +01:00
Eberhard Beilharz
7882573095
Update web/src/engine/src/element-text-stores/inputTextStore.ts
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-11-21 11:29:06 +01:00
Eberhard Beilharz
4d63a25878
Merge pull request #15170 from keymanapp/refactor/web/preinput
refactor(web): change `preInput` to `SyntheticTextStore`

`preInput` always contains a `SyntheticTextStore`, so this change modifies the type of the property so that we don't have to always cast it.

Follow-up-of: #15092
2025-11-21 11:16:52 +01:00
Eberhard Beilharz
5320865f6c
Merge pull request #15169 from keymanapp/docs/web/todos 2025-11-21 11:16:06 +01:00
Eberhard Beilharz
23dbbc88f6
Merge pull request #13993 from keymanapp/feat/web/13926_kbdprocessing 2025-11-21 11:15:31 +01:00
Eberhard Beilharz
c9f8e880a8
docs(web): address code review comments
Build-bot: skip
Test-bot: skip
2025-11-21 11:13:23 +01:00
Eberhard Beilharz
cd52afc084
docs(web): add clarifying comment for filename
Follow-up-of: #15092
Test-bot: skip
2025-11-20 16:47:57 +01:00
Eberhard Beilharz
597e433a0f
test(web): add unit tests for nestedInstanceOf
Also rename file `utils.ts` to `nestedInstanceOf.ts`.

Test-bot: skip
2025-11-20 16:46:08 +01:00
Eberhard Beilharz
35c2507c3e
refactor(web): remove duplicate exports
Previously we re-exported the exports of `element-text-stores` in
`attachment` because it was needed in unit tests. This change removes
this re-export - should be solved differently, but it turns out that
all current tests pass even without the re-export.

This comes out of
[a review comment in #15092](https://github.com/keymanapp/keyman/pull/15092#discussion_r2493048032).

Follow-up-of: #15092
Test-bot: skip
2025-11-20 16:41:37 +01:00
Marc Durdin
c2204e4dfc chore: Merge remote-tracking branch 'origin/epic/web-core' into auto/A19S16-merge-master-into-web-core
Test-bot: skip
Build-bot: skip build:web
2025-11-20 15:06:01 +01:00
Eberhard Beilharz
ee913792c0
refactor(web): simplify insertText
Getting the textStore was done twice, without the second time changing
the result. Additionally, `insertText` in the super class also gets the
active text store and returns false if it is not set. This change
removes those additional code lines that are not needed.

Test-bot: skip
2025-11-19 19:59:58 +01:00
Eberhard Beilharz
c1e94bdca9
test(web): add unit tests for ContextManager.insertText 2025-11-19 19:50:31 +01:00
Eberhard Beilharz
bd0ba61a68
refactor(web): introduce type KeyboardInfoPair 2025-11-19 19:49:53 +01:00
Eberhard Beilharz
6975bf383e
refactor(web): rename target and mock variables and functions
This change renames `target` and `mock` variables that identify a
text store. Similarly it renames functions with `Target` in the name.

Follow-up-of: #15092
Test-bot: skip
2025-11-19 15:17:34 +01:00
Eberhard Beilharz
bb2e6e6466
chore(web): Merge branch 'epic/web-core' into feat/web/13926_kbdprocessing 2025-11-18 15:31:02 +01:00
Eberhard Beilharz
e75327dc44
feat(web): properly treat SMP characters in context
Addresses code review comments.
2025-11-18 15:21:37 +01:00