Commit graph

4544 commits

Author SHA1 Message Date
Marc Durdin
722f72b47a
Merge pull request #9470 from keymanapp/feat/developer/package-license
feat(developer): add LicenseFile as property of package 🎺
2023-09-01 13:05:29 +10:00
Marc Durdin
920a435fb6
Merge pull request #9463 from keymanapp/feat/developer/package-keyboard-web-fonts
feat(developer): add web font references to package 🎺
2023-09-01 13:05:22 +10:00
Marc Durdin
a0f7d25ead
Merge pull request #9459 from keymanapp/feat/developer/extra-package-metadata
feat(developer): additional metadata in keyboard packages 🎺
2023-09-01 13:05:12 +10:00
Marc Durdin
ee4108598e
Merge pull request #9452 from keymanapp/feat/developer/keyboard-info-dedup
chore(common): remove deprecated fields from keyboard_info 🎺
2023-09-01 13:05:05 +10:00
Joshua A. Horton
be196744fd feat(web): adds numerous GestureSource unit tests 2023-08-30 10:19:31 +07:00
Joshua A. Horton
3aee911ea7 fix(web): patches up existing unit-tests 2023-08-30 10:18:26 +07:00
Joshua A. Horton
504eb53565 feat(web): adds support for pushed alt-configurations during gesture-source lifetime 2023-08-30 10:14:29 +07:00
Joshua A. Horton
6bf0cebcd6 fix(web): fixes unit tests post-abstraction 2023-08-30 10:14:06 +07:00
Joshua A. Horton
b9e9179863 refactor(web): abstracts the matcher-selector / gestureMatcher interface 2023-08-30 10:11:38 +07:00
Marc Durdin
1531e88f70 feat(developer): eliminate source .model_info and .keyboard_info files
Removes all references to source .keyboard_info and .model_info files in
the kmc compiler and types. Updates the model info compiler to support
building purely from model sources (isRTL, license fields are TODO).
2023-08-29 15:37:31 +10:00
Joshua A. Horton
d488f22fd9 feat(web): browser-KMW support for default subkeys 2023-08-21 10:42:06 +07:00
Steven R. Loomis
b6855e121f feat(core): ldml: support <display id=...> in the 'disp' section 🙀
- "recent" addition to CLDR DTD

Fixes: #8717
2023-08-18 17:02:35 -05:00
Steven R. Loomis
e20123cbf8 fix(common): don't crash on illegal unicodesets 🙀
- UnicodeSetItem was ignoring the error value from sizeUnicodeSet() and calling parseUnicodeSet with an invalid size
- it *is* an error, but should be handled properly.
- an error is already recorded in the callback

The symptom was an internal error where there should have been an error callback.

  2) vars
       should fail to compile: sections/vars/fail-uset-props1.xml:
     Error: Internal Error: uset returned error -1 for [:Adlm:]
      at new UnicodeSetItem
      at VarsCompiler.addUnicodeSet

For: #7377
2023-08-18 17:02:35 -05:00
Steven R. Loomis
0ea1211b72 fix(common): marker test 🙀
- common test lacked update from #9448

#9119
2023-08-17 14:48:50 -05:00
Marc Durdin
3af9f6d610 chore(developer): fixup license vs graphic file error 2023-08-17 11:22:28 +07:00
Marc Durdin
e751a250a4 chore(common): fixup test for SkipMetadataFiles 2023-08-17 11:18:30 +07:00
Marc Durdin
a7f8123e56 feat(developer): support building .keyboard_info without source version
Relates to #9351.

Adds support for building a .keyboard_info file without having source
.keyboard_info file:

* Constructs a default source .keyboard_info in memory
* Hints if license is missing
* If LICENSE.md is present, verifies it matches the MIT license text
* Adds project option to turn on or off metadata generation. This will
  default to False for version 1.0 projects, and to True for version 2.0
  projects. This means that the keyboard repository will need a PR to
  enable metadata generation for existing projects in the repository,
  but this is important to avoid breaking builds for existing projects
  that are not in the repository.
* Turns on additional c8 coverage for kmc projects
2023-08-16 12:47:37 +07:00
Marc Durdin
395b76df05 chore(developer): cleanup keyboard_info schema
* Removes font size
* Restricts font source to array
* Removes example
* Add examples
* Loosen structure of KeyboardExample
2023-08-16 09:26:39 +07:00
Marc Durdin
158bc28e85 feat(developer): add LicenseFile as property of package
Adds license file to .kps, kmp.json, kmc-package, package editor, and
new project templates. The intent is for LICENSE.md to be the file used,
and for any keyboards on keymanapp/keyboards, it should always be a
standard MIT license.
2023-08-16 09:13:38 +07:00
Marc Durdin
1cce7ed8e8 chore(developer): remove fonts sidetrack 2023-08-16 05:42:45 +07:00
Marc Durdin
fea10f0eeb feat(developer): add web font references to package
While a package supports a .ttf or .otf font for the OSK and Display
fonts for use within the Keyman apps, on websites it also supports .woff
and .woff2. This change makes it possible to specify a set of fonts for
a package which will be provided through api.keyman.com to websites.

This means that .woff and .woff2 fonts may also be included in the
package and may not be used on target devices at this time, it further
opens the pathway to deploying .kmp packages to web in the future.

The deployment stage of keymanapp/keyboards will require a new phase to
copy web fonts from packages to s.keyman.com.
2023-08-15 15:13:24 +07:00
Marc Durdin
8a9243eba5 chore(developer): tweak Relationship values 2023-08-14 14:31:17 +07:00
Marc Durdin
38c3415eed feat(developer): add relatedPackages metadata
Adds relatedPackages support to:
* .kps schema
* .kps file format for Typescript
* kmp.json file format for Typescript
* kmc-package compiler
* Package Editor
2023-08-14 14:18:01 +07:00
Marc Durdin
d838df1c00 feat(developer): add editor of Package Description and Examples 2023-08-14 12:12:08 +07:00
Marc Durdin
4d71048daf chore(developer): fix casing 2023-08-14 10:06:17 +07:00
Marc Durdin
675f6bc91e feat(developer): description, font and example metadata in packages
Adds info.description, options.fonts, keyboard.examples metadata to
.kps and kmp.json files, updates schemas, and Typescript compiler.
2023-08-14 09:23:20 +07:00
Joshua A. Horton
a0acb0879f feat(web): auto-test for selection of simple tap (diff key) over multitap 2023-08-11 16:10:06 +07:00
Joshua A. Horton
f11ae5c570 feat(web): multitap selection test 2023-08-11 16:10:05 +07:00
Joshua A. Horton
1c18334817 feat(web): gesture-selection auto-test for subkey menu pattern 2023-08-11 16:10:05 +07:00
Joshua A. Horton
978965fd5e feat(web): further gesture-selection work - single source / first stage now vetted 2023-08-11 16:10:04 +07:00
Joshua A. Horton
d03cd7f155 feat(web): the bulk of gesture-staging implementation 2023-08-11 16:10:03 +07:00
Joshua A. Horton
80e96210ce refactor(web): multi-source mocked simulation 2023-08-11 12:54:21 +07:00
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