Commit graph

5162 commits

Author SHA1 Message Date
Joshua A. Horton
5435f79903 fix(web): oh yeah, export the class 2023-08-11 12:53:04 +07:00
Joshua A. Horton
84b8afa040 docs(web): removes older form of new class's documenation 2023-08-11 12:39:33 +07:00
Joshua A. Horton
ea775d9ebf feat(web): queued promise prioritizer / resynchronizer 2023-08-11 12:35:23 +07:00
Joshua Horton
50543d601e
Merge pull request #9423 from keymanapp/chore/web/GestureSource-rename
chore(web): SimpleGestureSource => GestureSource 🐵
2023-08-11 12:15:19 +07:00
Joshua Horton
3b06ce0016
Merge pull request #9406 from keymanapp/refactor/web/gesture-source-paradigm
refactor(web): simplifies the gesture source paradigm 🐵
2023-08-11 12:15:08 +07:00
Joshua Horton
46ae042bc6
Merge pull request #9320 from keymanapp/feat/web/gesture-model-matching
feat(web): gesture modeling + isolated matching 🐵
2023-08-11 12:14:59 +07:00
Marc Durdin
aa9788ad46 chore(common): remove deprecated fields from keyboard_info
Removes the following fields:
* legacyId
* documentationFilename
* documentationFileSize
* links
* related[].note

None of these fields are needed any longer; see #9351 for steps to
remove data.

Eliminates difference between keyboard_info source and distribution,
renaming to keyboard_info.schema.json, and updating the required members
of the json accordingly.

Will have corresponding commits in keyman.com, api.keyman.com,
help.keyman.com, and keyboards repositories.
2023-08-11 10:34:38 +07:00
Marc Durdin
add9a43f9e
Merge pull request #9441 from keymanapp/chore/developer/report-fatal-compiler-errors-to-sentry
chore(developer): improve kmc sentry reporting on fatal build errors
2023-08-09 18:35:53 +10:00
Marc Durdin
087c68f4ca
chore: Apply suggestions from code review 2023-08-09 18:32:20 +10:00
Marc Durdin
fa19eea873 chore(developer): improve kmc sentry reporting on fatal build errors
kmc already reported unhandled exceptions, but any handled fatal errors
were captured and only reported to the user. It is better to report
these to Sentry as these are still unexpected.

I have refactored all the fatal exception messages in various kmc
modules to use a common mechanism, keeping all the Sentry integration in
kmc, now passing exception data up in the `CompilerEvent.exceptionVar`
property.

* I took the opportunity to rename messages.ts to
  infrastructureMessages.ts

* @types/chai was missing which gave intellisense errors in vscode

* normal exit of kmc now provides an opportunity for error reports to
  Sentry to be finalized

* Added a unit test for fatal errors in kmc

* Added a manual test pathway with `SENTRY_CLIENT_TEST_BUILD_EXCEPTION`
  env var to trip the build fatal error mechanism and verify that it
  looks ok; the following shows test runs demonstrate how fatal build
  errors are reported:

```
mcdurdin@THARK MINGW64 /c/Projects/keyman/app/developer/src/kmc (chore/developer/report-fatal-compiler-errors-to-sentry)
$ SENTRY_CLIENT_TEST_BUILD_EXCEPTION=1 node . --error-reporting build
fatal KM05001: Unexpected exception: Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION

Call stack:
Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION
    at build (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:78:19)
    at Command.<anonymous> (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:66:24)
    at Command.listener [as _actionHandler] (C:\Projects\keyman\app\node_modules\commander\lib\command.js:482:17)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:65
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:27)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1081:27
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._dispatchSubcommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1077:23)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1248:19)

    This error has been automatically reported to the Keyman team.
      Identifier:  6f0fca1a26694c22b03f02b2463d39c5
      Application: Keyman Developer
      Reported at: https://sentry.io/organizations/keyman/projects/keyman-developer/events/6f0fca1a26694c22b03f02b2463d39c5/

mcdurdin@THARK MINGW64 /c/Projects/keyman/app/developer/src/kmc (chore/developer/report-fatal-compiler-errors-to-sentry)
$ SENTRY_CLIENT_TEST_BUILD_EXCEPTION=1 node . --no-error-reporting build
fatal KM05001: Unexpected exception: Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION

Call stack:
Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION
    at build (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:78:19)
    at Command.<anonymous> (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:66:24)
    at Command.listener [as _actionHandler] (C:\Projects\keyman\app\node_modules\commander\lib\command.js:482:17)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:65
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:27)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1081:27
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._dispatchSubcommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1077:23)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1248:19)
```
2023-08-09 09:34:44 +07:00
Marc Durdin
c02f5ab419 feat(developer): add 'default' property for longpress keys
Fixes #9430.

Adds a 'default' property to subkeys, only used by longpress-type
subkeys:

* Added property to schema and readers/writers
* Added property to touch layout validator
* Added editor for property to layout builder
2023-08-08 14:20:52 +07:00
Joshua A. Horton
54c0b02c61 refactor(web): fixes unit-test helper func name, puts in own script 2023-08-07 10:17:22 +07:00
Marc Durdin
49d471ba17
Merge pull request #8954 from keymanapp/feature-kmc-kmw
epic: kmc-kmw KeymanWeb compiler in Typescript 🗜
2023-08-07 11:37:39 +10:00
Steven R. Loomis
d88c04df97
Merge pull request #9374 from keymanapp/feat/developer/9119-marker-update-spec-epic-ldml
chore(developer): update markers per review 🙀
2023-08-04 14:12:49 -05:00
Joshua A. Horton
0159b29bf2 chore(web): ~~Simple~~GestureSource 2023-08-04 16:11:07 +07:00
Joshua A. Horton
c3267b5e24 chore(web): cleans up remaining artifacts from having spun off from later work 2023-08-04 15:57:01 +07:00
Marc Durdin
cdf026c2ba chore: Merge branch 'feature-kmc-kmw' into chore/merge-master-into-feature-kmc-kmw-a17s18 2023-08-04 12:54:10 +07:00
Joshua A. Horton
fa16bbf7aa chore: Merge branch 'master' into chore/feature-gestures-a17s18-master-merge 2023-08-04 11:04:38 +07:00
Steven R. Loomis
6632aafeec spec(core): update per code review 🙀
- keep 'deadkey' out of the ldml code
- other renames

For: #9119
2023-08-03 19:00:21 -05:00
Steven R. Loomis
d53ae69299
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-08-03 18:56:05 -05:00
Joshua A. Horton
d69d67fa03 fix(web): forgot to target es5 when minifying polyfilled worker 2023-08-03 10:00:06 +07:00
Joshua A. Horton
7f37a3f92b fix(web): fixes prerecorded test fixtures 2023-08-03 08:38:07 +07:00
Joshua A. Horton
b7e250a6c7 refactor(web): fixes test + JS/TS test resources per last commit 2023-08-03 08:37:37 +07:00
Joshua A. Horton
3f3dec5c02 refactor(web): drops ComplexGestureSource 2023-08-03 08:36:13 +07:00
Steven R. Loomis
4aacfbf737 chore(developer): improve code coverage 30% 🙀
- … with this one weird trick

For: #9119
2023-08-02 18:09:58 -05:00
Steven R. Loomis
2a818b1ede spec(core,developer): update marker spec 🙀
- use UC_SENTINEL CODE_DEADKEY …
- use U+FFFE for any marker
- add asserts between .ts and C++
- update generation

For: #9119
2023-08-02 18:04:48 -05:00
Marc Durdin
c20a670f91 chore(developer): handle unknown file extensions in file types
Projects can contain any type of file, but the fromFilename file type
utility function would only handle known source and binary file types.
2023-08-02 12:32:07 +07:00
Marc Durdin
d8e03e0695 chore(developer): refactor KeymanDeveloperProjectFile
Turns KeymanDeveloperProjectFile into an interface, and removes
redundant data in filename and fileType fields, calculating these from
filePath instead. Maintains separate KeymanDeveloperProjectFile10 and
KeymanDeveloperProjectFile20 classes implementing the base interface for
now, although that may be a target for future consolidation (lowpri).
2023-08-02 12:05:48 +07:00
Marc Durdin
48c0f09872 chore(developer): use getFileType() instead of fileType
Ensures that we calculate the file type instead of using stored data,
which is a lot cleaner. Means we ignore the filetype field in the .kpj
xml, which is fine.

We should do the same with filename vs filepath.
2023-08-02 11:50:35 +07:00
Joshua A. Horton
d8fabfa7b1 chore(web): Merge branch 'feature-gestures' into feat/web/gesture-model-matching 2023-08-01 10:30:53 +07:00
Steven R. Loomis
7c3424b081 chore(developer): update markers per review 🙀
- remove SENTINEL_ALL_MARKERS

For: #9119
2023-07-31 16:10:59 -05:00
Joshua Horton
14d6f513ea
Merge pull request #9339 from keymanapp/feat/web/gesture-path-snapshots
feat(web): gesture path snapshots 🐵
2023-07-31 16:02:06 +07:00
Joshua A. Horton
a89c41b470 chore(web): tweaks per PR review 2023-07-31 15:35:46 +07:00
Joshua A. Horton
3cc2298d69 chore(web): Merge remote-tracking branch 'origin/feat/web/gesture-path-snapshots' into feat/web/gesture-path-snapshots 2023-07-31 15:08:36 +07:00
Joshua A. Horton
40c0d6a5ed docs(web): adds docs as requested by PR review 2023-07-31 15:08:10 +07:00
Steven R. Loomis
8c79f14156 feat(developer): marker - use marker in the sections 🙀
- bunch of rework to make 'vars' a dependent of lots of sections
- should be emitting marker ids in the output stream now.

#9119
2023-07-29 17:26:36 -05:00
Steven R. Loomis
a6bce2d6c0 feat(common): marker - utilities to emit sentinel values 🙀
#9119
2023-07-29 16:59:54 -05:00
Steven R. Loomis
97c8380f7c feat(common): marker - emit sentinel values 🙀
#9119
2023-07-29 16:48:33 -05:00
Steven R. Loomis
2211900e5f feat(common): marker - move values into constants 🙀
- constants need to be shared with C++

#9119
2023-07-29 16:15:55 -05:00
Steven R. Loomis
d514dc9915 feat(common): marker processing support 🙀
- common: emit the sentinel value, with range checking, from MarkerParser
2023-07-29 16:06:59 -05:00
Steven R. Loomis
581d65a4c7 fix(common): list fix 🙀
- a falsy list should show up as list #0

#9119
2023-07-29 14:55:21 -05:00
Steven R. Loomis
52e54395f9 feat(developer): marker accounting 🙀
- split out MarkerTracker, could give us more precise messages about marker use
- for now, we parse all markers twice.
- update builder for the markers list

#9119
2023-07-29 14:18:37 -05:00
Joshua Horton
089cdbf661
chore(web): Apply suggestions from code review 2023-07-28 08:08:44 +07:00
Joshua Horton
1f600c95de
chore(web): enhances comment I noticed post-push 2023-07-27 13:30:18 +07:00
Joshua A. Horton
c6969b738b chore(web): better promise-rejection logging 2023-07-27 12:26:04 +07:00
Joshua A. Horton
287ba2c234 feat(web): subkey selection unit tests 2023-07-27 12:26:04 +07:00
Joshua A. Horton
abb0349b32 feat(web): adds isolated path-inheritance tests 2023-07-27 12:26:03 +07:00
Joshua A. Horton
14b492bd8f chore(web): alphabetical gesture-spec order 2023-07-27 12:26:03 +07:00
Joshua A. Horton
ad5f62180d change(web): cleanup post-rebase, adds stats components to some test-specs 2023-07-27 12:26:02 +07:00
Joshua A. Horton
03d9d4106f feat(web): longpress-gesture unit tests 2023-07-27 12:26:02 +07:00