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
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
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.
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
- 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
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
Document what values are possible for the `eventCode` parameter and what
these values mean. Also change `data` parameter to a `boolean`.
Test-bot: skip
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.
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
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
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
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
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
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.